* The BSS cannot be used for this purpose because it will be zeroed after
* having stored the pointer, so force the location to the data section.
*/
-u32 bootrom_stash_sp __attribute__((section(".data")));
+u32 bootrom_stash_sp __section(".data");
static void ddr_clock_init(void)
{
#include <fsl_immap.h>
#include "fsl_epu.h"
-#define __secure __attribute__((section("._secure.text")))
+#define __secure __section("._secure.text")
#define CCSR_GICD_CTLR 0x1000
#define CCSR_GICC_CTLR 0x2000
#include <common.h>
#include <spl.h>
-char __data_save_start[0] __section(.__data_save_start);
-char __data_save_end[0] __section(.__data_save_end);
+char __data_save_start[0] __section(".__data_save_start");
+char __data_save_end[0] __section(".__data_save_end");
u32 cold_reboot_flag = 1;
#include <config.h>
#include <asm/global_data.h>
-#define __secure __attribute__ ((section ("._secure.text")))
-#define __secure_data __attribute__ ((section ("._secure.data")))
+#define __secure __section("._secure.text")
+#define __secure_data __section("._secure.data")
#ifndef __ASSEMBLY__
*/
#define DECLARE_SECURE_SVC(_name, _id, _fn) \
static const secure_svc_tbl_t __secure_svc_ ## _name \
- __attribute__((used, section("._secure_svc_tbl_entries"))) \
+ __used __section("._secure_svc_tbl_entries") \
= { \
.id = _id, \
.func = _fn }
int (*parse)(const struct tag *);
};
-#define __tag __attribute__((unused, __section__(".taglist")))
+#define __tag __attribute__((unused)) __section(".taglist")
#define __tagtable(tag, fn) \
static struct tagtable __tagtable_##fn __tag = { tag, fn }
/*
* Copyright 2013 Albert ARIBAUD <albert.u.boot@aribaud.net>
*/
+#include <linux/compiler.h>
/**
* These two symbols are declared in a C file so that the linker
* aliasing warnings.
*/
-char __bss_start[0] __attribute__((section(".__bss_start")));
-char __bss_end[0] __attribute__((section(".__bss_end")));
-char __image_copy_start[0] __attribute__((section(".__image_copy_start")));
-char __image_copy_end[0] __attribute__((section(".__image_copy_end")));
-char __rel_dyn_start[0] __attribute__((section(".__rel_dyn_start")));
-char __rel_dyn_end[0] __attribute__((section(".__rel_dyn_end")));
-char __secure_start[0] __attribute__((section(".__secure_start")));
-char __secure_end[0] __attribute__((section(".__secure_end")));
-char __secure_stack_start[0] __attribute__((section(".__secure_stack_start")));
-char __secure_stack_end[0] __attribute__((section(".__secure_stack_end")));
-char __efi_runtime_start[0] __attribute__((section(".__efi_runtime_start")));
-char __efi_runtime_stop[0] __attribute__((section(".__efi_runtime_stop")));
-char __efi_runtime_rel_start[0] __attribute__((section(".__efi_runtime_rel_start")));
-char __efi_runtime_rel_stop[0] __attribute__((section(".__efi_runtime_rel_stop")));
-char _end[0] __attribute__((section(".__end")));
+char __bss_start[0] __section(".__bss_start");
+char __bss_end[0] __section(".__bss_end");
+char __image_copy_start[0] __section(".__image_copy_start");
+char __image_copy_end[0] __section(".__image_copy_end");
+char __rel_dyn_start[0] __section(".__rel_dyn_start");
+char __rel_dyn_end[0] __section(".__rel_dyn_end");
+char __secure_start[0] __section(".__secure_start");
+char __secure_end[0] __section(".__secure_end");
+char __secure_stack_start[0] __section(".__secure_stack_start");
+char __secure_stack_end[0] __section(".__secure_stack_end");
+char __efi_runtime_start[0] __section(".__efi_runtime_start");
+char __efi_runtime_stop[0] __section(".__efi_runtime_stop");
+char __efi_runtime_rel_start[0] __section(".__efi_runtime_rel_start");
+char __efi_runtime_rel_stop[0] __section(".__efi_runtime_rel_stop");
+char _end[0] __section(".__end");
* WARNING: This is going away very soon. Don't use it and don't submit
* pafches that rely on it. The global_data area is set up in crt0.S.
*/
-gd_t gdata __attribute__ ((section(".data")));
+gd_t gdata __section(".data");
#endif
/*
#include <asm/arch/sama5_boot.h>
struct {
u32 r4;
-} bootrom_stash __attribute__((section(".data")));
+} bootrom_stash __section(".data");
u32 spl_boot_device(void)
{
* it to the .data section.
*/
u32 bootindex __section(".data");
-static struct rom_extended_boot_data bootdata __section(.data);
+static struct rom_extended_boot_data bootdata __section(".data");
static void store_boot_info_from_rom(void)
{
* but the .bss is cleared between writing and reading this variable, so move
* it to the .data section.
*/
-u32 bootindex __attribute__((section(".data")));
+u32 bootindex __section(".data");
static void store_boot_index_from_rom(void)
{
* but the .bss is cleared between writing and reading this variable, so move
* it to the .data section.
*/
-u32 bootindex __attribute__((section(".data")));
-static struct rom_extended_boot_data bootdata __section(.data);
+u32 bootindex __section(".data");
+static struct rom_extended_boot_data bootdata __section(".data");
static void store_boot_info_from_rom(void)
{
};
struct mvebu_mbus_state mbus_state
- __attribute__ ((section(".data")));
+ __section(".data");
static struct mbus_dram_target_info mbus_dram_info
- __attribute__ ((section(".data")));
+ __section(".data");
/*
* Functions to manipulate the address decoding windows
#define TIMER_LOAD_VAL 0xffffffff
-static int init_done __attribute__((section(".data"))) = 0;
+static int init_done __section(".data") = 0;
/*
* Timer initialization
* in board_init_f(), respectively! I.e. global variables can not be used!
*/
static struct clk_dev_peri clk_periphs[]
- __attribute__((section(".data"))) = {
+ __section(".data") = {
CLK_PERI_1S(DEV_NAME_TIMER, 0, CLK_ID_TIMER_0,
PHY_BASEADDR_CLKGEN14, (I_PLL_0_2)),
CLK_PERI_1S(DEV_NAME_TIMER, 1, CLK_ID_TIMER_1,
#define MAX_DIVIDER ((1 << 8) - 1) /* 256, align 2 */
static struct clk_dev st_clk_devs[CLK_DEVS_NUM]
- __attribute__((section(".data")));
+ __section(".data");
#define clk_dev_get(n) ((struct clk_dev *)&st_clk_devs[n])
#define clk_container(p) (container_of(p, struct clk_dev, clk))
* in board_init_f(), respectively! I.e. global variables can not be used!
*/
/* core clock */
-static struct _core_hz_ core_hz __attribute__((section(".data")));
+static struct _core_hz_ core_hz __section(".data");
#define CORE_HZ_SIZE (sizeof(core_hz) / 4)
* Section ".data" must be used because BSS is not available before relocation,
* in board_init_f(), respectively! I.e. global variables can not be used!
*/
-static unsigned long timestamp __attribute__ ((section(".data")));
-static unsigned long lastdec __attribute__ ((section(".data")));
-static int timerinit __attribute__ ((section(".data")));
+static unsigned long timestamp __section(".data");
+static unsigned long lastdec __section(".data");
+static int timerinit __section(".data");
/* macro to hw timer tick config */
static long TIMER_FREQ = 1000000;
SOCFPGA_PHYS_OCRAM_SIZE - \
BOOTROM_SHARED_MEM_SIZE)
#define RST_STATUS_SHARED_ADDR (BOOTROM_SHARED_MEM_ADDR + 0x438)
-static u32 rst_mgr_status __section(.data);
+static u32 rst_mgr_status __section(".data");
/*
* Bootrom will clear the status register in reset manager and stores the
uint32_t cr;
};
-struct fel_stash fel_stash __attribute__((section(".data")));
+struct fel_stash fel_stash __section(".data");
#ifdef CONFIG_ARM64
#include <asm/armv8/mmu.h>
UART_COUNT = 5,
};
-static bool from_spl __attribute__ ((section(".data")));
+static bool from_spl __section(".data");
#ifndef CONFIG_SPL_BUILD
void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2,
*/
/* The number of valid entries in ram_banks[] */
-static int ram_bank_count __attribute__((section(".data")));
+static int ram_bank_count __section(".data");
/*
* The usable top-of-RAM for U-Boot. This is both:
* b) At the end of a region that has enough space to hold the relocated U-Boot
* and all other allocations made around it (stack, heap, page tables, etc.)
*/
-static u64 ram_top __attribute__((section(".data")));
+static u64 ram_top __section(".data");
/* The base address of the region of RAM that ends at ram_top */
-static u64 region_base __attribute__((section(".data")));
+static u64 region_base __section(".data");
/*
* Explicitly put this in the .data section because it is written before the
* .bss section is zeroed out but it needs to persist.
*/
-unsigned long cboot_boot_x0 __attribute__((section(".data")));
+unsigned long cboot_boot_x0 __section(".data");
void cboot_save_boot_params(unsigned long x0, unsigned long x1,
unsigned long x2, unsigned long x3)
#ifdef CONFIG_SPL_BUILD
/* Pointer to the global data structure for SPL */
DECLARE_GLOBAL_DATA_PTR;
-gd_t gdata __attribute__ ((section(".bss")));
+gd_t gdata __section(".bss");
void board_init_f(ulong dummy)
{
#ifdef __KERNEL__
-#define __tag __used __attribute__((__section__(".taglist")))
+#define __tag __used __section(".taglist")
#define __tagtable(tag, fn) \
static struct tagtable __tagtable_##fn __tag = { tag, fn }
};
#define __early_param(name, fn) \
-static struct early_params __early_##fn __used \
-__attribute__((__section__("__early_param"))) = { name, fn }
+static struct early_params __early_##fn __used \
+__section("__early_param") = { name, fn }
#endif
#endif
#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES)))
#else
#define __cacheline_aligned \
- __attribute__((__aligned__(L1_CACHE_BYTES), \
- __section__(".data.cacheline_aligned")))
+ __attribute__((__aligned__(L1_CACHE_BYTES))) \
+ __section(".data.cacheline_aligned")
#endif
#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
* before the bss section is available.
*/
#ifdef CONFIG_OF_PRIOR_STAGE
-phys_addr_t prior_stage_fdt_address __attribute__((section(".data")));
+phys_addr_t prior_stage_fdt_address __section(".data");
#endif
#ifndef CONFIG_XIP
-u32 hart_lottery __attribute__((section(".data"))) = 0;
+u32 hart_lottery __section(".data") = 0;
/*
* The main hart running U-Boot has acquired available_harts_lock until it has
.callback = sandbox_cmdline_cb_##f, \
}; \
/* Ppointer to the struct in a special section for the linker script */ \
- static __attribute__((section(".u_boot_sandbox_getopt"), used)) \
+ static __used __section(".u_boot_sandbox_getopt") \
struct sandbox_cmdline_option \
*sandbox_cmdline_option_##f##_ptr = \
&sandbox_cmdline_option_##f
* Copyright 2013 Albert ARIBAUD <albert.u.boot@aribaud.net>
*
*/
+#include <linux/compiler.h>
-char __efi_runtime_start[0] __attribute__((section(".__efi_runtime_start")));
-char __efi_runtime_stop[0] __attribute__((section(".__efi_runtime_stop")));
+char __efi_runtime_start[0] __section(".__efi_runtime_start");
+char __efi_runtime_stop[0] __section(".__efi_runtime_stop");
char __efi_runtime_rel_start[0]
- __attribute__((section(".__efi_runtime_rel_start")));
+ __section(".__efi_runtime_rel_start");
char __efi_runtime_rel_stop[0]
- __attribute__((section(".__efi_runtime_rel_stop")));
+ __section(".__efi_runtime_rel_stop");
#include <asm/cb_sysinfo.h>
#include <linux/compiler.h>
-static struct timestamp_table *ts_table __attribute__((section(".data")));
+static struct timestamp_table *ts_table __section(".data");
void timestamp_init(void)
{
* with zeroes when transitioning from "ROM", which is really RAM, to other
* RAM.
*/
-struct sysinfo_t lib_sysinfo __attribute__((section(".data")));
+struct sysinfo_t lib_sysinfo __section(".data");
/*
* Some of this is x86 specific, and the rest of it is generic. Right now,
/*
* Copyright 2013 Albert ARIBAUD <albert.u.boot@aribaud.net>
*/
+#include <linux/compiler.h>
-char __efi_runtime_start[0] __attribute__((section(".__efi_runtime_start")));
-char __efi_runtime_stop[0] __attribute__((section(".__efi_runtime_stop")));
+char __efi_runtime_start[0] __section(".__efi_runtime_start");
+char __efi_runtime_stop[0] __section(".__efi_runtime_stop");
char __efi_runtime_rel_start[0]
- __attribute__((section(".__efi_runtime_rel_start")));
+ __section(".__efi_runtime_rel_start");
char __efi_runtime_rel_stop[0]
- __attribute__((section(".__efi_runtime_rel_stop")));
+ __section(".__efi_runtime_rel_stop");
DECLARE_GLOBAL_DATA_PTR;
-gd_t *gd __attribute__((section(".data")));
+gd_t *gd __section(".data");
#if defined(CONFIG_DISPLAY_CPUINFO)
/*
DECLARE_GLOBAL_DATA_PTR;
-static struct shc_eeprom __attribute__((section(".data"))) header;
+static struct shc_eeprom __section(".data") header;
static int shc_eeprom_valid;
/*
DECLARE_GLOBAL_DATA_PTR;
-#define BCMSTB_DATA_SECTION __attribute__((section(".data")))
+#define BCMSTB_DATA_SECTION __section(".data")
struct bcmstb_boot_parameters bcmstb_boot_parameters BCMSTB_DATA_SECTION;
/* Parameters of early board initialization in SPL */
static struct spl_machine_param machine_param
- __attribute__((section(".machine_param"))) = {
+ __section(".machine_param") = {
.signature = SIGNATURE,
.version = 1,
.params = "vmubfasirM",
/* Parameters of early board initialization in SPL */
static struct spl_machine_param machine_param
- __attribute__((section(".machine_param"))) = {
+ __section(".machine_param") = {
.signature = SIGNATURE,
.version = 1,
.params = "vmubfasirM",
/* Parameters of early board initialization in SPL */
static struct spl_machine_param machine_param
- __attribute__((section(".machine_param"))) = {
+ __section(".machine_param") = {
.signature = SIGNATURE,
.version = 1,
.params = "vmubfasirM",
#include <nand.h>
#ifdef CONFIG_SPL_BUILD
-static struct draco_baseboard_id __attribute__((section(".data"))) settings;
+static struct draco_baseboard_id __section(".data") settings;
#if DDR_PLL_FREQ == 303
#if !defined(CONFIG_TARGET_ETAMIN)
#include "fru.h"
-struct fru_table fru_data __section(.data);
+struct fru_table fru_data __section(".data");
static u16 fru_cal_area_len(u8 len)
{
#include "biosemui.h"
BE_sysEnv _BE_env = {{0}};
-static X86EMU_memFuncs _BE_mem __attribute__((section(GOT2_TYPE))) = {
+static X86EMU_memFuncs _BE_mem __section(GOT2_TYPE) = {
BE_rdb,
BE_rdw,
BE_rdl,
BE_wrl,
};
-static X86EMU_pioFuncs _BE_pio __attribute__((section(GOT2_TYPE))) = {
+static X86EMU_pioFuncs _BE_pio __section(GOT2_TYPE) = {
BE_inb,
BE_inw,
BE_inl,
#undef COMP_NOMUX_ID
#undef COMP_LIST
-static struct clk *k210_bypass_children __section(.data);
+static struct clk *k210_bypass_children __section(".data");
/* Helper functions to create sub-clocks */
static struct clk_mux *k210_create_mux(const struct k210_mux_params *params,
return comp;
}
-static bool __section(.data) probed;
+static bool __section(".data") probed;
/* reset probed so we will probe again post-relocation */
static int k210_clk_bind(struct udevice *dev)
#if CONFIG_IS_ENABLED(EFI_LOADER)
int __efi_runtime_data psci_method;
#else
-int psci_method __attribute__ ((section(".data")));
+int psci_method __section(".data");
#endif
unsigned long __efi_runtime invoke_psci_fn
#include "pinctrl-imx.h"
-static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info __attribute__((section(".data")));
+static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info __section(".data");
static int imx5_pinctrl_probe(struct udevice *dev)
{
#include "pinctrl-imx.h"
-static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info __attribute__((section(".data")));
+static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info __section(".data");
static struct imx_pinctrl_soc_info imx7_lpsr_pinctrl_soc_info = {
.flags = ZERO_OFFSET_VALID,
#include "pinctrl-imx.h"
-static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info __attribute__((section(".data")));
+static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info __section(".data");
static int imx8mq_pinctrl_probe(struct udevice *dev)
{
#include <power/tps62362.h>
#if CONFIG_IS_ENABLED(DM_I2C)
-struct udevice *tps62362_dev __attribute__((section(".data"))) = NULL;
+struct udevice *tps62362_dev __section(".data") = NULL;
#endif
/**
#include <i2c.h>
#include <power/tps65217.h>
-struct udevice *tps65217_dev __attribute__((section(".data"))) = NULL;
+struct udevice *tps65217_dev __section(".data") = NULL;
/**
* tps65217_reg_read() - Generic function that can read a TPS65217 register
return 0;
}
#else
-struct udevice *tps65218_dev __attribute__((section(".data"))) = NULL;
+struct udevice *tps65218_dev __section(".data") = NULL;
int tps65218_reg_read(uchar dest_reg, uchar *dest_val)
{
#include <i2c.h>
#include <power/tps65910.h>
-struct udevice *tps65910_dev __attribute__((section(".data"))) = NULL;
+struct udevice *tps65910_dev __section(".data") = NULL;
static inline int tps65910_read_reg(int addr, uchar *buf)
{
#ifndef CONFIG_DM_SERIAL
static volatile unsigned char *const port[] = CONFIG_PL01x_PORTS;
-static enum pl01x_type pl01x_type __attribute__ ((section(".data")));
-static struct pl01x_regs *base_regs __attribute__ ((section(".data")));
+static enum pl01x_type pl01x_type __section(".data");
+static struct pl01x_regs *base_regs __section(".data");
#define NUM_PORTS (sizeof(port)/sizeof(port[0]))
#endif
* Use these to indicate that your code / data should go into the EFI runtime
* section and thus still be available when the OS is running
*/
-#define __efi_runtime_data __attribute__ ((section (".data.efi_runtime")))
-#define __efi_runtime __attribute__ ((section (".text.efi_runtime")))
+#define __efi_runtime_data __section(".data.efi_runtime")
+#define __efi_runtime __section(".text.efi_runtime")
/* Indicate supported runtime services */
efi_status_t efi_init_runtime_supported(void);
*/
#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
*/
#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
#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; \
})
*/
#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; \
})
/**
*/
#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; \
})
*/
#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; \
})
long ______r; \
static struct ftrace_likely_data \
__aligned(4) \
- __section(_ftrace_annotated_branch) \
+ __section("_ftrace_annotated_branch") \
______f = { \
.data.func = __func__, \
.data.file = __FILE__, \
#define __trace_if_value(cond) ({ \
static struct ftrace_branch_data \
__aligned(4) \
- __section(_ftrace_branch) \
+ __section("_ftrace_branch") \
__if_trace = { \
.func = __func__, \
.file = __FILE__, \
".popsection\n\t"
/* Annotate a C jump table to allow objtool to follow the code flow */
-#define __annotate_jump_table __section(.rodata..c_jump_table)
+#define __annotate_jump_table __section(".rodata..c_jump_table")
#else
#define annotate_reachable()
* visible to the compiler.
*/
#define __ADDRESSABLE(sym) \
- static void * __section(.discard.addressable) __used \
+ static void * __section(".discard.addressable") __used \
__PASTE(__addressable_##sym, __LINE__) = (void *)&sym;
/**
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-section-variable-attribute
* clang: https://clang.llvm.org/docs/AttributeReference.html#section-declspec-allocate
*/
-#define __section(S) __attribute__((__section__(#S)))
+#define __section(S) __attribute__((__section__(S)))
/*
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-unused-function-attribute
DECLARE_GLOBAL_DATA_PTR;
-static char trace_enabled __attribute__((section(".data")));
-static char trace_inited __attribute__((section(".data")));
+static char trace_enabled __section(".data");
+static char trace_inited __section(".data");
/* The header block at the start of the trace memory area */
struct trace_hdr {