[PATCH] D37059: [ELF] - LTO: do not optimize away symbols accessed from linkerscript.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 04:58:34 PDT 2017


grimar created this revision.
Herald added subscribers: inglorion, emaste.

Previously when BC file had global variable that was accessed from script,
it was optimized away. 
In this patch I add left side of assignment expression to list of symbols referenced
by script. That marks them used from regular objects for LTO and fixes issue observed.


https://reviews.llvm.org/D37059

Files:
  ELF/ScriptParser.cpp
  test/ELF/linkerscript/align.s
  test/ELF/linkerscript/symbols-synthetic.s
  test/ELF/lto/linker-script-symbols2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37059.112332.patch
Type: text/x-patch
Size: 5204 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170823/655d9c22/attachment.bin>


More information about the llvm-commits mailing list