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
F165361151: D13941.id38065.diff
Fri, Aug 7, 8:17 PM
F165227543: D13941.diff
Fri, Aug 7, 12:11 AM
Unknown Object (File)
Thu, Aug 6, 6:34 AM
Unknown Object (File)
Wed, Aug 5, 4:57 AM
Unknown Object (File)
Jul 7 2026, 4:38 AM
Unknown Object (File)
Jul 3 2026, 5:59 AM
Unknown Object (File)
May 26 2026, 11:51 PM
Unknown Object (File)
May 19 2026, 8:21 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.