Page MenuHomeFreeBSD

[PPC64] Add ifunc support in libcsu
ClosedPublic

Authored by luporl on Jul 25 2019, 7:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 25, 10:07 PM
Unknown Object (File)
Jan 27 2024, 5:25 PM
Unknown Object (File)
Jan 27 2024, 5:25 PM
Unknown Object (File)
Jan 27 2024, 5:25 PM
Unknown Object (File)
Jan 27 2024, 5:25 PM
Unknown Object (File)
Jan 27 2024, 12:10 AM
Unknown Object (File)
Jan 14 2024, 6:03 PM
Unknown Object (File)
Dec 20 2023, 7:51 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

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.