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/boards/ebv-socrates/lowlevel.c | |
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/boards/ebv-socrates/lowlevel.c')
-rw-r--r-- | arch/arm/boards/ebv-socrates/lowlevel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/boards/ebv-socrates/lowlevel.c b/arch/arm/boards/ebv-socrates/lowlevel.c index 3f12ae806f..ed2d4a72a5 100644 --- a/arch/arm/boards/ebv-socrates/lowlevel.c +++ b/arch/arm/boards/ebv-socrates/lowlevel.c @@ -1,3 +1,5 @@ +#define SECT(name) __attribute__((section("ebv_socrates_" #name))) name + #include "sdram_config.h" #include "pinmux_config.c" #include "pll_config.h" |