Page MenuHomeFreeBSD

Allow linking the kernel with a linker that doesn't support -z ifunc-noplt
ClosedPublic

Authored by arichardson on Aug 7 2020, 11:21 AM.
Tags
None
Referenced Files
F86143032: D25985.id75688.diff
Sun, Jun 16, 1:56 AM
F86142910: D25985.id75550.diff
Sun, Jun 16, 1:53 AM
Unknown Object (File)
Fri, May 24, 4:09 AM
Unknown Object (File)
Mon, May 20, 12:59 AM
Unknown Object (File)
Mon, May 20, 12:59 AM
Unknown Object (File)
Sun, May 19, 9:24 PM
Unknown Object (File)
Sun, May 19, 9:24 PM
Unknown Object (File)
Sun, May 19, 7:34 PM
Subscribers

Details

Summary

This can happen when linking with upstream LLD < 9.0.

Diff Detail

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

Event Timeline

share/mk/bsd.linker.mk
98 ↗(On Diff #75550)

Could probably drop the LINKER_FREEBSD_VERSION check if we assume that all lld's older than 9.0 build from the source tree have the patch applied.

share/mk/bsd.linker.mk
98 ↗(On Diff #75550)

Where does the comparison with 1300000 come from?

sys/conf/kern.pre.mk
170 ↗(On Diff #75550)

I would tone down the warning a bit, it's not a major optimization. Maybe something like, "ifunc calls are unoptimized".

share/mk/bsd.linker.mk
98 ↗(On Diff #75550)

I believe the patch was added after 13 branched? Although it looks like I have an additional zero there.

sys/conf/kern.pre.mk
170 ↗(On Diff #75550)

will do in next version

  • drop LINKER_FREEBSD_VERSION check, checking for lld > 9.0 is enough
  • change warning message
This revision is now accepted and ready to land.Aug 11 2020, 3:18 PM