diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-09-13 14:57:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-09-21 10:53:04 +0200 |
commit | 3268f5175e566bf19c30a787f4e7e5a47c49eb10 (patch) | |
tree | 893078a262e9d690f527ced3f1110a62f07c0d09 /Makefile | |
parent | de3da79362d036899e607571618db34c10c2f279 (diff) | |
download | barebox-3268f5175e566bf19c30a787f4e7e5a47c49eb10.tar.gz barebox-3268f5175e566bf19c30a787f4e7e5a47c49eb10.tar.xz |
kbuild: support generating stripped ELF files for PBL
For testing remoteproc and ELF loading mechanisms, it can be useful
to have the consumed ELF files result from the barebox build itself.
The *.pblb intermediate artifacts can be used for this purpose, but they
are at least 64K larger than need be, because of generous alignment in
addition to debug and symbol information.
Let's add a separate %.elf target, that behaves like %.pblb with the
difference that the result is stripped and alignment of sections on-disk
is disabled.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230913125715.2142524-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -470,6 +470,7 @@ LDFLAGS_common += $(call ld-option,--no-warn-rwx-segments) LDFLAGS_barebox += $(LDFLAGS_common) LDFLAGS_pbl += $(LDFLAGS_common) +LDFLAGS_elf += $(LDFLAGS_common) --nmagic -s export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL PYTHON3 UTS_MACHINE @@ -483,8 +484,7 @@ export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL -export LDFLAGS_barebox -export LDFLAGS_pbl +export LDFLAGS_barebox LDFLAGS_pbl LDFLAGS_elf export CFLAGS_UBSAN export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE |