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
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
11 # CHECK-NOT: Name: bar
26 - Offset: 0x0000000000000001
32 - Offset: 0x0000000000000001
35 - Name: .other.section
42 ## Check we remove unreferenced undefined symbols, even if
43 ## they weren't previously referenced. This follows GNU.
45 # RUN: yaml2obj --docnum=2 %s -o %t.o
46 # RUN: llvm-objcopy -j .keep_me %t.o %t2.o
47 # RUN: llvm-readobj --symbols %t2.o | FileCheck %s