llvm-project/lld/test/pecoff/base-reloc.test

30 lines
1.2 KiB
Plaintext

# RUN: yaml2obj %p/Inputs/hello.obj.yaml > %t.obj
#
# RUN: lld -flavor link /out:%t1 /subsystem:console /force -- %t.obj \
# RUN: && llvm-objdump -s %t1 | FileCheck %s --check-prefix=BASEREL-SECTION
#
# RUN: lld -flavor link /out:%t1 /subsystem:console /force /fixed -- %t.obj \
# RUN: && llvm-objdump -s %t1 | FileCheck %s --check-prefix=NOBASEREL-SECTION
# Because llvm-objdump cannot pretty-print the contents of .reloc section, we
# have no choice other than comparing the result with this binary blob.
#
# TODO: Improve llvm-objdump to pretty print .reloc section as GNU binutil
# objdump does.
BASEREL-SECTION: Contents of section .reloc:
BASEREL-SECTION-NEXT: 3000 00100000 0c000000 07300c30 00000000 .........0.0....
NOBASEREL-SECTION-NOT: Contents of section .reloc:
# RUN: lld -flavor link /out:%t1 /subsystem:console /force -- %t.obj \
# RUN: && llvm-readobj -file-headers %t1 \
# RUN: | FileCheck %s --check-prefix=BASEREL-HEADER
#
# RUN: lld -flavor link /out:%t1 /subsystem:console /force /fixed -- %t.obj \
# RUN: && llvm-readobj -file-headers %t1 \
# RUN: | FileCheck %s --check-prefix=NOBASEREL-HEADER
BASEREL-HEADER: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE
NOBASEREL-HEADER-NOT: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE