summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/InputSection.cpp2
-rw-r--r--lld/test/ELF/emit-relocs-icf.s33
2 files changed, 0 insertions, 35 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index f6676af36c6..f7a757eb1d7 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -789,8 +789,6 @@ void InputSection::replace(InputSection *Other) {
Alignment = std::max(Alignment, Other->Alignment);
Other->Repl = Repl;
Other->Live = false;
- for (InputSection *IS : Other->DependentSections)
- IS->Live = false;
}
template <class ELFT>
diff --git a/lld/test/ELF/emit-relocs-icf.s b/lld/test/ELF/emit-relocs-icf.s
deleted file mode 100644
index 59e003f38ea..00000000000
--- a/lld/test/ELF/emit-relocs-icf.s
+++ /dev/null
@@ -1,33 +0,0 @@
-# REQUIRES: x86
-# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
-# RUN: ld.lld --emit-relocs --icf=all %t1.o -o %t
-# RUN: llvm-readobj -r %t | FileCheck %s
-
-# CHECK: Relocations [
-# CHECK-NEXT: Section {{.*}} .rela.text {
-# CHECK-NEXT: R_X86_64_32 .text 0x1
-# CHECK-NEXT: R_X86_64_PLT32 fn 0xFFFFFFFFFFFFFFFC
-# CHECK-NEXT: }
-# CHECK-NEXT: ]
-
-.section .text.fn,"ax",@progbits,unique,0
-.globl fn
-.type fn,@function
-fn:
- nop
-
-bar:
- movl $bar, %edx
- callq fn@PLT
- nop
-
-.section .text.fn2,"ax",@progbits,unique,1
-.globl fn2
-.type fn2,@function
-fn2:
- nop
-
-foo:
- movl $foo, %edx
- callq fn2@PLT
- nop
OpenPOWER on IntegriCloud