mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
d68dfedd72
To improve consistency and avoid unneeded shell feature (output redirection). While here, make other changes to improve consistency --docnum 1 => --docnum=1 -docnum=x => --docnum=x
33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
RUN: yaml2obj %p/Inputs/strip-symbols.yaml -o %t.in.o
|
|
|
|
RUN: llvm-readobj -r %t.in.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-PRE
|
|
RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
|
|
|
|
RUN: llvm-objcopy -N mainfunc %t.in.o %t.out.o
|
|
RUN: llvm-readobj -r %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST
|
|
RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS
|
|
|
|
RUN: llvm-objcopy --strip-symbol mainfunc %t.in.o %t.out.o
|
|
RUN: llvm-readobj -r %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST
|
|
RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS
|
|
|
|
Explicitly listing the relocations for the input as well, to show
|
|
that the symbol index of the symbol foo is updated in the relocations,
|
|
while keeping relocations to two distinct .rdata symbols separate.
|
|
|
|
RELOCS: Relocations [
|
|
RELOCS-NEXT: Section (1) .text {
|
|
RELOCS-NEXT: 0x3 IMAGE_REL_AMD64_REL32 .rdata (0)
|
|
RELOCS-NEXT: 0xA IMAGE_REL_AMD64_REL32 .rdata (1)
|
|
RELOCS-PRE-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (3)
|
|
RELOCS-POST-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (2)
|
|
RELOCS-NEXT: }
|
|
RELOCS-NEXT: ]
|
|
|
|
SYMBOLS: SYMBOL TABLE:
|
|
SYMBOLS-NEXT: .rdata
|
|
SYMBOLS-NEXT: .rdata
|
|
SYMBOLS-PRE-NEXT: mainfunc
|
|
SYMBOLS-NEXT: foo
|
|
SYMBOLS-EMPTY:
|