Page MenuHomeFreeBSD

Enable -zifunc-noplt on i386 and amd64.
ClosedPublic

Authored by markj on Aug 16 2018, 4:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 24 2024, 1:26 PM
Unknown Object (File)
Oct 24 2024, 1:26 PM
Unknown Object (File)
Oct 24 2024, 1:25 PM
Unknown Object (File)
Oct 24 2024, 1:25 PM
Unknown Object (File)
Oct 24 2024, 1:09 PM
Unknown Object (File)
Oct 17 2024, 9:00 PM
Unknown Object (File)
Sep 17 2024, 6:34 PM
Unknown Object (File)
Sep 7 2024, 5:40 AM
Subscribers

Diff Detail

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

Event Timeline

sys/conf/kern.pre.mk
123 ↗(On Diff #46785)

aside, I need to add "i386" here before @kib adds i386 ifunc

135 ↗(On Diff #46785)

I wonder if we should add a ifunc-noplt to LINKER_FEATURES? ld.bfd will silently ignore the unknown -z option and not use the the optimization, but upstream lld 7 will fail.

Hrm, I'm not quite sure how we'd test for our lld 7 vs upstream lld 7 though. I guess we just punt on it.

sys/conf/kern.pre.mk
135 ↗(On Diff #46785)

Hrmm. Yeah, I don't see a good way to handle this. Hopefully I can get it upstreamed quickly and this will mostly be a non-issue. Do you think it's worth adding a src.conf option or so, so that users can explicitly disable this if they want to use upstream lld?

sys/conf/kern.pre.mk
135 ↗(On Diff #46785)

I think it's not worth worrying about - let's just try to upstream it as soon as we can.

emaste added inline comments.
sys/conf/kern.pre.mk
135 ↗(On Diff #46785)

although -Wl,z ifunc-noplt seems odd (despite a similar example above), should be -Wl,-z,ifunc-noplt

This revision is now accepted and ready to land.Aug 16 2018, 9:59 PM
markj marked an inline comment as done.
  • Add missing comma.
This revision now requires review to proceed.Aug 16 2018, 11:00 PM
sys/conf/kern.pre.mk
135 ↗(On Diff #46785)

I do think LINKER_FEATURES would be the cleanest way to handle this if it isn't hard to detect lld with this change vs lld without.

sys/conf/kern.pre.mk
133 ↗(On Diff #46808)

Really, this means that we should be specifying "-z notext".

This revision was not accepted when it landed; it landed in state Needs Review.Aug 23 2018, 7:58 PM
This revision was automatically updated to reflect the committed changes.