1 ## Here we want to check that llvm-objcopy removes an undefined symbol
2 ## if all references to it have been stripped.
4 # RUN: yaml2obj --docnum=1 %s -o %t.o
5 # RUN: llvm-objcopy -j .other.section %t.o %t2.o
6 # RUN: llvm-readobj --symbols %t2.o | FileCheck %s --implicit-check-not=bar
8 # RUN: llvm-objcopy -j .text -j .rela.text1 %t.o %t2.o
9 # RUN: llvm-readobj --symbols %t2.o | FileCheck %s --check-prefix=BAR
25 - Offset: 0x0000000000000001
31 - Offset: 0x0000000000000001
34 - Name: .other.section
41 ## Check we remove unreferenced undefined symbols, even if
42 ## they weren't previously referenced. This follows GNU.
44 # RUN: yaml2obj --docnum=2 %s -o %t.o
45 # RUN: llvm-objcopy -j .keep_me %t.o %t2.o
46 # RUN: llvm-readobj --symbols %t2.o | FileCheck %s --implicit-check-not=bar