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)
Feb 24 2024, 2:10 PM
Unknown Object (File)
Dec 20 2023, 4:04 AM
Unknown Object (File)
Oct 27 2023, 2:54 AM
Unknown Object (File)
Oct 20 2023, 10:00 AM
Unknown Object (File)
Oct 19 2023, 3:38 AM
Unknown Object (File)
Aug 25 2023, 1:38 PM
Unknown Object (File)
Jul 4 2023, 7:16 AM
Unknown Object (File)
Jun 30 2023, 6:51 PM
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.