This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][LLD] Make sure that the correct Thunks are used.
ClosedPublic

Authored by stefanp on May 4 2021, 7:49 AM.

Details

Summary

This fixes an issue where mixed TOC / NOTOC calls can call the incorrect
thunks if a previous thunk already exists. The issue appears when a TOC
funciton calls a NOTOC callee and then a different NOTOC function calls the same
NOTOC callee. In this case the linker would sometimes incorrectly call the
same thunk for both cases.

Diff Detail

Event Timeline

stefanp created this revision.May 4 2021, 7:49 AM
stefanp requested review of this revision.May 4 2021, 7:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2021, 7:49 AM
stefanp added a reviewer: Restricted Project.May 4 2021, 7:50 AM
MaskRay added inline comments.May 4 2021, 12:50 PM
lld/test/ELF/ppc64-pcrel-cross-link.s
19

Use -LABEL for the function label line

23

Use -NEXT: where applicable.

91

Name assembly files *.s and object files *.o

142

Delete trailing empty lines

stefanp updated this revision to Diff 343175.May 5 2021, 1:51 PM

Cleanup of test case.

Added *.s to assembly files.
Added -LABEL and -NEXT to checks.
Removed empty line at end of test.

MaskRay accepted this revision.May 5 2021, 4:52 PM

Thanks!

This revision is now accepted and ready to land.May 5 2021, 4:52 PM