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
Unknown Object (File)
Sat, Dec 21, 5:56 AM
Unknown Object (File)
Tue, Dec 10, 6:00 AM
Unknown Object (File)
Nov 4 2024, 4:57 PM
Unknown Object (File)
Sep 23 2024, 12:56 AM
Unknown Object (File)
Sep 23 2024, 12:56 AM
Unknown Object (File)
Sep 23 2024, 12:56 AM
Unknown Object (File)
Sep 23 2024, 12:56 AM
Unknown Object (File)
Sep 23 2024, 12:45 AM
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