From 47722cfe554dc9f1f9ca56a88c57a283357f71ce Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 22 Feb 2022 02:08:11 +0100 Subject: libpayload/lpgcc: Add `--gc-sections` linker argument To be able to link libcbfs without vboot, we need garbage collection now. Change-Id: Id9a9fe7efb9fb4409a43ae8357f4f683618805d2 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/62247 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- payloads/libpayload/bin/lpgcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads/libpayload/bin') diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc index 2ad9ef525a..8bc46a6580 100755 --- a/payloads/libpayload/bin/lpgcc +++ b/payloads/libpayload/bin/lpgcc @@ -182,7 +182,7 @@ trygccoption -fno-stack-protector _CFLAGS="$_CFLAGS -include $BASE/../include/kconfig.h -include $BASE/../include/compiler.h" _CFLAGS="$_CFLAGS -I`$DEFAULT_CC $_ARCHEXTRA -print-search-dirs | head -n 1 | cut -d' ' -f2`include" -_LDFLAGS="-L$_LIBDIR $_LDSCRIPT -static" +_LDFLAGS="-L$_LIBDIR $_LDSCRIPT -static -Wl,--gc-sections" if [ $DOLINK -eq 0 ]; then if [ $DEBUGME -eq 1 ]; then -- cgit v1.2.3