1 RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.in.o
3 RUN: llvm-readobj -r %t.in.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-PRE
4 RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
6 RUN: llvm-objcopy -N mainfunc %t.in.o %t.out.o
7 RUN: llvm-readobj -r %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST
8 RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS
10 RUN: llvm-objcopy --strip-symbol mainfunc %t.in.o %t.out.o
11 RUN: llvm-readobj -r %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST
12 RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS
14 Explicitly listing the relocations for the input as well, to show
15 that the symbol index of the symbol foo is updated in the relocations,
16 while keeping relocations to two distinct .rdata symbols separate.
19 RELOCS-NEXT: Section (1) .text {
20 RELOCS-NEXT: 0x3 IMAGE_REL_AMD64_REL32 .rdata (0)
21 RELOCS-NEXT: 0xA IMAGE_REL_AMD64_REL32 .rdata (1)
22 RELOCS-PRE-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (3)
23 RELOCS-POST-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (2)
27 SYMBOLS: SYMBOL TABLE:
30 SYMBOLS-PRE-NEXT: mainfunc