mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 18:41:22 +00:00
Remove duplicated definitions of linker symbols
Many parts of the code were duplicating symbols that are defined in include/common/bl_common.h. It is better to only use the definitions in this header. As all the symbols refer to virtual addresses, they have to be uintptr_t, not unsigned long. This has also been fixed in bl_common.h. Change-Id: I204081af78326ced03fb05f69846f229d324c711 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
parent
f7bf9b0d95
commit
f660533729
19 changed files with 50 additions and 213 deletions
|
@ -69,40 +69,37 @@
|
|||
* BL images
|
||||
*/
|
||||
#if SEPARATE_CODE_AND_RODATA
|
||||
IMPORT_SYM(unsigned long, __TEXT_START__, BL_CODE_BASE);
|
||||
IMPORT_SYM(unsigned long, __TEXT_END__, BL_CODE_END);
|
||||
IMPORT_SYM(unsigned long, __RODATA_START__, BL_RO_DATA_BASE);
|
||||
IMPORT_SYM(unsigned long, __RODATA_END__, BL_RO_DATA_END);
|
||||
IMPORT_SYM(uintptr_t, __TEXT_START__, BL_CODE_BASE);
|
||||
IMPORT_SYM(uintptr_t, __TEXT_END__, BL_CODE_END);
|
||||
IMPORT_SYM(uintptr_t, __RODATA_START__, BL_RO_DATA_BASE);
|
||||
IMPORT_SYM(uintptr_t, __RODATA_END__, BL_RO_DATA_END);
|
||||
#else
|
||||
IMPORT_SYM(unsigned long, __RO_START__, BL_CODE_BASE);
|
||||
IMPORT_SYM(unsigned long, __RO_END__, BL_CODE_END);
|
||||
IMPORT_SYM(uintptr_t, __RO_START__, BL_CODE_BASE);
|
||||
IMPORT_SYM(uintptr_t, __RO_END__, BL_CODE_END);
|
||||
#endif
|
||||
|
||||
#if defined(IMAGE_BL1)
|
||||
IMPORT_SYM(uintptr_t, __BL1_ROM_END__, BL1_ROM_END);
|
||||
IMPORT_SYM(uintptr_t, __BL1_ROM_END__, BL1_ROM_END);
|
||||
|
||||
IMPORT_SYM(uintptr_t, __BL1_RAM_START__, BL1_RAM_BASE);
|
||||
IMPORT_SYM(uintptr_t, __BL1_RAM_END__, BL1_RAM_LIMIT);
|
||||
IMPORT_SYM(uintptr_t, __BL1_RAM_START__, BL1_RAM_BASE);
|
||||
IMPORT_SYM(uintptr_t, __BL1_RAM_END__, BL1_RAM_LIMIT);
|
||||
#elif defined(IMAGE_BL2)
|
||||
IMPORT_SYM(unsigned long, __BL2_END__, BL2_END);
|
||||
IMPORT_SYM(uintptr_t, __BL2_END__, BL2_END);
|
||||
#elif defined(IMAGE_BL2U)
|
||||
IMPORT_SYM(unsigned long, __BL2U_END__, BL2U_END);
|
||||
IMPORT_SYM(uintptr_t, __BL2U_END__, BL2U_END);
|
||||
#elif defined(IMAGE_BL31)
|
||||
IMPORT_SYM(unsigned long, __BL31_START__, BL31_START);
|
||||
IMPORT_SYM(unsigned long, __BL31_END__, BL31_END);
|
||||
IMPORT_SYM(uintptr_t, __BL31_START__, BL31_START);
|
||||
IMPORT_SYM(uintptr_t, __BL31_END__, BL31_END);
|
||||
#elif defined(IMAGE_BL32)
|
||||
IMPORT_SYM(unsigned long, __BL32_END__, BL32_END);
|
||||
IMPORT_SYM(uintptr_t, __BL32_END__, BL32_END);
|
||||
#endif /* IMAGE_BLX */
|
||||
|
||||
/* The following symbols are only exported from the BL2 at EL3 linker script. */
|
||||
#if BL2_IN_XIP_MEM && defined(IMAGE_BL2)
|
||||
extern uintptr_t __BL2_ROM_END__;
|
||||
#define BL2_ROM_END (uintptr_t)(&__BL2_ROM_END__)
|
||||
IMPORT_SYM(uintptr_t, __BL2_ROM_END__, BL2_ROM_END);
|
||||
|
||||
extern uintptr_t __BL2_RAM_START__;
|
||||
extern uintptr_t __BL2_RAM_END__;
|
||||
#define BL2_RAM_BASE (uintptr_t)(&__BL2_RAM_START__)
|
||||
#define BL2_RAM_LIMIT (uintptr_t)(&__BL2_RAM_END__)
|
||||
IMPORT_SYM(uintptr_t, __BL2_RAM_START__, BL2_RAM_BASE);
|
||||
IMPORT_SYM(uintptr_t, __BL2_RAM_END__, BL2_RAM_END);
|
||||
#endif /* BL2_IN_XIP_MEM */
|
||||
|
||||
/*
|
||||
|
@ -113,8 +110,8 @@ extern uintptr_t __BL2_RAM_END__;
|
|||
* page-aligned addresses.
|
||||
*/
|
||||
#if USE_COHERENT_MEM
|
||||
IMPORT_SYM(unsigned long, __COHERENT_RAM_START__, BL_COHERENT_RAM_BASE);
|
||||
IMPORT_SYM(unsigned long, __COHERENT_RAM_END__, BL_COHERENT_RAM_END);
|
||||
IMPORT_SYM(uintptr_t, __COHERENT_RAM_START__, BL_COHERENT_RAM_BASE);
|
||||
IMPORT_SYM(uintptr_t, __COHERENT_RAM_END__, BL_COHERENT_RAM_END);
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue