summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/LTO.cpp3
-rw-r--r--lld/test/ELF/lto/relocatable.ll9
2 files changed, 11 insertions, 1 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index ef58932e86c..cb5bb64985f 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -67,9 +67,10 @@ static std::string getThinLTOOutputFile(StringRef ModulePath) {
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;
diff --git a/lld/test/ELF/lto/relocatable.ll b/lld/test/ELF/lto/relocatable.ll
index 2ec9144a37b..5a0ed4252bf 100644
--- a/lld/test/ELF/lto/relocatable.ll
+++ b/lld/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
OpenPOWER on IntegriCloud