[PATCH] D24966: [ELF] Ignore sections flagged with SHF_EXCLUDE
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 01:51:01 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282568: [ELF] Ignore sections flagged with SHF_EXCLUDE (authored by evgeny777).
Changed prior to commit:
https://reviews.llvm.org/D24966?vs=72655&id=72778#toc
Repository:
rL LLVM
https://reviews.llvm.org/D24966
Files:
lld/trunk/ELF/InputFiles.cpp
lld/trunk/test/ELF/exclude.s
Index: lld/trunk/test/ELF/exclude.s
===================================================================
--- lld/trunk/test/ELF/exclude.s
+++ lld/trunk/test/ELF/exclude.s
@@ -0,0 +1,12 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
+# RUN: ld.lld -o %t1 %t
+# RUN: llvm-objdump -section-headers %t1 | FileCheck %s
+# CHECK-NOT: .aaa
+
+.globl _start
+_start:
+ jmp _start
+
+.section .aaa,"ae"
+ .quad 0
Index: lld/trunk/ELF/InputFiles.cpp
===================================================================
--- lld/trunk/ELF/InputFiles.cpp
+++ lld/trunk/ELF/InputFiles.cpp
@@ -226,6 +226,11 @@
if (Sections[I] == &InputSection<ELFT>::Discarded)
continue;
+ if (Sec.sh_flags & SHF_EXCLUDE) {
+ Sections[I] = &InputSection<ELFT>::Discarded;
+ continue;
+ }
+
switch (Sec.sh_type) {
case SHT_GROUP:
Sections[I] = &InputSection<ELFT>::Discarded;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24966.72778.patch
Type: text/x-patch
Size: 936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160928/7480dd2b/attachment.bin>
More information about the llvm-commits
mailing list