forked from OSchip/llvm-project
79 lines
2.6 KiB
Plaintext
79 lines
2.6 KiB
Plaintext
# RUN: yaml2obj %p/Inputs/basereloc.obj.yaml > %t.obj
|
|
#
|
|
# RUN: lld -flavor link /out:%t.exe /subsystem:console /force /opt:noref \
|
|
# RUN: -- %t.obj
|
|
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck %s --check-prefix=BASEREL
|
|
#
|
|
# RUN: lld -flavor link /out:%t2.exe /subsystem:console /force /fixed \
|
|
# RUN: /opt:noref -- %t.obj
|
|
# RUN: llvm-readobj -coff-basereloc %t2.exe | FileCheck %s --check-prefix=NOBASEREL
|
|
|
|
BASEREL: BaseReloc [
|
|
BASEREL-NEXT: Entry {
|
|
BASEREL-NEXT: Type: HIGHLOW
|
|
BASEREL-NEXT: Address: 0x2007
|
|
BASEREL-NEXT: }
|
|
BASEREL-NEXT: Entry {
|
|
BASEREL-NEXT: Type: HIGHLOW
|
|
BASEREL-NEXT: Address: 0x200C
|
|
BASEREL-NEXT: }
|
|
BASEREL-NEXT: Entry {
|
|
BASEREL-NEXT: Type: HIGHLOW
|
|
BASEREL-NEXT: Address: 0x201E
|
|
BASEREL-NEXT: }
|
|
BASEREL-NEXT: Entry {
|
|
BASEREL-NEXT: Type: ABSOLUTE
|
|
BASEREL-NEXT: Address: 0x2000
|
|
BASEREL-NEXT: }
|
|
BASEREL-NEXT: Entry {
|
|
BASEREL-NEXT: Type: HIGHLOW
|
|
BASEREL-NEXT: Address: 0x3007
|
|
BASEREL-NEXT: }
|
|
BASEREL-NEXT: Entry {
|
|
BASEREL-NEXT: Type: HIGHLOW
|
|
BASEREL-NEXT: Address: 0x300C
|
|
BASEREL-NEXT: }
|
|
BASEREL-NEXT: Entry {
|
|
BASEREL-NEXT: Type: HIGHLOW
|
|
BASEREL-NEXT: Address: 0x301E
|
|
BASEREL-NEXT: }
|
|
BASEREL-NEXT: Entry {
|
|
BASEREL-NEXT: Type: ABSOLUTE
|
|
BASEREL-NEXT: Address: 0x3000
|
|
BASEREL-NEXT: }
|
|
BASEREL-NEXT: ]
|
|
|
|
NOBASEREL: BaseReloc [
|
|
NOBASEREL-NEXT: ]
|
|
|
|
# RUN: lld -flavor link /out:%t3.exe /subsystem:console /force /opt:noref \
|
|
# RUN: -- %t.obj
|
|
# RUN: llvm-readobj -file-headers -sections %t3.exe | FileCheck %s \
|
|
# RUN: --check-prefix=BASEREL-HEADER
|
|
#
|
|
# RUN: lld -flavor link /out:%t4.exe /subsystem:console /force /opt:noref \
|
|
# RUN: /fixed -- %t.obj
|
|
# RUN: llvm-readobj -file-headers %t4.exe | FileCheck %s \
|
|
# RUN: --check-prefix=NOBASEREL-HEADER
|
|
|
|
BASEREL-HEADER-NOT: IMAGE_FILE_RELOCS_STRIPPED
|
|
|
|
NOBASEREL-HEADER: IMAGE_FILE_RELOCS_STRIPPED
|
|
|
|
BASEREL-HEADER: BaseRelocationTableRVA: 0x4000
|
|
BASEREL-HEADER: BaseRelocationTableSize: 0x20
|
|
BASEREL-HEADER: Name: .reloc (2E 72 65 6C 6F 63 00 00)
|
|
BASEREL-HEADER-NEXT: VirtualSize: 0x20
|
|
BASEREL-HEADER-NEXT: VirtualAddress: 0x4000
|
|
BASEREL-HEADER-NEXT: RawDataSize: 512
|
|
BASEREL-HEADER-NEXT: PointerToRawData: 0xA00
|
|
BASEREL-HEADER-NEXT: PointerToRelocations: 0x0
|
|
BASEREL-HEADER-NEXT: PointerToLineNumbers: 0x0
|
|
BASEREL-HEADER-NEXT: RelocationCount: 0
|
|
BASEREL-HEADER-NEXT: LineNumberCount: 0
|
|
BASEREL-HEADER-NEXT: Characteristics [ (0x42000040)
|
|
BASEREL-HEADER-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA (0x40)
|
|
BASEREL-HEADER-NEXT: IMAGE_SCN_MEM_DISCARDABLE (0x2000000)
|
|
BASEREL-HEADER-NEXT: IMAGE_SCN_MEM_READ (0x40000000)
|
|
BASEREL-HEADER-NEXT: ]
|