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)
Sun, Sep 6, 8:14 AM
Unknown Object (File)
Sat, Sep 5, 1:58 AM
Unknown Object (File)
Fri, Sep 4, 1:55 PM
Unknown Object (File)
Fri, Sep 4, 10:44 AM
Unknown Object (File)
Wed, Sep 2, 11:04 AM
Unknown Object (File)
Wed, Sep 2, 10:40 AM
Unknown Object (File)
Aug 13 2026, 1:11 PM
Unknown Object (File)
Aug 12 2026, 9:58 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.