diff options
Diffstat (limited to 'llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test')
| -rw-r--r-- | llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test b/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test new file mode 100644 index 00000000000..05e1acf6b1d --- /dev/null +++ b/llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test @@ -0,0 +1,27 @@ +# RUN: yaml2obj %s > %t +# RUN: not llvm-objcopy --discard-locals %t %t2 2>&1 | FileCheck %s + +!ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .text + Type: SHT_PROGBITS + - Name: .rel.text + Type: SHT_REL + Link: .symtab + Info: .text + Relocations: + - Offset: 0x1000 + Symbol: .L.rel + Type: R_X86_64_PC32 +Symbols: + Local: + - Name: .L.rel + Type: STT_FUNC + Section: .text + +# CHECK: not stripping symbol '.L.rel' because it is named in a relocation. |

