From 2ef28d054d89ee1bcdafc8000d7e6dba36d6642b Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Wed, 22 Dec 2021 13:35:05 +0100 Subject: [PATCH] boot: Use -fvisibility=hidden instead of -fwhole-program It's functionally the same for sd-boot, but using visibilty is generally preferred over whole-program. --- src/boot/efi/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index df866c3eb8b..cf6228e8e0c 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -225,6 +225,7 @@ efi_cflags = cc.get_supported_arguments( '-std=gnu99', '-ffreestanding', '-fshort-wchar', + '-fvisibility=hidden', '-isystem', efi_incdir, '-isystem', efi_incdir / efi_arch[1], '-I', fundamental_path, @@ -281,7 +282,7 @@ efi_ldflags = [ efi_crt0, ] if efi_arch[1] in ['aarch64', 'arm', 'riscv64'] - efi_ldflags += ['-shared', '-fwhole-program'] + efi_ldflags += ['-shared'] # Aarch64, ARM32 and 64bit RISC-V don't have an EFI capable objcopy. # Use 'binary' instead, and add required symbols manually. efi_ldflags += ['-Wl,--defsym=EFI_SUBSYSTEM=0xa'] -- 2.47.3