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)
Fri, May 10, 2:36 AM
Unknown Object (File)
Jan 18 2024, 12:22 AM
Unknown Object (File)
Dec 20 2023, 8:03 AM
Unknown Object (File)
Nov 27 2023, 6:04 PM
Unknown Object (File)
Sep 14 2023, 7:02 PM
Unknown Object (File)
Aug 1 2023, 3:34 PM
Unknown Object (File)
Aug 1 2023, 3:31 PM
Unknown Object (File)
Aug 1 2023, 3:31 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