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)
Nov 20 2025, 10:56 PM
Unknown Object (File)
Nov 20 2025, 10:01 PM
Unknown Object (File)
Nov 20 2025, 9:52 PM
Unknown Object (File)
Nov 12 2025, 4:38 AM
Unknown Object (File)
Oct 27 2025, 4:33 PM
Unknown Object (File)
Oct 27 2025, 8:39 AM
Unknown Object (File)
Oct 18 2025, 1:47 AM
Unknown Object (File)
Oct 14 2025, 7:00 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.