This is an archive of the discontinued LLVM Phabricator instance.

RuntimeDyldELF: Clear GOTOffsetMap when resetting GOT section
ClosedPublic

Authored by gmarkall on Mar 27 2023, 2:14 AM.

Details

Summary

When the GOT section ID is reset, the GOTOffsetMap must also be cleared,
otherwise spurious matches can be located when handling GOT relocations
in subsequently-linked objects.

Fixes Issue #61402 - see https://github.com/llvm/llvm-project/issues/61402.

Diff Detail

Event Timeline

gmarkall created this revision.Mar 27 2023, 2:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2023, 2:14 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
gmarkall requested review of this revision.Mar 27 2023, 2:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2023, 2:14 AM
lhames accepted this revision.Mar 30 2023, 10:18 AM

Finally got a chance to test this out. LGTM.

@gmarkall Do you have commit access? If not I can commit on your behalf, just let me know what name and email address you'd like me to use for attribution.

This revision is now accepted and ready to land.Mar 30 2023, 10:18 AM

@lhames Many thanks for the review! I don't have commit access - if you could use the email address "Graham Markall <gmarkall@nvidia.com>", that would be great - many thanks!

This revision was landed with ongoing or failed builds.Apr 3 2023, 11:37 AM
This revision was automatically updated to reflect the committed changes.

Done. Thanks again @gmarkall!