]> granicus.if.org Git - llvm/commit
Ensure that prefix data is preserved with subsections-via-symbols
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 15 Mar 2017 04:18:16 +0000 (04:18 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 15 Mar 2017 04:18:16 +0000 (04:18 +0000)
commitc7a57cdda643e397720daa35ea3b1c4b7ce42371
tree4d1934d5c36a7c61a95b351fe2d4b315832e2d06
parent3785710791bc2d317f6bf88ab524583b30808be3
Ensure that prefix data is preserved with subsections-via-symbols

On MachO platforms that use subsections-via-symbols dead code stripping will
drop prefix data. Unfortunately there is no great way to convey the relationship
between a function and its prefix data to the linker. We are forced to use a bit
of a hack: we give the prefix data it’s own symbol, and mark the actual function
entry an .alt_entry.

Patch by Moritz Angermann!

Differential Revision: https://reviews.llvm.org/D30770

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297804 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
test/CodeGen/AArch64/prefixdata.ll [new file with mode: 0644]
test/CodeGen/X86/prefixdata.ll