From c5d38e92010174f58d733274430ee91f340553b5 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 2 Oct 2019 16:29:25 +0200 Subject: lds: Add and use RO_DATA_SECTION macro We have many different pointer arrays which we put into linker sections and each time there's one added we have to adjust all linker scripts. This adds a common RO_DATA_SECTION define and uses it for all architectures. This makes it easier to add a new linker array. Signed-off-by: Sascha Hauer --- arch/x86/lib/barebox.lds.S | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'arch/x86/lib') diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S index d26f060a3e..71251642dc 100644 --- a/arch/x86/lib/barebox.lds.S +++ b/arch/x86/lib/barebox.lds.S @@ -133,6 +133,7 @@ SECTIONS *(.boot.rodata*) *(.boot.data*) . = ALIGN(4); + RO_DATA_SECTION } > barebox #endif @@ -164,36 +165,6 @@ SECTIONS . = ALIGN(4); } > barebox - .barebox_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) { - BAREBOX_CMDS - . = ALIGN(4); - } > barebox - - .barebox_ratp_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) { - BAREBOX_RATP_CMDS - . = ALIGN(4); - } > barebox - - .barebox_magicvars : AT ( LOADADDR(.barebox_cmd) + SIZEOF (.barebox_cmd) ) { - BAREBOX_MAGICVARS - . = ALIGN(4); - } > barebox - - .barebox_initcalls : AT ( LOADADDR(.barebox_magicvars) + SIZEOF (.barebox_magicvars) ) { - BAREBOX_INITCALLS - . = ALIGN(4); - } > barebox - - .barebox_exitcalls : AT ( LOADADDR(.barebox_initcalls) + SIZEOF (.barebox_initcalls) ) { - BAREBOX_EXITCALLS - . = ALIGN(4); - } > barebox - - .__usymtab : AT ( LOADADDR(.barebox_exitcalls) + SIZEOF (.barebox_exitcalls) ) { - BAREBOX_SYMS - . = ALIGN(4); - } > barebox - _edata = .; .bss : { __bss_start = .; -- cgit v1.2.3