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)
Tue, May 26, 11:51 PM
Unknown Object (File)
May 19 2026, 8:21 AM
Unknown Object (File)
May 18 2026, 3:27 PM
Unknown Object (File)
Apr 20 2026, 2:05 PM
Unknown Object (File)
Apr 19 2026, 3:18 AM
Unknown Object (File)
Apr 17 2026, 2:25 AM
Unknown Object (File)
Apr 17 2026, 2:18 AM
Unknown Object (File)
Apr 11 2026, 4: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.