Page MenuHomeFreeBSD

[PPC64] Add ifunc support in libcsu
ClosedPublic

Authored by luporl on Jul 25 2019, 7:53 PM.
Tags
None
Referenced Files
F106415391: D21070.diff
Mon, Dec 30, 9:04 AM
Unknown Object (File)
Sun, Dec 22, 3:00 AM
Unknown Object (File)
Sat, Dec 21, 8:16 AM
Unknown Object (File)
Sat, Dec 21, 8:02 AM
Unknown Object (File)
Sun, Dec 8, 12:02 PM
Unknown Object (File)
Nov 25 2024, 2:37 AM
Unknown Object (File)
Nov 24 2024, 7:41 AM
Unknown Object (File)
Nov 22 2024, 10:43 AM
Subscribers

Details

Summary

When ifuncs are used in statically linked binaries, the C runtime
must perform the needed dynamic relocations, to make calls to ifuncs
work correctly.

The plan is to land this together with ifunc support in rtld, right after
the switch to ELFv2 ABI.

Diff Detail

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

Event Timeline

sys/sys/elf_common.h
1223 ↗(On Diff #60147)

As an aside -- This line is needed for pretty much everything ifunc related kernel and user, I think it should be a priority to get this oneliner in just so it doesn't have to get duplicated between diffs doing different parts of the ifunc work.

sys/sys/elf_common.h
1223 ↗(On Diff #60147)

jhibbits pointed out in IRC that there should also be #define R_PPC_IRELATIVE 248 in the previous block.

sys/sys/elf_common.h
1223 ↗(On Diff #60147)

Correction, it should be named R_PPC_IRELATIVE in the first place instead of being duplicated. as per the convention in this file of using the R_PPC prefix for relocations that aren't unique to PPC64.

sys/sys/elf_common.h
1223 ↗(On Diff #60147)

Ok, so you suggest moving this change to a separate revision, right? And also change R_PPC64_IRELATIVE to R_PPC_IRELATIVE, correct?

sys/sys/elf_common.h
1223 ↗(On Diff #60147)

Yep, precisely.

  • Separate elf_common.h change
  • Change R_PPC64_IRELATIVE to R_PPC_IRELATIVE in code

This should be able to go in before flag day, there's nothing preventing it from working (we don't need linker support just for this, it's all in code).

This revision is now accepted and ready to land.Sep 12 2019, 3:03 PM
This revision was automatically updated to reflect the committed changes.