diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-03-26 13:18:48 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-04-02 13:30:17 +0900 |
commit | 268131c24fedb804589a2226d4adb3ef97cd8874 (patch) | |
tree | 9c6e0820a4afa3b2e7cd325d58518b002385fda1 /include/common | |
parent | a7739bc7b16bf3e43f370864f8a800cf8943b391 (diff) | |
download | platform_external_arm-trusted-firmware-268131c24fedb804589a2226d4adb3ef97cd8874.tar.gz platform_external_arm-trusted-firmware-268131c24fedb804589a2226d4adb3ef97cd8874.tar.bz2 platform_external_arm-trusted-firmware-268131c24fedb804589a2226d4adb3ef97cd8874.zip |
xlat_tables_v2: fix assembler warning of PLAT_RO_XLAT_TABLES
If PLAT_RO_XLAT_TABLES is defined, the base xlat table goes to the
.rodata section instead of .bss section.
This causes a warning like:
/tmp/ccswitLr.s: Assembler messages:
/tmp/ccswitLr.s:297: Warning: setting incorrect section attributes for .rodata
It is practically no problem, but I want to keep the build log clean.
Put the base table into the "base_xlat_table" section to suppress the
assembler warnings.
The linker script determines its final destination; rodata section if
PLAT_RO_XLAT_TABLES=1, or bss section otherwise. So, the result is the
same.
Change-Id: Ic85d1d2dddd9b5339289fc2378cbcb21dd7db02e
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'include/common')
-rw-r--r-- | include/common/bl_common.ld.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/common/bl_common.ld.h b/include/common/bl_common.ld.h index 3fc8e970d..8ea7d6a8c 100644 --- a/include/common/bl_common.ld.h +++ b/include/common/bl_common.ld.h @@ -58,13 +58,32 @@ *(.got) \ __GOT_END__ = .; +/* + * The base xlat table + * + * It is put into the rodata section if PLAT_RO_XLAT_TABLES=1, + * or into the bss section otherwise. + */ +#define BASE_XLAT_TABLE \ + . = ALIGN(16); \ + *(base_xlat_table) + +#if PLAT_RO_XLAT_TABLES +#define BASE_XLAT_TABLE_RO BASE_XLAT_TABLE +#define BASE_XLAT_TABLE_BSS +#else +#define BASE_XLAT_TABLE_RO +#define BASE_XLAT_TABLE_BSS BASE_XLAT_TABLE +#endif + #define RODATA_COMMON \ RT_SVC_DESCS \ FCONF_POPULATOR \ PMF_SVC_DESCS \ PARSER_LIB_DESCS \ CPU_OPS \ - GOT + GOT \ + BASE_XLAT_TABLE_RO #define STACK_SECTION \ stacks (NOLOAD) : { \ @@ -142,6 +161,7 @@ *(COMMON) \ BAKERY_LOCK_NORMAL \ PMF_TIMESTAMP \ + BASE_XLAT_TABLE_BSS \ __BSS_END__ = .; \ } |