Page MenuHomeFreeBSD

stand/i386: pass --no-rosegment when linking with lld
ClosedPublic

Authored by emaste on Apr 3 2018, 8:16 PM.
Tags
None
Referenced Files
F135550985: D14956.id41049.diff
Mon, Nov 10, 6:09 PM
F135523112: D14956.id41165.diff
Mon, Nov 10, 12:57 PM
F135507539: D14956.id.diff
Mon, Nov 10, 10:02 AM
F135498609: D14956.id41049.diff
Mon, Nov 10, 8:27 AM
F135475725: D14956.diff
Mon, Nov 10, 4:29 AM
F135466967: D14956.diff
Mon, Nov 10, 2:48 AM
F135460025: D14956.id41049.diff
Mon, Nov 10, 1:24 AM
Unknown Object (File)
Sun, Nov 9, 12:27 AM
Subscribers

Details

Summary

btxld does not correctly handle input with other than 2 PT_LOAD segments. Passing --no-rosegment lets lld produce output equivalent to ld.bfd: 2 PT_LOAD segments and no PT_GNU_RELRO.

PR: 225775

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste added a subscriber: bdrewery.
stand/i386/Makefile.inc
9 ↗(On Diff #41049)

Do you need defined(LINKER_TYPE)?

stand/i386/Makefile.inc
9 ↗(On Diff #41049)

I believe make(1) will complain about a malformed conditional without it, as unfriendly as that is.

stand/i386/Makefile.inc
9 ↗(On Diff #41049)

It's a concession to people (e.g., bde) who might build these bits outside of buildworld - the idea being that the .sinclude means there will be no failure if bsd.linker.mk is not found, and in that case LINKER_TYPE will not be defined.

If we don't need to support that case we can replace the .sinclude with .include and drop the defined (LINKER_TYPE) && bit.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 6 2018, 2:58 AM
This revision was automatically updated to reflect the committed changes.