Page MenuHomeFreeBSD

[PowerPC] Add .iplt to powerpc linker scripts
AcceptedPublic

Authored by bdragon on Dec 14 2019, 11:53 PM.
Referenced Files
Unknown Object (File)
Thu, Oct 1, 9:33 PM
Unknown Object (File)
Thu, Oct 1, 2:06 AM
Unknown Object (File)
Mon, Sep 21, 10:44 PM
Unknown Object (File)
Sun, Sep 20, 11:40 PM
Unknown Object (File)
Sun, Sep 20, 3:38 PM
Unknown Object (File)
Sep 14 2026, 1:17 AM
Unknown Object (File)
Sep 2 2026, 6:52 AM
Unknown Object (File)
Aug 27 2026, 3:15 PM

Details

Summary

In some situations, the link editor needs to generate a secondary PLT table for ifuncs, which is initialized by .rela.dyn R_PPC_IRELATIVE relocs instead of .rela.plt R_PPC_JMP_SLOT relocs.

Ensure the .iplt section is emitted to prevent future confusion when we start using ifuncs in powerpc kernels.

Noticed while discussing https://reviews.llvm.org/D71509 with meowray in IRC.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Jan 22 2020, 5:56 PM

Is this still needed? We've had ifuncs for a year now, with no problems.

It ended up being not entirely necessary due to the linker behavior of forcing required sections into whatever segment is a natural fit for them, unless we explicitly break it with /DISCARD/.