diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-10-02 12:47:10 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-10-14 12:08:55 +0200 |
commit | 22bdecc9c591ffaca6baaa158012d324c7dfa4da (patch) | |
tree | aac3409d887ffa127966d01def08b9ad83cff337 /arch/x86 | |
parent | 99fe1fca690569111d095778b5cc26e7a7160a9e (diff) | |
download | barebox-22bdecc9c591ffaca6baaa158012d324c7dfa4da.tar.gz barebox-22bdecc9c591ffaca6baaa158012d324c7dfa4da.tar.xz |
lds: Move start/end address variables into defines
For the older section defines we specify the start and end addresses
outside the macro which means we have to repeat them in each linker
script. Make the start/end addresses part of the define to simplify
things. While at it, add a BAREBOX_ prefix to the INITCALLS and EXITCALLS
macros for consistency to the other defines.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/lib/barebox.lds.S | 16 | ||||
-rw-r--r-- | arch/x86/mach-efi/elf_ia32_efi.lds.S | 15 | ||||
-rw-r--r-- | arch/x86/mach-efi/elf_x86_64_efi.lds.S | 15 |
3 files changed, 6 insertions, 40 deletions
diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S index 6ee9342f47..d26f060a3e 100644 --- a/arch/x86/lib/barebox.lds.S +++ b/arch/x86/lib/barebox.lds.S @@ -165,44 +165,32 @@ SECTIONS } > barebox .barebox_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) { - __barebox_cmd_start = .; BAREBOX_CMDS - __barebox_cmd_end = .; . = ALIGN(4); } > barebox .barebox_ratp_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) { - __barebox_ratp_cmd_start = .; BAREBOX_RATP_CMDS - __barebox_ratp_cmd_end = .; . = ALIGN(4); } > barebox .barebox_magicvars : AT ( LOADADDR(.barebox_cmd) + SIZEOF (.barebox_cmd) ) { - __barebox_magicvar_start = .; BAREBOX_MAGICVARS - __barebox_magicvar_end = .; . = ALIGN(4); } > barebox .barebox_initcalls : AT ( LOADADDR(.barebox_magicvars) + SIZEOF (.barebox_magicvars) ) { - __barebox_initcalls_start = .; - INITCALLS - __barebox_initcalls_end = .; + BAREBOX_INITCALLS . = ALIGN(4); } > barebox .barebox_exitcalls : AT ( LOADADDR(.barebox_initcalls) + SIZEOF (.barebox_initcalls) ) { - __barebox_exitcalls_start = .; - EXITCALLS - __barebox_exitcalls_end = .; + BAREBOX_EXITCALLS . = ALIGN(4); } > barebox .__usymtab : AT ( LOADADDR(.barebox_exitcalls) + SIZEOF (.barebox_exitcalls) ) { - __usymtab_start = .; BAREBOX_SYMS - __usymtab_end = .; . = ALIGN(4); } > barebox diff --git a/arch/x86/mach-efi/elf_ia32_efi.lds.S b/arch/x86/mach-efi/elf_ia32_efi.lds.S index 9477aa7d73..a5874c448b 100644 --- a/arch/x86/mach-efi/elf_ia32_efi.lds.S +++ b/arch/x86/mach-efi/elf_ia32_efi.lds.S @@ -52,28 +52,17 @@ SECTIONS . = ALIGN(64); - __barebox_initcalls_start = .; - __barebox_initcalls : { INITCALLS } - __barebox_initcalls_end = .; - - __barebox_exitcalls_start = .; - __barebox_exitcalls : { EXITCALLS } - __barebox_exitcalls_end = .; + .barebox_initcalls : { BAREBOX_INITCALLS } + .barebox_exitcalls : { BAREBOX_EXITCALLS } . = ALIGN(64); - __barebox_magicvar_start = .; .barebox_magicvar : { BAREBOX_MAGICVARS } - __barebox_magicvar_end = .; . = ALIGN(64); - __barebox_cmd_start = .; __barebox_cmd : { BAREBOX_CMDS } - __barebox_cmd_end = .; . = ALIGN(64); - __barebox_ratp_cmd_start = .; __barebox_ratp_cmd : { BAREBOX_RATP_CMDS } - __barebox_ratp_cmd_end = .; . = ALIGN(4096); .dynamic : { *(.dynamic) } diff --git a/arch/x86/mach-efi/elf_x86_64_efi.lds.S b/arch/x86/mach-efi/elf_x86_64_efi.lds.S index 90b6b9f3f1..b00cb98c97 100644 --- a/arch/x86/mach-efi/elf_x86_64_efi.lds.S +++ b/arch/x86/mach-efi/elf_x86_64_efi.lds.S @@ -54,28 +54,17 @@ SECTIONS . = ALIGN(64); - __barebox_initcalls_start = .; - __barebox_initcalls : { INITCALLS } - __barebox_initcalls_end = .; - - __barebox_exitcalls_start = .; - __barebox_exitcalls : { EXITCALLS } - __barebox_exitcalls_end = .; + .barebox_initcalls : { BAREBOX_INITCALLS } + .barebox_exitcalls : { BAREBOX_EXITCALLS } . = ALIGN(64); - __barebox_magicvar_start = .; .barebox_magicvar : { BAREBOX_MAGICVARS } - __barebox_magicvar_end = .; . = ALIGN(64); - __barebox_cmd_start = .; __barebox_cmd : { BAREBOX_CMDS } - __barebox_cmd_end = .; . = ALIGN(64); - __barebox_ratp_cmd_start = .; __barebox_ratp_cmd : { BAREBOX_RATP_CMDS } - __barebox_ratp_cmd_end = .; . = ALIGN(4096); .dynamic : { *(.dynamic) } |