summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-05-19 18:09:53 -0600
committerTom Rini <[email protected]>2026-06-04 12:27:16 -0600
commit4355a9a5f0065b31e19178a377bc5f0a7968768d (patch)
tree4a14c4b7f23dcb812e4765d454e86dc923792148
parent3ab8ea4a444ae798a173a25811081ae06cb358e3 (diff)
linker_lists: Do not set "unused" attribute
Whenever we declare something to be in a linker list, we want it to be included. This is why all of our linker scripts have a line similar to: KEEP(*(SORT(__u_boot_list*))); to ensure that any linker list found in any of the archives we are linking together makes it to the final object. Remove the places where we set an attribute saying that it is unused, or maybe_unused. Signed-off-by: Tom Rini <[email protected]>
-rw-r--r--include/linker_lists.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linker_lists.h b/include/linker_lists.h
index 4425fcb6785..a8b7e2c9f2b 100644
--- a/include/linker_lists.h
+++ b/include/linker_lists.h
@@ -69,7 +69,6 @@
*/
#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)
/**
@@ -92,7 +91,6 @@
*/
#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)
/*
@@ -125,7 +123,6 @@
#define ll_entry_start(_type, _list) \
({ \
static char start[0] __aligned(CONFIG_LINKER_LIST_ALIGN) \
- __attribute__((unused)) \
__section("__u_boot_list_2_"#_list"_1"); \
_type * tmp = (_type *)&start; \
asm("":"+r"(tmp)); \
@@ -167,7 +164,7 @@
*/
#define ll_entry_end(_type, _list) \
({ \
- static char end[0] __aligned(1) __attribute__((unused)) \
+ static char end[0] __aligned(1) \
__section("__u_boot_list_2_"#_list"_3"); \
_type * tmp = (_type *)&end; \
asm("":"+r"(tmp)); \
@@ -251,7 +248,7 @@
*/
#define ll_start_decl(_sym, _type, _list) \
static _type _sym[0] __aligned(CONFIG_LINKER_LIST_ALIGN) \
- __maybe_unused __section("__u_boot_list_2_" #_list "_1")
+ __section("__u_boot_list_2_" #_list "_1")
/*
* ll_end_decl uses __aligned(1) to avoid padding before the end marker.
@@ -259,7 +256,7 @@
*/
#define ll_end_decl(_sym, _type, _list) \
static _type _sym[0] __aligned(1) \
- __maybe_unused __section("__u_boot_list_2_" #_list "_3")
+ __section("__u_boot_list_2_" #_list "_3")
/**
* ll_entry_get() - Retrieve entry from linker-generated array by name