Page MenuHomeFreeBSD

bsd.linker.mk: add retpolineplt linker feature
ClosedPublic

Authored by emaste on Feb 6 2018, 8:09 PM.

Details

Summary

This feature indicates that the linker supports generating a PLT with the retpoline speculative execution vulnerability mitigation.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Include COMPILER_FEATURES

emaste added subscribers: imp, dim.

Quote COMPILER_FEATURES for CROSSENV as it may contain spaces

This looks good to me, though at some version gcc and BFD ld will also support retpoline, right? We can add that later...

One minor quibble.

share/mk/bsd.linker.mk
76 ↗(On Diff #38977)

Are there places that LINKER_FEATURES need similar treatment?

This revision is now accepted and ready to land.Feb 6 2018, 11:03 PM
In D14228#298494, @dim wrote:

This looks good to me, though at some version gcc and BFD ld will also support retpoline, right? We can add that later...

Yes. Once the support appears in our gcc and binutils ports and we know the version we can add it.

share/mk/bsd.linker.mk
76 ↗(On Diff #38977)

I did not find cases where LINKER_FEATURES is passed through the environment

This revision was automatically updated to reflect the committed changes.