[lld] r325878 - [ELF] - Revert r325877 "[ELF] - Do not crash with --emit-relocs and --icf=all together."

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 02:30:31 PST 2018


Author: grimar
Date: Fri Feb 23 02:30:31 2018
New Revision: 325878

URL: http://llvm.org/viewvc/llvm-project?rev=325878&view=rev
Log:
[ELF] - Revert r325877 "[ELF] - Do not crash with --emit-relocs and --icf=all together."

Not latest version of patch was committed by mistake.


Removed:
    lld/trunk/test/ELF/emit-relocs-icf.s
Modified:
    lld/trunk/ELF/InputSection.cpp

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=325878&r1=325877&r2=325878&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Fri Feb 23 02:30:31 2018
@@ -789,8 +789,6 @@ void InputSection::replace(InputSection
   Alignment = std::max(Alignment, Other->Alignment);
   Other->Repl = Repl;
   Other->Live = false;
-  for (InputSection *IS : Other->DependentSections)
-    IS->Live = false;
 }
 
 template <class ELFT>

Removed: lld/trunk/test/ELF/emit-relocs-icf.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/emit-relocs-icf.s?rev=325877&view=auto
==============================================================================
--- lld/trunk/test/ELF/emit-relocs-icf.s (original)
+++ lld/trunk/test/ELF/emit-relocs-icf.s (removed)
@@ -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", at progbits,unique,0
-.globl fn
-.type fn, at function
-fn:
- nop
-
-bar:
-  movl $bar, %edx
-  callq fn at PLT
-  nop
-
-.section .text.fn2,"ax", at progbits,unique,1
-.globl fn2
-.type fn2, at function
-fn2:
- nop
-
-foo:
-  movl $foo, %edx
-  callq fn2 at PLT
-  nop




More information about the llvm-commits mailing list