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
F176495154: D13941.id.diff
Mon, Oct 19, 7:47 AM
F176495146: D13941.id38065.diff
Mon, Oct 19, 7:47 AM
F176495142: D13941.diff
Mon, Oct 19, 7:47 AM
Unknown Object (File)
Fri, Oct 16, 8:37 PM
Unknown Object (File)
Tue, Oct 13, 2:32 PM
Unknown Object (File)
Wed, Oct 7, 9:04 PM
Unknown Object (File)
Thu, Oct 1, 9:09 PM
Unknown Object (File)
Sun, Sep 27, 4:38 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.