[PATCH] D99613: [lld-link] Enable addrsig table in COFF lto

Zequan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 11:04:01 PDT 2021


zequanwu created this revision.
zequanwu added a reviewer: rnk.
Herald added subscribers: steven_wu, hiraditya, inglorion.
zequanwu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This allow safe-icf mode to work when linking with LTO.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99613

Files:
  lld/COFF/LTO.cpp


Index: lld/COFF/LTO.cpp
===================================================================
--- lld/COFF/LTO.cpp
+++ lld/COFF/LTO.cpp
@@ -62,6 +62,7 @@
 static lto::Config createConfig() {
   lto::Config c;
   c.Options = initTargetOptionsFromCodeGenFlags();
+  c.Options.EmitAddrsig = true;
 
   // Always emit a section per function/datum with LTO. LLVM LTO should get most
   // of the benefit of linker GC, but there are still opportunities for ICF.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99613.334232.patch
Type: text/x-patch
Size: 454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210330/82c4aa14/attachment.bin>


More information about the llvm-commits mailing list