[PATCH] D50221: ELF: Enable address-significance tables during LTO.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 6 13:12:47 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD339050: ELF: Enable address-significance tables during LTO. (authored by pcc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D50221?vs=158907&id=159376#toc

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50221

Files:
  ELF/LTO.cpp
  test/ELF/lto/relocatable.ll


Index: test/ELF/lto/relocatable.ll
===================================================================
--- test/ELF/lto/relocatable.ll
+++ test/ELF/lto/relocatable.ll
@@ -41,6 +41,15 @@
 ; CHECK-NEXT:     Section: .text.foo
 ; CHECK-NEXT:   }
 ; CHECK-NEXT:   Symbol {
+; CHECK-NEXT:     Name:
+; CHECK-NEXT:     Value: 0x0
+; CHECK-NEXT:     Size: 0
+; CHECK-NEXT:     Binding: Local
+; CHECK-NEXT:     Type: Section
+; CHECK-NEXT:     Other: 0
+; CHECK-NEXT:     Section: .llvm_addrsig
+; CHECK-NEXT:   }
+; CHECK-NEXT:   Symbol {
 ; CHECK-NEXT:     Name: foo
 ; CHECK-NEXT:     Value: 0x0
 ; CHECK-NEXT:     Size: 1
Index: ELF/LTO.cpp
===================================================================
--- ELF/LTO.cpp
+++ ELF/LTO.cpp
@@ -67,9 +67,10 @@
 static lto::Config createConfig() {
   lto::Config C;
 
-  // LLD supports the new relocations.
+  // LLD supports the new relocations and address-significance tables.
   C.Options = InitTargetOptionsFromCodeGenFlags();
   C.Options.RelaxELFRelocations = true;
+  C.Options.EmitAddrsig = true;
 
   // Always emit a section per function/datum with LTO.
   C.Options.FunctionSections = true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50221.159376.patch
Type: text/x-patch
Size: 1149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180806/52b20528/attachment.bin>


More information about the llvm-commits mailing list