summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorAndrew Scull <[email protected]>2022-05-30 10:00:04 +0000
committerTom Rini <[email protected]>2022-06-23 12:58:18 -0400
commit99e2fbcb69f0759432c4cfa0b6e1afa006f22930 (patch)
treed19567cb46b803412545c2a770e1590c05ef4a8c /arch/mips
parent0648b132696532c96c3656876c5b12ac336e1b27 (diff)
linker_lists: Rename sections to remove . prefix
Rename the sections used to implement linker lists so they begin with '__u_boot_list' rather than '.u_boot_list'. The double underscore at the start is still distinct from the single underscore used by the symbol names. Having a '.' in the section names conflicts with clang's ASAN instrumentation which tries to add redzones between the linker list elements, causing expected accesses to fail. However, clang doesn't try to add redzones to user sections, which are names with all alphanumeric and underscore characters. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/config.mk2
-rw-r--r--arch/mips/cpu/u-boot-spl.lds4
-rw-r--r--arch/mips/cpu/u-boot.lds4
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index faf4129ac16..04f36278058 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -65,6 +65,6 @@ PLATFORM_CPPFLAGS += -msoft-float
KBUILD_LDFLAGS += -G 0 -static -n -nostdlib
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
LDFLAGS_FINAL += --gc-sections
-OBJCOPYFLAGS += -j .text -j .rodata -j .data -j .u_boot_list
+OBJCOPYFLAGS += -j .text -j .rodata -j .data -j __u_boot_list
LDFLAGS_STANDALONE += --gc-sections
diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
index 28ea4f2a481..194398be853 100644
--- a/arch/mips/cpu/u-boot-spl.lds
+++ b/arch/mips/cpu/u-boot-spl.lds
@@ -29,8 +29,8 @@ SECTIONS
#if defined(CONFIG_SPL_DM) || defined(CONFIG_SPL_LOADER_SUPPORT)
. = ALIGN(4);
- .u_boot_list : {
- KEEP(*(SORT(.u_boot_list*)));
+ __u_boot_list : {
+ KEEP(*(SORT(__u_boot_list*)));
} > .spl_mem
#endif
diff --git a/arch/mips/cpu/u-boot.lds b/arch/mips/cpu/u-boot.lds
index 86496737d35..9a4ebcd1515 100644
--- a/arch/mips/cpu/u-boot.lds
+++ b/arch/mips/cpu/u-boot.lds
@@ -33,8 +33,8 @@ SECTIONS
}
. = ALIGN(4);
- .u_boot_list : {
- KEEP(*(SORT(.u_boot_list*)));
+ __u_boot_list : {
+ KEEP(*(SORT(__u_boot_list*)));
}
. = ALIGN(4);