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)
Thu, Aug 13, 1:11 PM
Unknown Object (File)
Wed, Aug 12, 9:58 AM
Unknown Object (File)
Tue, Aug 11, 11:25 PM
Unknown Object (File)
Tue, Aug 11, 11:19 PM
Unknown Object (File)
Sun, Aug 9, 11:05 PM
Unknown Object (File)
Fri, Aug 7, 8:17 PM
Unknown Object (File)
Fri, Aug 7, 12:11 AM
Unknown Object (File)
Thu, Aug 6, 6:34 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.