1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 09:12:08 +02:00

treewide: Convert macro and uses of __section(foo) to __section("foo")

This commit does the same thing as Linux commit 33def8498fdd.

Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.

Remove the quote operator # from compiler_attributes.h __section macro.

Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Marek Behún
2021-05-20 13:23:52 +02:00
committed by Tom Rini
parent 9ce799aaba
commit 236f2ec432
52 changed files with 110 additions and 107 deletions

View File

@@ -69,8 +69,8 @@
*/
#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)))
__attribute__((unused)) \
__section(".u_boot_list_2_"#_list"_2_"#_name)
/**
* ll_entry_declare_list() - Declare a list of link-generated array entries
@@ -92,8 +92,8 @@
*/
#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)))
__attribute__((unused)) \
__section(".u_boot_list_2_"#_list"_2_"#_name)
/*
* We need a 0-byte-size type for iterator symbols, and the compiler
@@ -125,8 +125,8 @@
#define ll_entry_start(_type, _list) \
({ \
static char start[0] __aligned(CONFIG_LINKER_LIST_ALIGN) \
__attribute__((unused, \
section(".u_boot_list_2_"#_list"_1"))); \
__attribute__((unused)) \
__section(".u_boot_list_2_"#_list"_1"); \
(_type *)&start; \
})
@@ -151,8 +151,8 @@
*/
#define ll_entry_end(_type, _list) \
({ \
static char end[0] __aligned(4) __attribute__((unused, \
section(".u_boot_list_2_"#_list"_3"))); \
static char end[0] __aligned(4) __attribute__((unused)) \
__section(".u_boot_list_2_"#_list"_3"); \
(_type *)&end; \
})
/**
@@ -245,8 +245,8 @@
*/
#define ll_start(_type) \
({ \
static char start[0] __aligned(4) __attribute__((unused, \
section(".u_boot_list_1"))); \
static char start[0] __aligned(4) __attribute__((unused)) \
__section(".u_boot_list_1"); \
(_type *)&start; \
})
@@ -268,8 +268,8 @@
*/
#define ll_end(_type) \
({ \
static char end[0] __aligned(4) __attribute__((unused, \
section(".u_boot_list_3"))); \
static char end[0] __aligned(4) __attribute__((unused)) \
__section(".u_boot_list_3"); \
(_type *)&end; \
})