[PATCH] D78711: AArch64-MachO: use linker-private symbols for jump-tables
Tim Northover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 06:59:37 PDT 2020
t.p.northover created this revision.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, mcrosier.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78711
Files:
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
llvm/lib/Target/AArch64/AArch64MCInstLower.cpp
llvm/test/CodeGen/AArch64/GlobalISel/arm64e-jump-table-hardening.ll
llvm/test/CodeGen/AArch64/arm64-jumptable.ll
llvm/test/CodeGen/AArch64/arm64e-jump-table-hardening.ll
llvm/test/CodeGen/AArch64/jump-table-32.ll
llvm/test/CodeGen/AArch64/jump-table.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78711.259552.patch
Type: text/x-patch
Size: 8028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200423/2aaa4304/attachment.bin>
More information about the llvm-commits
mailing list