[PATCH] D54871: [ELF] Allow discarding of .rela.plt

Martell Malone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 4 04:40:53 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD348258: [ELF] Allow discarding of .rela.plt (authored by martell, committed by ).

Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54871/new/

https://reviews.llvm.org/D54871

Files:
  ELF/LinkerScript.cpp
  test/ELF/linkerscript/discard-section-err.s


Index: test/ELF/linkerscript/discard-section-err.s
===================================================================
--- test/ELF/linkerscript/discard-section-err.s
+++ test/ELF/linkerscript/discard-section-err.s
@@ -22,11 +22,6 @@
 # RUN:   FileCheck -check-prefix=DYNSTR %s
 # DYNSTR: discarding .dynstr section is not allowed
 
-# RUN: echo "SECTIONS { /DISCARD/ : { *(.rela.plt) } }" > %t.script
-# RUN: not ld.lld -pie -o %t --script %t.script %t.o 2>&1 | \
-# RUN:   FileCheck -check-prefix=RELAPLT %s
-# RELAPLT: discarding .rela.plt section is not allowed
-
 # RUN: echo "SECTIONS { /DISCARD/ : { *(.rela.dyn) } }" > %t.script
 # RUN: not ld.lld -pie -o %t --script %t.script %t.o 2>&1 | \
 # RUN:   FileCheck -check-prefix=RELADYN %s
Index: ELF/LinkerScript.cpp
===================================================================
--- ELF/LinkerScript.cpp
+++ ELF/LinkerScript.cpp
@@ -416,8 +416,7 @@
 void LinkerScript::discard(ArrayRef<InputSection *> V) {
   for (InputSection *S : V) {
     if (S == In.ShStrTab || S == In.Dynamic || S == In.DynSymTab ||
-        S == In.DynStrTab || S == In.RelaPlt || S == In.RelaDyn ||
-        S == In.RelrDyn)
+        S == In.DynStrTab || S == In.RelaDyn || S == In.RelrDyn)
       error("discarding " + S->Name + " section is not allowed");
 
     // You can discard .hash and .gnu.hash sections by linker scripts. Since


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54871.176602.patch
Type: text/x-patch
Size: 1376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181204/e029d711/attachment.bin>


More information about the llvm-commits mailing list