Since commit e2138cf1e60 ("linker_lists.h: drop never used ll_start,
ll_end macros"), which removed macros that would create
__u_boot_list_1 and __u_boot_list_3 sections, the first _2 in the
linker list section names doesn't serve any purpose and is in fact
just confusing. So remove it.

There never seemed to be a reason for the symbol names to have that
_2, other than perhaps for consistency with the section those symbols
belonged to. Regardless, remove that as well.

All linker scripts use a "__u_boot_list*" glob, so they will work just
the same without that common _2.

Keep the _2_ part in the separator between list and entry names for
symbols, since that is called out in the documentation to allow one to
define sublists and iterate over those. I cannot find any current use
of that feature, but a later patch will make use of just that.

Signed-off-by: Rasmus Villemoes <[email protected]>
---
 include/linker_lists.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linker_lists.h b/include/linker_lists.h
index b6437ad6462..b94e3a359f3 100644
--- a/include/linker_lists.h
+++ b/include/linker_lists.h
@@ -19,11 +19,11 @@
 
 #if !defined(__ASSEMBLY__)
 
-#define ll_start_section_name(_list)        "__u_boot_list_2_"#_list"_1"
-#define ll_entry_section_name(_list, _name) "__u_boot_list_2_"#_list"_2_"#_name
-#define ll_end_section_name(_list)          "__u_boot_list_2_"#_list"_3"
+#define ll_start_section_name(_list)        "__u_boot_list_"#_list"_1"
+#define ll_entry_section_name(_list, _name) "__u_boot_list_"#_list"_2_"#_name
+#define ll_end_section_name(_list)          "__u_boot_list_"#_list"_3"
 
-#define ll_entry_symbol_name(_list, _name) _u_boot_list_2_##_list##_2_##_name
+#define ll_entry_symbol_name(_list, _name) _u_boot_list_##_list##_2_##_name
 
 /**
  * llsym() - Access a linker-generated array entry
-- 
2.54.0

Reply via email to