[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1013341: /usr/bin/ld.bfd: warning: /usr/lib/crt0-efi-x86_64.o: missing .note.GNU-stack section implies executable stack



On Wed, Jun 22, 2022 at 10:50:48AM +0200, Michael Biebl wrote:
> Package: gnu-efi
> Version: 3.0.13+git20210716.269ef9d-2
> Severity: serious
> Forwarded: https://sourceforge.net/p/gnu-efi/bugs/28/
> 
> Hi,
> 
> since the latest update of binutils to 2.38.50.20220615,
> the systemd source package fails to build:
> 
> ```
> $ ninja -C build/
> ninja: Entering directory `build/'
> [72/2108] Generating src/boot/efi/linuxx64.elf.stub with a custom command
> FAILED: src/boot/efi/linuxx64.elf.stub
> /usr/bin/cc -o src/boot/efi/linuxx64.elf.stub -DGNU_EFI_USE_MS_ABI -DSD_BOOT -ffreestanding -fshort-wchar -fvisibility=hidden -I /home/michael/git/systemd/src/fundamental -I /home/michael/git/systemd/src/boot/efi -include src/boot/efi/efi_config.h -include version.h -isystem /usr/include/efi/x86_64 -isystem /usr/include/efi -std=gnu11 -Wall -Wextra -Wno-format-signedness -Wno-missing-field-initializers -Wno-unused-parameter -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wno-unused-result -fno-stack-protector -fno-strict-aliasing -fpic -fwide-exec-charset=UCS2 -mno-red-zone -mno-sse -mno-mmx -ggdb -DEFI_DEBUG -fuse-ld=bfd -L /usr/lib -nostdlib -T /usr/lib/elf_x86_64_efi.lds -Wl,--build-id=sha1 -Wl,--fatal-warnings -Wl,--no-undefined -Wl,--warn-common -Wl,-Bsymbolic -z nocombreloc /usr/lib/crt0-efi-x86_64.o -pie -Wl,--no-dynamic-linker src/boot/efi/bootspec-fundamental.c.o src/boot/efi/efivars-fundamental.c.o src/boot/efi/sha256.c.o src/boot/efi/string-util-fundamental.c.o src/boot/efi/assert.c.o src/boot/efi/devicetree.c.o src/boot/efi/disk.c.o src/boot/efi/efi-string.c.o src/boot/efi/graphics.c.o src/boot/efi/initrd.c.o src/boot/efi/measure.c.o src/boot/efi/pe.c.o src/boot/efi/secure-boot.c.o src/boot/efi/ticks.c.o src/boot/efi/util.c.o src/boot/efi/cpio.c.o src/boot/efi/splash.c.o src/boot/efi/stub.c.o src/boot/efi/linux_x86.c.o -lefi -lgnuefi -lgcc
> /usr/bin/ld.bfd: warning: /usr/lib/crt0-efi-x86_64.o: missing .note.GNU-stack section implies executable stack
> /usr/bin/ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> collect2: error: ld returned 1 exit status
> [77/2108] Generating catalog/systemd.ru.catalog with a custom command (wrapped by meson to capture output)
> ninja: build stopped: subcommand failed.
> ```
> 
> I originally raised this at systemd upstream [1], but it was mentioned
> there, that this might actually be a gnu-efi issue.
> [1] also contains links to the relevant changes in binutils which now
> trigger this warning.
> 
> Marking as RC, as it causes a FTBFS
> 
Not using -Wl,--fatal-warnings might be a workaround for systemd until
gnu-efi fixes this?

Cheers,
Julien


Reply to: