This is an archive of the discontinued LLVM Phabricator instance.

AArch64-MachO: use linker-private symbols for jump-tables
Needs ReviewPublic

Authored by t.p.northover on Apr 23 2020, 6:54 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This kind of kills two birds with one stone:

When they are in __TEXT,__const the separate symbols surviving to link stage allow the linker to split and separately dead-code eliminate any orphaned tables (if the functions are not called for example).

When they are at the end of a huge function, we still produce relocations for some reason (could probably be fixed) but MachO only allows 24-bit signed addends so these can be incorrect. Switching to linker-private means the relocations will be against that linker symbol rather than the start of the function and have no addend. Everything will work.

Diff Detail

Event Timeline

t.p.northover created this revision.Apr 23 2020, 6:54 AM