summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2022-02-22 02:08:11 +0100
committerNico Huber <nico.h@gmx.de>2022-02-23 22:47:24 +0000
commit47722cfe554dc9f1f9ca56a88c57a283357f71ce (patch)
tree9ad3d4906b34a64db8e076acd1ea80dd3998f45c
parent4fa9f2ae8bfe9260afa5f8e1880f430e551ff7c0 (diff)
downloadcoreboot-47722cfe554dc9f1f9ca56a88c57a283357f71ce.tar.gz
coreboot-47722cfe554dc9f1f9ca56a88c57a283357f71ce.tar.bz2
coreboot-47722cfe554dc9f1f9ca56a88c57a283357f71ce.zip
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 <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62247 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
-rwxr-xr-xpayloads/libpayload/bin/lpgcc2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 2ad9ef525a88..8bc46a6580b7 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