1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/include/llvm/LTO
Teresa Johnson 411e4731ce [LTO] Prevent dead stripping and internalization of symbols with sections
Summary:
ELF linkers generate __start_<secname> and __stop_<secname> symbols
when there is a value in a section <secname> where the name is a valid
C identifier.  If dead stripping determines that the values declared
in section <secname> are dead, and we then internalize (and delete)
such a symbol, programs that reference the corresponding start and end
section symbols will get undefined reference linking errors.

To fix this, add the section name to the IRSymtab entry when a symbol is
defined in a specific section. Then use this in the gold-plugin to mark
the symbol as external and visible from outside the summary when the
section name is a valid C identifier.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, eraman, llvm-commits

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

llvm-svn: 309009
2017-07-25 19:42:32 +00:00
..
legacy Add a ThinLTO cache policy for controlling the maximum cache size in bytes. 2017-06-23 17:05:03 +00:00
Caching.h LTO: Fix a potential race condition in the caching API. 2017-03-17 00:34:07 +00:00
Config.h [ThinLTO] Move -lto-use-new-pm to llvm-lto2, and change it to -use-new-pm. 2017-06-01 23:13:44 +00:00
LTO.h [LTO] Prevent dead stripping and internalization of symbols with sections 2017-07-25 19:42:32 +00:00
LTOBackend.h IPO: Const correctness for summaries passed into passes. 2017-03-22 18:22:59 +00:00