Page MenuHomePhabricator

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

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



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

Use -LABEL for the function label line


Use -NEXT: where applicable.


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


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


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