Page MenuHomeFreeBSD

stand: use -z norelro when linking EFI components
Needs ReviewPublic

Authored by emaste on Jan 16 2018, 9:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 8, 7:42 AM
Unknown Object (File)
Jan 17 2025, 7:35 PM
Unknown Object (File)
Jan 15 2025, 5:07 PM
Unknown Object (File)
Jan 4 2025, 7:55 AM
Unknown Object (File)
Dec 8 2024, 10:11 AM
Unknown Object (File)
Sep 21 2024, 10:08 PM
Unknown Object (File)
Sep 21 2024, 3:51 PM
Unknown Object (File)
Sep 21 2024, 2:26 AM
Subscribers
None

Details

Summary

Linking armv7 EFI components with lld as the linker failed with:
ld: error: section: .dynamic is not contiguous with other relro sections

ld.bfd defaults to having relro off. explicitly set -z norelro to turn it off for ld.lld as well, since relro is meaningless in our EFI context anyway.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

stand/efi/boot1/Makefile
63

any reason these lines can't be hoisted to stand/efi/Makefile.inc?

If the root cause is addressed by D13942 we could abandon this change, even though I think it doesn't hurt to have this in.