Page MenuHomeFreeBSD

link_elf_obj: Process global ifunc relocs after other global relocs
ClosedPublic

Authored by markj on Nov 25 2021, 6:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 10:33 PM
Unknown Object (File)
Dec 9 2023, 7:22 PM
Unknown Object (File)
Dec 9 2023, 10:09 AM
Unknown Object (File)
Nov 23 2023, 3:55 PM
Unknown Object (File)
Nov 19 2023, 8:54 AM
Unknown Object (File)
Nov 19 2023, 3:58 AM
Unknown Object (File)
Nov 17 2023, 7:08 AM
Unknown Object (File)
Nov 17 2023, 4:37 AM
Subscribers

Details

Summary

This is needed to ensure that resolvers that reference global symbols
return correct results.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42974
Build 39862: arc lint + arc unit

Event Timeline

markj requested review of this revision.Nov 25 2021, 6:53 PM

This is definitely an improvement because before, global ifunc symbols were not resolved at all.

But ultimately, it does not matter if the symbol is global or not, ifuncs generally should be processed after other types of relocations, global or local.

This revision is now accepted and ready to land.Nov 25 2021, 7:32 PM
In D33120#748480, @kib wrote:

This is definitely an improvement because before, global ifunc symbols were not resolved at all.

But ultimately, it does not matter if the symbol is global or not, ifuncs generally should be processed after other types of relocations, global or local.

In fact, this is now what happens in practice. We relocate local !ifunc symbol references first, then global (now separate passes for ifuncs), then local ifuncs. I'm not sure why it's split out that way. Perhaps we could at least combine the ifunc passes, but I would defer it to a separate patch.