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)
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
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
Subscribers

Details

Summary

This can happen when linking with upstream LLD < 9.0.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32832
Build 30243: arc lint + arc unit

Event Timeline

share/mk/bsd.linker.mk
98

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

Where does the comparison with 1300000 come from?

sys/conf/kern.pre.mk
170

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

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

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