diff options
author | George Rimar <grimar@accesssoftek.com> | 2018-12-10 09:24:49 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2018-12-10 09:24:49 +0000 |
commit | d37aa05d4433830d4f1b22b5a600c5bc04e0c1ea (patch) | |
tree | a6feb8ecd215682b57fbb35dceb95db95a3a4b57 /lld/test | |
parent | b827cb61df9f60bda803337106f78ef1909a8c5c (diff) |
[LLD][ELF] - Support discarding the .dynamic section.
This is a part of https://bugs.llvm.org/show_bug.cgi?id=39810.
Seems it turns out that supporting /DISCARD/ for the .dynamic section with the
linker script is something we can do easily. The patch does this.
Differential revision: https://reviews.llvm.org/D55211
Diffstat (limited to 'lld/test')
-rw-r--r-- | lld/test/ELF/linkerscript/discard-section-err.s | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/test/ELF/linkerscript/discard-section-err.s b/lld/test/ELF/linkerscript/discard-section-err.s index 82105b514a1..bb77dbb087d 100644 --- a/lld/test/ELF/linkerscript/discard-section-err.s +++ b/lld/test/ELF/linkerscript/discard-section-err.s @@ -7,10 +7,9 @@ # RUN: FileCheck -check-prefix=SHSTRTAB %s # SHSTRTAB: discarding .shstrtab section is not allowed +## We allow discarding .dynamic, check we don't crash. # RUN: echo "SECTIONS { /DISCARD/ : { *(.dynamic) } }" > %t.script -# RUN: not ld.lld -pie -o %t --script %t.script %t.o 2>&1 | \ -# RUN: FileCheck -check-prefix=DYNAMIC %s -# DYNAMIC: discarding .dynamic section is not allowed +# RUN: ld.lld -pie -o %t --script %t.script %t.o ## We allow discarding .dynsym, check we don't crash. # RUN: echo "SECTIONS { /DISCARD/ : { *(.dynsym) } }" > %t.script |