diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-16 15:20:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-19 15:36:47 +0100 |
commit | a83c97f2a4065ef7209f123b837fa5103f984c6a (patch) | |
tree | 7409d1c7ed7f696151a9e6158d261292db0beb2d /arch/arm/mach-socfpga/include/mach/lowlevel.h | |
parent | 14b88cef22d318823f5b66fb95d49b659b9cdd02 (diff) | |
download | barebox-a83c97f2a4065ef7209f123b837fa5103f984c6a.tar.gz barebox-a83c97f2a4065ef7209f123b837fa5103f984c6a.tar.xz |
ARM: socfpga: generate smaller images when multiple boards are selected
The socfpga xload images are limited to 64KiB. This doesn't fit if
multiple boards are selected. The reason is that we include huge
C files and arrays in the early init code which get compiled once
for each board. -ffunction-sections is without effect here since all
functions have the same name and hence we get the same function
multiple times in the same section.
To overcome this we surround all function names with a SECT() macro which
is used to add a board specific prefix to the section names. This way
-ffunction-sections can now do its work and discard unused functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-socfpga/include/mach/lowlevel.h')
-rw-r--r-- | arch/arm/mach-socfpga/include/mach/lowlevel.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-socfpga/include/mach/lowlevel.h b/arch/arm/mach-socfpga/include/mach/lowlevel.h index 01463bb877..03a2ea6435 100644 --- a/arch/arm/mach-socfpga/include/mach/lowlevel.h +++ b/arch/arm/mach-socfpga/include/mach/lowlevel.h @@ -13,7 +13,7 @@ #include <mach/pll_config.h> #include <mach/cyclone5-sequencer.c> -static void __noreturn start_socfpga_c5_common(uint32_t size, void *fdt_blob) +static noinline void SECT(start_socfpga_c5_common)(uint32_t size, void *fdt_blob) { void *fdt; @@ -32,7 +32,7 @@ static void __noreturn start_socfpga_c5_common(uint32_t size, void *fdt_blob) start_socfpga_c5_common(memory_size, __dtb_##fdt_name##_start); \ } -static noinline void start_socfpga_c5_xload_common(uint32_t size) +static noinline void SECT(start_socfpga_c5_xload_common)(uint32_t size) { struct socfpga_io_config io_config; int ret; |