From e8ad6168b0153e09f1a54ee887555db7833019df Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 22 Apr 2020 11:27:55 +0900 Subject: linker_script: move .rela.dyn section to bl_common.ld.h The .rela.dyn section is the same for BL2-AT-EL3, BL31, TSP. Move it to the common header file. I slightly changed the definition so that we can do "RELA_SECTION >RAM". It still produced equivalent elf images. Please note I got rid of '.' from the VMA field. Otherwise, if the end of previous .data section is not 8-byte aligned, it fails to link. aarch64-linux-gnu-ld.bfd: warning: changing start of section .rela.dyn by 4 bytes aarch64-linux-gnu-ld.bfd: warning: changing start of section .rela.dyn by 4 bytes aarch64-linux-gnu-ld.bfd: warning: changing start of section .rela.dyn by 4 bytes make: *** [Makefile:1071: build/qemu/release/bl31/bl31.elf] Error 1 Change-Id: Iba7422d99c0374d4d9e97e6fd47bae129dba5cc9 Signed-off-by: Masahiro Yamada --- bl2/bl2_el3.ld.S | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'bl2') diff --git a/bl2/bl2_el3.ld.S b/bl2/bl2_el3.ld.S index 8c45d9898..bc1794c06 100644 --- a/bl2/bl2_el3.ld.S +++ b/bl2/bl2_el3.ld.S @@ -105,17 +105,7 @@ SECTIONS __DATA_RAM_START__ = __DATA_START__; __DATA_RAM_END__ = __DATA_END__; - /* - * .rela.dyn needs to come after .data for the read-elf utility to parse - * this section correctly. Ensure 8-byte alignment so that the fields of - * RELA data structure are aligned. - */ - . = ALIGN(8); - __RELA_START__ = .; - .rela.dyn . : { - } >RAM - __RELA_END__ = .; - + RELA_SECTION >RAM STACK_SECTION >RAM BSS_SECTION >RAM XLAT_TABLE_SECTION >RAM -- cgit v1.2.3