Closed gmbr3 closed 4 months ago
I've tried this on the flatpak cross-build and get:
ld -L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed -nostdlib --warn-common --no-undefined --fatal-warnings --build-id=sha1 -z nocombreloc -z norelro -nostdlib --warn-common --no-undefined --fatal-warnings --build-id=sha1 -z nocombreloc -z norelro -shared -Bsymbolic -L/run/build/gnu-efi//apps/../x86_64/lib -L/run/build/gnu-efi//apps/../x86_64/gnuefi /run/build/gnu-efi//apps/../x86_64/gnuefi/crt0-efi-x86_64.o t.o -o t.so -lefi -lgnuefi /usr/lib/gcc/x86_64-unknown-linux-gnu/13.2.0/libgcc.a -T /run/build/gnu-efi//apps/../gnuefi/elf_x86_64_efi.lds
ld: unrecognized option '-Wl,-z,relro,-z,now'
I've tried this on the flatpak cross-build and get:
ld -L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed -nostdlib --warn-common --no-undefined --fatal-warnings --build-id=sha1 -z nocombreloc -z norelro -nostdlib --warn-common --no-undefined --fatal-warnings --build-id=sha1 -z nocombreloc -z norelro -shared -Bsymbolic -L/run/build/gnu-efi//apps/../x86_64/lib -L/run/build/gnu-efi//apps/../x86_64/gnuefi /run/build/gnu-efi//apps/../x86_64/gnuefi/crt0-efi-x86_64.o t.o -o t.so -lefi -lgnuefi /usr/lib/gcc/x86_64-unknown-linux-gnu/13.2.0/libgcc.a -T /run/build/gnu-efi//apps/../gnuefi/elf_x86_64_efi.lds
ld: unrecognized option '-Wl,-z,relro,-z,now'
Removing RELRO would break NOW aswell, I presume LD means you have conflicting options not that it doesn't know . Any idea where these options are coming from?? Flatpak defaults??
Flatpak defaults??
Yup, you're completely correct -- it's from /etc/flatpak-builder/defaults.json -- opting out of that and with your patch it builds wonderfully. Thanks!
No point having PT_GNU_RELRO as ELF data won't exist when merging into PE32+ file
Unbreaks lld usage which complains about linker script Fixes ncroxon/gnu-efi#4