summaryrefslogtreecommitdiff
path: root/include/linker_lists.h
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2022-05-30 10:00:04 +0000
committerTom Rini <trini@konsulko.com>2022-06-23 12:58:18 -0400
commit99e2fbcb69f0759432c4cfa0b6e1afa006f22930 (patch)
treed19567cb46b803412545c2a770e1590c05ef4a8c /include/linker_lists.h
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 <ascull@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/linker_lists.h')
-rw-r--r--include/linker_lists.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linker_lists.h b/include/linker_lists.h
index 0575164ce4..d3da9d44e8 100644
--- a/include/linker_lists.h
+++ b/include/linker_lists.h
@@ -70,7 +70,7 @@
#define ll_entry_declare(_type, _name, _list) \
_type _u_boot_list_2_##_list##_2_##_name __aligned(4) \
__attribute__((unused)) \
- __section(".u_boot_list_2_"#_list"_2_"#_name)
+ __section("__u_boot_list_2_"#_list"_2_"#_name)
/**
* ll_entry_declare_list() - Declare a list of link-generated array entries
@@ -93,7 +93,7 @@
#define ll_entry_declare_list(_type, _name, _list) \
_type _u_boot_list_2_##_list##_2_##_name[] __aligned(4) \
__attribute__((unused)) \
- __section(".u_boot_list_2_"#_list"_2_"#_name)
+ __section("__u_boot_list_2_"#_list"_2_"#_name)
/*
* We need a 0-byte-size type for iterator symbols, and the compiler
@@ -110,7 +110,7 @@
* @_list: Name of the list in which this entry is placed
*
* This function returns ``(_type *)`` pointer to the very first entry of a
- * linker-generated array placed into subsection of .u_boot_list section
+ * linker-generated array placed into subsection of __u_boot_list section
* specified by _list argument.
*
* Since this macro defines an array start symbol, its leftmost index
@@ -126,7 +126,7 @@
({ \
static char start[0] __aligned(CONFIG_LINKER_LIST_ALIGN) \
__attribute__((unused)) \
- __section(".u_boot_list_2_"#_list"_1"); \
+ __section("__u_boot_list_2_"#_list"_1"); \
(_type *)&start; \
})
@@ -137,7 +137,7 @@
* (with underscores instead of dots)
*
* This function returns ``(_type *)`` pointer after the very last entry of
- * a linker-generated array placed into subsection of .u_boot_list
+ * a linker-generated array placed into subsection of __u_boot_list
* section specified by _list argument.
*
* Since this macro defines an array end symbol, its leftmost index
@@ -152,7 +152,7 @@
#define ll_entry_end(_type, _list) \
({ \
static char end[0] __aligned(4) __attribute__((unused)) \
- __section(".u_boot_list_2_"#_list"_3"); \
+ __section("__u_boot_list_2_"#_list"_3"); \
(_type *)&end; \
})
/**
@@ -161,7 +161,7 @@
* @_list: Name of the list of which the number of elements is computed
*
* This function returns the number of elements of a linker-generated array
- * placed into subsection of .u_boot_list section specified by _list
+ * placed into subsection of __u_boot_list section specified by _list
* argument. The result is of an unsigned int type.
*
* Example:
@@ -246,7 +246,7 @@
#define ll_start(_type) \
({ \
static char start[0] __aligned(4) __attribute__((unused)) \
- __section(".u_boot_list_1"); \
+ __section("__u_boot_list_1"); \
(_type *)&start; \
})
@@ -269,7 +269,7 @@
#define ll_end(_type) \
({ \
static char end[0] __aligned(4) __attribute__((unused)) \
- __section(".u_boot_list_3"); \
+ __section("__u_boot_list_3"); \
(_type *)&end; \
})