Page MenuHomeFreeBSD

[PPC64] Add ifunc support in libcsu
ClosedPublic

Authored by luporl on Jul 25 2019, 7:53 PM.
Tags
None
Referenced Files
F105828214: D21070.id61989.diff
Sat, Dec 21, 8:16 AM
F105827601: D21070.id60147.diff
Sat, Dec 21, 8:02 AM
Unknown Object (File)
Sun, Dec 8, 12:02 PM
Unknown Object (File)
Mon, Nov 25, 2:37 AM
Unknown Object (File)
Sun, Nov 24, 7:41 AM
Unknown Object (File)
Fri, Nov 22, 10:43 AM
Unknown Object (File)
Thu, Nov 21, 6:05 PM
Unknown Object (File)
Thu, Nov 21, 1:53 PM
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25510
Build 24128: arc lint + arc unit

Event Timeline

sys/sys/elf_common.h
1223

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

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

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

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

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.