From a2136e6cbd732e627f9f33d9211ba0a67be52889 Mon Sep 17 00:00:00 2001 From: Herve Codina Date: Mon, 6 Jul 2015 09:36:43 +0200 Subject: exitcall: Add exitcall infrastructure exitcall infrastructure is based on initcall infrastructure. It allows to have and use exit call hooks on barebox shutdown. Signed-off-by: Herve Codina Signed-off-by: Sascha Hauer --- arch/x86/lib/barebox.lds.S | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'arch/x86') diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S index 6cf6b10d1b..23d7546532 100644 --- a/arch/x86/lib/barebox.lds.S +++ b/arch/x86/lib/barebox.lds.S @@ -185,7 +185,14 @@ SECTIONS . = ALIGN(4); } > barebox - .__usymtab : AT ( LOADADDR(.barebox_initcalls) + SIZEOF (.barebox_initcalls) ) { + .barebox_exitcalls : AT ( LOADADDR(.barebox_initcalls) + SIZEOF (.barebox_initcalls) ) { + __barebox_exitcalls_start = .; + EXITCALLS + __barebox_exitcalls_end = .; + . = ALIGN(4); + } > barebox + + .__usymtab : AT ( LOADADDR(.barebox_exitcalls) + SIZEOF (.barebox_exitcalls) ) { __usymtab_start = .; BAREBOX_SYMS __usymtab_end = .; -- cgit v1.2.3