]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Use -fvisibility=hidden instead of -fwhole-program
authorJan Janssen <medhefgo@web.de>
Wed, 22 Dec 2021 12:35:05 +0000 (13:35 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Dec 2021 15:26:25 +0000 (00:26 +0900)
It's functionally the same for sd-boot, but using visibilty
is generally preferred over whole-program.

src/boot/efi/meson.build

index df866c3eb8b4623d57ed8a179acc2bf79147c749..cf6228e8e0c638c9c9bca9ce19efa5c49e70f9b0 100644 (file)
@@ -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']