[test] Change llvm-readobj -long-option to --long-option or well-known short options. NFC

Also change some options that have different semantics (cause confusion) in llvm-readelf mode:

-s => -S
-t => --symbols
-sd => --section-data

llvm-svn: 359651
This commit is contained in:
Fangrui Song 2019-05-01 05:49:01 +00:00
parent ad3faadc87
commit b159906a9a
597 changed files with 1016 additions and 1016 deletions

View File

@ -3,7 +3,7 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib /alternatename:__delayLoadHelper2=main /delayload:library.dll
# RUN: llvm-objdump -d %t.exe | FileCheck %s -check-prefix DISASM
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS
# DISASM: 140001014: 11 00 00 d0 adrp x17, #8192
# DISASM: 140001018: 31 22 00 91 add x17, x17, #8

View File

@ -4,7 +4,7 @@
# RUN: llvm-objdump -d %t.obj | FileCheck %s -check-prefix BEFORE
# RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib %p/Inputs/library2-arm64.lib
# RUN: llvm-objdump -d %t.exe | FileCheck %s -check-prefix AFTER
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS
# BEFORE: Disassembly of section .text:
# BEFORE: 0: 00 00 00 94 bl #0

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:mainCRTStartup /subsystem:console %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# CHECK: Format: COFF-ARM64
# CHECK: Arch: aarch64

View File

@ -1,5 +1,5 @@
# RUN: yaml2obj < %p/Inputs/armnt-executable.obj.yaml > %t.obj
# RUN: lld-link /out:%t.exe /entry:mainCRTStartup /subsystem:console %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
CHECK: AddressOfEntryPoint: 0x1001

View File

@ -1,7 +1,7 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /subsystem:console %t.obj \
# RUN: /entry:mainCRTStartup %p/Inputs/library.lib
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s
# CHECK: Import {
# CHECK: Name: library.dll

View File

@ -4,7 +4,7 @@
# RUN: llvm-mc -triple=x86_64-windows-gnu %S/Inputs/associative-comdat-mingw-2.s -filetype=obj -o %t2.obj
# RUN: lld-link -lldmingw -entry:main %t1.obj %t2.obj -out:%t.gc.exe -verbose
# RUN: llvm-readobj -sections %t.gc.exe | FileCheck %s
# RUN: llvm-readobj --sections %t.gc.exe | FileCheck %s
# CHECK: Sections [
# CHECK: Section {

View File

@ -3,10 +3,10 @@
# RUN: llvm-mc -triple=x86_64-windows-msvc %S/Inputs/associative-comdat-2.s -filetype=obj -o %t2.obj
# RUN: lld-link -entry:main %t1.obj %t2.obj -out:%t.gc.exe
# RUN: llvm-readobj -sections %t.gc.exe | FileCheck %s
# RUN: llvm-readobj --sections %t.gc.exe | FileCheck %s
# RUN: lld-link -entry:main %t1.obj %t2.obj -opt:noref -out:%t.nogc.exe
# RUN: llvm-readobj -sections %t.nogc.exe | FileCheck %s
# RUN: llvm-readobj --sections %t.nogc.exe | FileCheck %s
# CHECK: Sections [
# CHECK: Section {

View File

@ -7,7 +7,7 @@
# RUN: llvm-mc -triple=armv7-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-lib.lib -verbose
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=CONTENTS %s
# IMPORTS: Import {

View File

@ -7,7 +7,7 @@
# RUN: llvm-mc -triple=aarch64-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-lib.lib -verbose
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=CONTENTS %s
# IMPORTS: Import {

View File

@ -9,7 +9,7 @@
# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-implib.a -verbose
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# IMPORTS: Import {
# IMPORTS-NEXT: Name: foo.dll

View File

@ -7,7 +7,7 @@
# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-lib.lib -verbose
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=DISASM %s
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=CONTENTS %s

View File

@ -7,7 +7,7 @@
# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-lib.lib -verbose
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=DISASM %s
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=CONTENTS %s

View File

@ -1,7 +1,7 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DEFAULT-HEADER %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT-HEADER %s
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=DEFAULT-TEXT %s
# DEFAULT-HEADER: ImageBase: 0x140000000
@ -9,7 +9,7 @@
# DEFAULT-TEXT-NEXT: 1000 00000040 01000000
# RUN: lld-link /out:%t.exe /entry:main %t.obj /base:0x280000000
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=BASE-HEADER %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=BASE-HEADER %s
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=BASE-TEXT %s
# BASE-HEADER: ImageBase: 0x280000000

View File

@ -1,10 +1,10 @@
# RUN: yaml2obj < %s > %t.obj
#
# RUN: lld-link /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck %s -check-prefix=BASEREL
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck %s -check-prefix=BASEREL
#
# RUN: lld-link /out:%t.exe /entry:main /fixed %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck %s -check-prefix=NOBASEREL
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck %s -check-prefix=NOBASEREL
#
# BASEREL: BaseReloc [
# BASEREL-NEXT: Entry {
@ -44,11 +44,11 @@
# NOBASEREL-NEXT: ]
#
# RUN: lld-link /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -file-headers -sections %t.exe | FileCheck %s \
# RUN: llvm-readobj --file-headers --sections %t.exe | FileCheck %s \
# RUN: --check-prefix=BASEREL-HEADER
#
# RUN: lld-link /out:%t.exe /entry:main /fixed %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s \
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s \
# RUN: --check-prefix=NOBASEREL-HEADER
#
# BASEREL-HEADER-NOT: IMAGE_FILE_RELOCS_STRIPPED

View File

@ -8,7 +8,7 @@
# RUN: lld-link /out:%t.exe /entry:main %t.obj %p/Inputs/resource.res \
# RUN: %p/Inputs/combined-resources.res %p/Inputs/combined-resources-2.res
# RUN: llvm-readobj -coff-resources -file-headers -section-data %t.exe | \
# RUN: llvm-readobj --coff-resources --file-headers --section-data %t.exe | \
# RUN: FileCheck %s
CHECK: ResourceTableRVA: 0x2000

View File

@ -5,7 +5,7 @@
# RUN: lld-link -lldmingw -entry:main %t1.obj %t2.obj -out:%t.exe -verbose 2>&1 \
# RUN: | FileCheck -check-prefix VERBOSE %s
# RUN: llvm-readobj -s %t.exe | FileCheck -check-prefix SECTIONS %s
# RUN: llvm-readobj -S %t.exe | FileCheck -check-prefix SECTIONS %s
# VERBOSE: -aligncomm:"foo",2

View File

@ -1,7 +1,7 @@
# RUN: mkdir -p %t
# RUN: yaml2obj -o %t/constant-export.obj %s
# RUN: lld-link /machine:x86 /dll /entry:__CFConstantStringClassReference -out:%t/constant-export.dll %t/constant-export.obj
# RUN: llvm-readobj -coff-exports %t/constant-export.lib | FileCheck %s
# RUN: llvm-readobj --coff-exports %t/constant-export.lib | FileCheck %s
# CHECK: Type: const
# CHECK: Name type: noprefix

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj %s > %t.obj
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj
# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s
# RUN: llvm-readobj --sections --section-data %t.dll | FileCheck %s
# CHECK: Name: .CRT
# CHECK: Characteristics [

View File

@ -33,27 +33,27 @@
# CHECK-NEXT: SectionData (
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj %t1.obj %t2.obj
# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE1
# RUN: llvm-readobj --sections --section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE1
# CASE1-NEXT: 01020304 55701011 1205
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj %t2.obj %t1.obj
# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE2
# RUN: llvm-readobj --sections --section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE2
# CASE2-NEXT: 01020304 10111255 7005
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t1.obj %t2.obj %t.obj
# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE3
# RUN: llvm-readobj --sections --section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE3
# CASE3-NEXT: 01557010 11120203 0405
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t1.obj %t.obj %t2.obj
# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE4
# RUN: llvm-readobj --sections --section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE4
# CASE4-NEXT: 01557002 03041011 1205
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t2.obj %t1.obj %t.obj
# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE5
# RUN: llvm-readobj --sections --section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE5
# CASE5-NEXT: 01101112 55700203 0405
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t2.obj %t.obj %t1.obj
# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE6
# RUN: llvm-readobj --sections --section-data %t.dll | FileCheck %s --check-prefixes CHECK,CASE6
# CASE6-NEXT: 01101112 02030455 7005
# CHECK-NEXT: )

View File

@ -3,10 +3,10 @@
# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -debug:dwarf -out:%t.exe -entry:mainfunc -subsystem:console %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck %s -check-prefix SECTIONS
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck %s -check-prefix RELOCS
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s -check-prefix HEADERS
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck %s -check-prefix DEBUG
# RUN: llvm-readobj --sections %t.exe | FileCheck %s -check-prefix SECTIONS
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck %s -check-prefix RELOCS
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s -check-prefix HEADERS
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck %s -check-prefix DEBUG
# SECTIONS: Number: 3
# SECTIONS-NEXT: Name: .buildid (2E 62 75 69 6C 64 69 64)

View File

@ -3,7 +3,7 @@
# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall\n fastcall\n vectorcall\n _underscored" > %t.def
# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
# RUN: llvm-readobj %t.lib | FileCheck -check-prefix UNDECORATED-IMPLIB %s
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix UNDECORATED-EXPORTS %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix UNDECORATED-EXPORTS %s
# UNDECORATED-IMPLIB: Name type: noprefix
# UNDECORATED-IMPLIB-NEXT: __imp___underscored
@ -27,7 +27,7 @@
# RUN: echo -e "LIBRARY foo\nEXPORTS\n _stdcall@8\n @fastcall@8\n vectorcall@@8" > %t.def
# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
# RUN: llvm-readobj %t.lib | FileCheck -check-prefix DECORATED-IMPLIB %s
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s
# DECORATED-IMPLIB: Name type: name
# DECORATED-IMPLIB-NEXT: __imp_@fastcall@8
@ -48,7 +48,7 @@
# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall@8\n @fastcall@8\n vectorcall@@8" > %t.def
# RUN: lld-link -lldmingw -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
# RUN: llvm-readobj %t.lib | FileCheck -check-prefix DECORATED-MINGW-IMPLIB %s
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix DECORATED-MINGW-EXPORTS %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix DECORATED-MINGW-EXPORTS %s
# DECORATED-MINGW-IMPLIB: Name type: name
# DECORATED-MINGW-IMPLIB-NEXT: __imp_@fastcall@8
@ -68,11 +68,11 @@
# RUN: lld-link -lldmingw -kill-at -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
# RUN: llvm-readobj %t.lib | FileCheck -check-prefix MINGW-KILL-AT-IMPLIB %s
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix MINGW-KILL-AT-EXPORTS %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix MINGW-KILL-AT-EXPORTS %s
# RUN: lld-link -lldmingw -kill-at -entry:dllmain -dll %t.obj -out:%t.dll -implib:%t.lib
# RUN: llvm-readobj %t.lib | FileCheck -check-prefix MINGW-KILL-AT-IMPLIB %s
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix MINGW-KILL-AT-EXPORTS %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix MINGW-KILL-AT-EXPORTS %s
# MINGW-KILL-AT-IMPLIB: Name type: noprefix
# MINGW-KILL-AT-IMPLIB: __imp__fastcall

View File

@ -3,8 +3,8 @@
# RUN: lld-link %t.obj %p/Inputs/library.lib /subsystem:console \
# RUN: /entry:mainCRTStartup /alternatename:__delayLoadHelper2=mainCRTStartup \
# RUN: /delayload:library.dll /out:%t.exe
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=DISASM %s
# IMPORT: Format: COFF-ARM

View File

@ -1,8 +1,8 @@
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console \
# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib /delayload:STD64.DLL \
# RUN: /alternatename:__delayLoadHelper2=main
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
IMPORT: DelayImport {
IMPORT-NEXT: Name: std64.dll

View File

@ -3,8 +3,8 @@
# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
# RUN: /entry:main@0 /alternatename:___delayLoadHelper2@8=_main@0 \
# RUN: /delayload:std32.dll /out:%t.exe
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=DISASM %s
IMPORT: Format: COFF-i386

View File

@ -42,10 +42,10 @@ EXPORT-LTO-NEXT: 3 0x1030 exportfn3
# RUN: /export:exportfn1 /export:exportfn2
# RUN: yaml2obj < %p/Inputs/import.yaml > %t2.obj
# RUN: lld-link /out:%t2.exe /entry:main %t2.obj %t2.lib
# RUN: llvm-readobj -coff-imports %t2.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj --coff-imports %t2.exe | FileCheck -check-prefix=IMPORT %s
# RUN: lld-link /out:%t2.lto.exe /entry:main %t2.obj %t.lto.lib
# RUN: llvm-readobj -coff-imports %t2.lto.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj --coff-imports %t2.lto.exe | FileCheck -check-prefix=IMPORT %s
IMPORT: Symbol: exportfn1
IMPORT: Symbol: exportfn2

View File

@ -3,7 +3,7 @@
# RUN: lld-link -entry:dllmain -dll %t.obj -out:%t.dll -implib:%t.lib
# RUN: llvm-readobj %t.lib | FileCheck -check-prefix DECORATED-IMPLIB %s
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s
# DECORATED-IMPLIB: Name type: name
# DECORATED-IMPLIB-NEXT: __imp_@fastcall@8

View File

@ -6,11 +6,11 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t1.exe /entry:main %t.obj %t-oldname.obj %t.lib
# RUN: llvm-readobj -coff-imports %t1.exe | FileCheck -check-prefix=REF %s
# RUN: llvm-readobj --coff-imports %t1.exe | FileCheck -check-prefix=REF %s
# REF-NOT: Symbol: exportfn1
# RUN: lld-link /out:%t2.exe /entry:main %t.obj %t-oldname.obj %t.lib /opt:noref
# RUN: llvm-readobj -coff-imports %t2.exe | FileCheck -check-prefix=NOREF %s
# RUN: llvm-readobj --coff-imports %t2.exe | FileCheck -check-prefix=NOREF %s
# NOREF: Symbol: exportfn1
--- !COFF

View File

@ -5,9 +5,9 @@
# RUN: lld-link -lldmingw %t.o -out:%t-cui.exe -subsystem:console 2>&1 | FileCheck -allow-empty -check-prefix=LINK %s
# RUN: lld-link -lldmingw %t.o -out:%t-gui.exe -subsystem:windows 2>&1 | FileCheck -allow-empty -check-prefix=LINK %s
# RUN: llvm-readobj -file-headers %t-default.exe | FileCheck -check-prefix=CUI %s
# RUN: llvm-readobj -file-headers %t-cui.exe | FileCheck -check-prefix=CUI %s
# RUN: llvm-readobj -file-headers %t-gui.exe | FileCheck -check-prefix=GUI %s
# RUN: llvm-readobj --file-headers %t-default.exe | FileCheck -check-prefix=CUI %s
# RUN: llvm-readobj --file-headers %t-cui.exe | FileCheck -check-prefix=CUI %s
# RUN: llvm-readobj --file-headers %t-gui.exe | FileCheck -check-prefix=GUI %s
# Check that this doesn't print any warnings.
# LINK-NOT: found both wmain and main

View File

@ -3,7 +3,7 @@
# RUN: llvm-mc -triple=i686-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -exclude-all-symbols -dll -out:%t.dll -entry:DllMainCRTStartup@12 %t.obj
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck %s -check-prefix=NO-EXPORTS
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s -check-prefix=NO-EXPORTS
# NO-EXPORTS-NOT: Name:
@ -26,6 +26,6 @@ _dataSym:
# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
#
# RUN: lld-link -out:%t.dll -dll %t.obj -lldmingw -exclude-all-symbols -output-def:%t.def
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix=DLLEXPORT %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix=DLLEXPORT %s
# DLLEXPORT: Name: exportfn3

View File

@ -3,7 +3,7 @@
# RUN: llvm-mc -triple=i686-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -lldmingw -dll -out:%t.dll -entry:DllMainCRTStartup@12 %t.obj -implib:%t.lib
# RUN: llvm-readobj -coff-exports %t.dll | grep Name: | FileCheck %s
# RUN: llvm-readobj --coff-exports %t.dll | grep Name: | FileCheck %s
# RUN: llvm-readobj %t.lib | FileCheck -check-prefix=IMPLIB %s
# CHECK: Name:
@ -43,7 +43,7 @@ __imp__unexported:
# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
#
# RUN: lld-link -out:%t.dll -dll %t.obj -lldmingw -export-all-symbols -output-def:%t.def
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix=CHECK2 %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix=CHECK2 %s
# RUN: cat %t.def | FileCheck -check-prefix=CHECK2-DEF %s
# Note, this will actually export _DllMainCRTStartup as well, since

View File

@ -5,7 +5,7 @@
#
# RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 /merge:.edata=.rdata
# RUN: llvm-objdump -p %t.dll | FileCheck -check-prefix=CHECK1 %s
# RUN: llvm-readobj -file-headers -sections %t.dll | FileCheck -check-prefix=HEADER-MERGE %s
# RUN: llvm-readobj --file-headers --sections %t.dll | FileCheck -check-prefix=HEADER-MERGE %s
# CHECK1: Export Table:
# CHECK1: DLL name: export32.test.tmp.dll

View File

@ -3,20 +3,20 @@
#
# RUN: lld-link %t.obj /fixed %p/Inputs/std32.lib /subsystem:console \
# RUN: /entry:main@0 /debug /out:%t.fixed.exe
# RUN: llvm-readobj -file-headers %t.fixed.exe | \
# RUN: llvm-readobj --file-headers %t.fixed.exe | \
# RUN: FileCheck -check-prefix=EXEFIXED %s
#
# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
# RUN: /entry:main@0 /debug /out:%t.exe
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=EXEREL %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=EXEREL %s
#
# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
#
# RUN: lld-link %t.obj /dll /fixed /debug /out:%t.fixed.dll
# RUN: llvm-readobj -file-headers %t.fixed.dll | FileCheck -check-prefix=DLLFIXED %s
# RUN: llvm-readobj --file-headers %t.fixed.dll | FileCheck -check-prefix=DLLFIXED %s
#
# RUN: lld-link %t.obj /dll /debug /out:%t.dll
# RUN: llvm-readobj -file-headers %t.dll | FileCheck -check-prefix=DLLREL %s
# RUN: llvm-readobj --file-headers %t.dll | FileCheck -check-prefix=DLLREL %s
EXEFIXED-NOT: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE
DLLFIXED-NOT: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -opt:noref -guard:nolongjmp -out:%t.exe -entry:main 2>&1 | FileCheck %s --check-prefix=ERRS
# RUN: llvm-readobj -file-headers -coff-load-config %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s
# ERRS: warning: ignoring .gfids$y symbol table index section in object {{.*}}gfids-corrupt{{.*}}
# ERRS: warning: ignoring invalid symbol table index in section .gfids$y in object {{.*}}gfids-corrupt{{.*}}

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -triple x86_64-pc-win32 %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -guard:cf -dll -out:%t.dll -noentry
# RUN: llvm-readobj -coff-load-config %t.dll | FileCheck %s --check-prefix=CHECK
# RUN: llvm-readobj --coff-load-config %t.dll | FileCheck %s --check-prefix=CHECK
# There should be a single entry in the table for the exported symbol.
#

View File

@ -2,7 +2,7 @@
# RUN: grep -B99999 [S]PLITMARKER %s | llvm-mc -triple x86_64-windows-msvc -filetype=obj -o %t1.obj
# RUN: grep -A99999 [S]PLITMARKER %s | llvm-mc -triple x86_64-windows-msvc -filetype=obj -o %t2.obj
# RUN: lld-link %t1.obj %t2.obj -guard:nolongjmp -out:%t.exe -entry:main -opt:noref
# RUN: llvm-readobj -file-headers -coff-load-config %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s
# CHECK: ImageBase: 0x140000000
# CHECK: LoadConfig [

View File

@ -1,11 +1,11 @@
# REQUIRES: x86
# RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -guard:nolongjmp -out:%t.exe -opt:noref -entry:main
# RUN: llvm-readobj -file-headers -coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: lld-link %t.obj -guard:nolongjmp -out:%t.exe -opt:noref -entry:main -debug:dwarf
# RUN: llvm-readobj -file-headers -coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: lld-link %t.obj -guard:nolongjmp -out:%t.exe -opt:ref -entry:main
# RUN: llvm-readobj -file-headers -coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK-GC
# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK-GC
# This assembly is meant to mimic what CL emits for this kind of C code when
# /Gw (-fdata-sections) is enabled:

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -guard:nolongjmp -out:%t.exe -opt:icf -entry:main
# RUN: llvm-readobj -file-headers -coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK
# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK
# This assembly is meant to mimic what CL emits for this kind of C code:
# int icf1() { return 42; }
@ -37,9 +37,9 @@
# There should be no .gfids section in the output exectuable when we link with
# -guard:cf or with no -guard:cf/nolongjmp flag.
# RUN: llvm-readobj -sections %t.exe | FileCheck %s --check-prefix NOGFIDSEC
# RUN: llvm-readobj --sections %t.exe | FileCheck %s --check-prefix NOGFIDSEC
# RUN: lld-link %t.obj -out:%t.exe -opt:icf -entry:main
# RUN: llvm-readobj -sections %t.exe | FileCheck %s --check-prefix NOGFIDSEC
# RUN: llvm-readobj --sections %t.exe | FileCheck %s --check-prefix NOGFIDSEC
# NOGFIDSEC: Sections [
# NOGFIDSEC: Section {

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -triple i686-pc-win32 %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -guard:cf -out:%t.exe -entry:main
# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK
# RUN: llvm-readobj --coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK
# Only f and _main should go in the table.
# (use /lldmap:map.txt to check their addresses).

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -triple x86_64-pc-win32 %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -guard:cf -out:%t.exe -entry:main
# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK
# RUN: llvm-readobj --coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK
# f, g, and main go in the table.
# Including g isn't strictly necessary since it's not an indirect call target,

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -guard:cf -out:%t.exe -entry:main
# RUN: llvm-readobj -file-headers -coff-load-config %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s
# CHECK: ImageBase: 0x140000000
# CHECK: LoadConfig [

View File

@ -4,7 +4,7 @@
# RUN: > %T/guardcf-align-foobar.obj
# RUN: lld-link -out:%T/guardcf-align.exe -entry:main -guard:cf \
# RUN: %t.obj %T/guardcf-align-foobar.obj
# RUN: llvm-readobj -coff-load-config %T/guardcf-align.exe | FileCheck %s
# RUN: llvm-readobj --coff-load-config %T/guardcf-align.exe | FileCheck %s
# Check that the gfids table contains at least one entry that ends in 0
# and no entries that end in something other than 0.

View File

@ -9,7 +9,7 @@
; RUN: llvm-as %s -o %t.bc
; RUN: lld-link -entry:main -guard:cf -dll %t.bc %t.lib %t.ldcfg.obj -out:%t.dll
; RUN: llvm-readobj -coff-load-config %t.dll | FileCheck %s
; RUN: llvm-readobj --coff-load-config %t.dll | FileCheck %s
; There must be *two* entries in the table: DLL entry point, and my_handler.

View File

@ -7,7 +7,7 @@
# Make an obj that takes the address of that exported function.
# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc %s -o %t2.obj
# RUN: lld-link -entry:main -guard:cf %t2.obj %t.lib -nodefaultlib -out:%t.exe
# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s
# RUN: llvm-readobj --coff-load-config %t.exe | FileCheck %s
# Check that the gfids table contains *exactly* two entries, one for exportfn1
# and one for main.

View File

@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-windows %s -o %t.obj
// RUN: lld-link -entry:main -subsystem:console %t.obj -out:%t.exe
// RUN: llvm-readobj -sections %t.exe | FileCheck %s
// RUN: llvm-readobj --sections %t.exe | FileCheck %s
.globl main
main:
ret

View File

@ -1,25 +1,25 @@
# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
DEFAULT: SizeOfHeapReserve: 1048576
DEFAULT: SizeOfHeapCommit: 4096
# RUN: lld-link /out:%t.exe /entry:main /heap:0x3000 %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: echo "HEAPSIZE 12288" > %t.def
# RUN: lld-link /out:%t.exe /entry:main /def:%t.def %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
CHECK1: SizeOfHeapReserve: 12288
CHECK1: SizeOfHeapCommit: 4096
# RUN: lld-link /out:%t.exe /entry:main /heap:0x5000,0x3000 %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
# RUN: echo "HEAPSIZE 20480,12288" > %t.def
# RUN: lld-link /out:%t.exe /entry:main /def:%t.def %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
CHECK2: SizeOfHeapReserve: 20480
CHECK2: SizeOfHeapCommit: 12288

View File

@ -1,9 +1,9 @@
# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
# RUN: /entry:main@0 /out:%t.exe /appcontainer
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=HEADER %s
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=HEADER %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
HEADER: Format: COFF-i386
HEADER-NEXT: Arch: i386

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc %s -triple x86_64-windows-msvc -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -dll -noentry -out:%t.dll -merge:.xdata=.xdata
# RUN: llvm-readobj -sections -coff-exports %t.dll | FileCheck %s
# RUN: llvm-readobj --sections --coff-exports %t.dll | FileCheck %s
# CHECK: Name: .pdata
# CHECK-NEXT: VirtualSize: 0x18

View File

@ -2,9 +2,9 @@
# RUN: llvm-mc %s -triple x86_64-windows-msvc -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -dll -noentry -out:%t.dll -merge:.xdata=.xdata 2>&1 \
# RUN: | FileCheck %s --check-prefix=WARN
# RUN: llvm-readobj -sections %t.dll | FileCheck %s --check-prefix=XDATA
# RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=XDATA
# RUN: lld-link %t.obj -dll -noentry -out:%t.dll
# RUN: llvm-readobj -sections %t.dll | FileCheck %s --check-prefix=RDATA
# RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=RDATA
# There shouldn't be much xdata, because all three .pdata entries (12 bytes
# each) should use the same .xdata unwind info.

View File

@ -7,7 +7,7 @@
# RUN: llvm-ar rcs %t-implib.a %t-dabcdh.o %t-dabcds00000.o %t-dabcdt.o
# RUN: lld-link -lldmingw -dll -out:%t.dll -entry:main -subsystem:console \
# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib %t-implib.a -include:func
# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix=EXPORT %s
# RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix=EXPORT %s
# Check that only the single normal symbol was exported, none of the symbols
# from the import library.

View File

@ -9,7 +9,7 @@
# Not linking with -lldmingw; one can link to GNU import libs even if not targeting MinGW.
# RUN: lld-link -out:%t.exe -entry:main -subsystem:console \
# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib %t-implib.a -include:func
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# Check that import entries from both libraries show up.

View File

@ -1,7 +1,7 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /opt:noref /entry:main \
# RUN: %t.obj %p/Inputs/imports-mangle.lib
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s
# CHECK: Import {
# CHECK: Symbol: sym4 (0)

View File

@ -4,12 +4,12 @@
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console \
# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=TEXT %s
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console \
# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib /include:ExitProcess
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=TEXT %s
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
TEXT: Disassembly of section .text:
TEXT-NEXT: .text:
@ -37,7 +37,7 @@ IMPORT-NEXT: }
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console /merge:.rdata=.text \
# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib /include:ExitProcess
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=MERGE %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=MERGE %s
MERGE: Import {
MERGE-NEXT: Name: std64.dll

View File

@ -1,7 +1,7 @@
# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \
# RUN: /entry:main@0 /out:%t.exe /largeaddressaware
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=HEADER %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=HEADER %s
HEADER: Format: COFF-i386
HEADER-NEXT: Arch: i386

View File

@ -1,7 +1,7 @@
; REQUIRES: x86
; RUN: llvm-as -o %t.obj %s
; RUN: lld-link /out:%t.exe %t.obj /entry:main /subsystem:console
; RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
; RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
; CHECK: LoadConfigTableRVA: 0x2000
; CHECK: LoadConfigTableSize: 0x70

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe %t.obj /entry:main /subsystem:console
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# CHECK: LoadConfigTableRVA: 0x2000
# CHECK: LoadConfigTableSize: 0x70

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe %t.obj /entry:main /subsystem:console
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# CHECK: LoadConfigTableRVA: 0x2000
# CHECK: LoadConfigTableSize: 0x40

View File

@ -1,7 +1,7 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-objdump -s %t.exe | FileCheck %s
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# CHECK: Contents of section .text:
# CHECK-NEXT: 1000 00200000

View File

@ -1,7 +1,7 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj 2>&1 | FileCheck -check-prefix=WARN %s
# RUN: llvm-objdump -s %t.exe | FileCheck %s
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
# WARN: warning: [[INPUT:.+]]: locally defined symbol imported: main (defined in [[INPUT]])

View File

@ -1,8 +1,8 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck %s
# RUN: llvm-readobj --sections %t.exe | FileCheck %s
# RUN: lld-link /debug /out:%t2.exe /entry:main %t.obj
# RUN: llvm-readobj -sections %t2.exe | FileCheck %s
# RUN: llvm-readobj --sections %t2.exe | FileCheck %s
# CHECK: Name: .eh_fram (
# CHECK: Name: .data_long_section_name

View File

@ -14,30 +14,30 @@
; Check that, when we use an LTO main with LTO objects, we optimize away all
; of f1, f2, and comdat.
; RUN: lld-link /out:%T/comdat-main.exe /entry:main /subsystem:console %T/comdat-main.lto.obj %T/comdat1.lto.obj %T/comdat2.lto.obj
; RUN: llvm-readobj -file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-11 %s
; RUN: llvm-readobj --file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-11 %s
; RUN: llvm-objdump -d %T/comdat-main.exe | FileCheck -check-prefix=TEXT-11 %s
; RUN: lld-link /out:%T/comdat-main.exe /entry:main /subsystem:console %T/comdat-main.lto.obj %T/comdat.lto.lib
; RUN: llvm-readobj -file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-11 %s
; RUN: llvm-readobj --file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-11 %s
; RUN: llvm-objdump -d %T/comdat-main.exe | FileCheck -check-prefix=TEXT-11 %s
; Check that, when we use a non-LTO main with LTO objects, we pick the comdat
; implementation in LTO, elide calls to it from inside LTO, and retain the
; call to comdat from main.
; RUN: lld-link /out:%T/comdat-main.exe /entry:main /subsystem:console %T/comdat-main.obj %T/comdat1.lto.obj %T/comdat2.lto.obj
; RUN: llvm-readobj -file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-01 %s
; RUN: llvm-readobj --file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-01 %s
; RUN: llvm-objdump -d %T/comdat-main.exe | FileCheck -check-prefix=TEXT-01 %s
; RUN: lld-link /out:%T/comdat-main.exe /entry:main /subsystem:console %T/comdat-main.obj %T/comdat.lto.lib
; RUN: llvm-readobj -file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-01 %s
; RUN: llvm-readobj --file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-01 %s
; RUN: llvm-objdump -d %T/comdat-main.exe | FileCheck -check-prefix=TEXT-01 %s
; Check that, when we use an LTO main with non-LTO objects, we pick the comdat
; implementation in LTO, elide the call to it from inside LTO, and keep the
; calls to comdat from the non-LTO objects.
; RUN: lld-link /out:%T/comdat-main.exe /entry:main /subsystem:console %T/comdat-main.lto.obj %T/comdat1.obj %T/comdat2.obj
; RUN: llvm-readobj -file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-10 %s
; RUN: llvm-readobj --file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-10 %s
; RUN: llvm-objdump -d %T/comdat-main.exe | FileCheck -check-prefix=TEXT-10 %s
; RUN: lld-link /out:%T/comdat-main.exe /entry:main /subsystem:console %T/comdat-main.lto.obj %T/comdat.lib
; RUN: llvm-readobj -file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-10 %s
; RUN: llvm-readobj --file-headers %T/comdat-main.exe | FileCheck -check-prefix=HEADERS-10 %s
; RUN: llvm-objdump -d %T/comdat-main.exe | FileCheck -check-prefix=TEXT-10 %s
; HEADERS-11: AddressOfEntryPoint: 0x1000

View File

@ -4,7 +4,7 @@
; RUN: llvm-as %s -o %t.bc
; RUN: lld-link -opt:icf -dll -noentry %t.bc -out:%t.dll
; RUN: llvm-readobj -coff-exports %t.dll | FileCheck %s
; RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s
; CHECK: Export {
; CHECK: Export {

View File

@ -10,24 +10,24 @@
; RUN: llvm-ar cru %T/foo.lib %T/foo.obj
; RUN: lld-link /out:%T/main.exe /entry:main /include:f2 /subsystem:console %T/main.lto.obj %T/foo.lto.obj
; RUN: llvm-readobj -file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-11 %s
; RUN: llvm-readobj --file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-11 %s
; RUN: llvm-objdump -d %T/main.exe | FileCheck -check-prefix=TEXT-11 %s
; RUN: lld-link /out:%T/main.exe /entry:main /include:f2 /subsystem:console %T/main.lto.obj %T/foo.lto.lib /verbose 2>&1 | FileCheck -check-prefix=VERBOSE %s
; RUN: llvm-readobj -file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-11 %s
; RUN: llvm-readobj --file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-11 %s
; RUN: llvm-objdump -d %T/main.exe | FileCheck -check-prefix=TEXT-11 %s
; RUN: lld-link /out:%T/main.exe /entry:main /subsystem:console %T/main.obj %T/foo.lto.obj
; RUN: llvm-readobj -file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-01 %s
; RUN: llvm-readobj --file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-01 %s
; RUN: llvm-objdump -d %T/main.exe | FileCheck -check-prefix=TEXT-01 %s
; RUN: lld-link /out:%T/main.exe /entry:main /subsystem:console %T/main.obj %T/foo.lto.lib
; RUN: llvm-readobj -file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-01 %s
; RUN: llvm-readobj --file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-01 %s
; RUN: llvm-objdump -d %T/main.exe | FileCheck -check-prefix=TEXT-01 %s
; RUN: lld-link /out:%T/main.exe /entry:main /subsystem:console %T/main.lto.obj %T/foo.obj
; RUN: llvm-readobj -file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-10 %s
; RUN: llvm-readobj --file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-10 %s
; RUN: llvm-objdump -d %T/main.exe | FileCheck -check-prefix=TEXT-10 %s
; RUN: lld-link /out:%T/main.exe /entry:main /subsystem:console %T/main.lto.obj %T/foo.lib
; RUN: llvm-readobj -file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-10 %s
; RUN: llvm-readobj --file-headers %T/main.exe | FileCheck -check-prefix=HEADERS-10 %s
; RUN: llvm-objdump -d %T/main.exe | FileCheck -check-prefix=TEXT-10 %s
; VERBOSE: foo.lto.lib({{.*}}foo.lto.obj)

View File

@ -1,18 +1,18 @@
# RUN: yaml2obj %p/Inputs/machine-x64.yaml > %t.obj
# RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
# RUN: lld-link /entry:main /subsystem:console /machine:x64 \
# RUN: /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
AMD64: Machine: IMAGE_FILE_MACHINE_AMD64
# RUN: yaml2obj %p/Inputs/machine-x86.yaml > %t.obj
# RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=I386 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=I386 %s
# RUN: lld-link /entry:main /subsystem:console /machine:x86 \
# RUN: /out:%t.exe %t.obj /fixed
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=I386 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=I386 %s
I386: Machine: IMAGE_FILE_MACHINE_I386

View File

@ -5,7 +5,7 @@
# RUN: /manifest:embed \
# RUN: /manifestuac:"level='requireAdministrator'" \
# RUN: /manifestinput:%p/Inputs/manifestinput.test %t.obj
# RUN: llvm-readobj -coff-resources -file-headers %t.exe | FileCheck %s \
# RUN: llvm-readobj --coff-resources --file-headers %t.exe | FileCheck %s \
# RUN: -check-prefix TEST_EMBED
TEST_EMBED: ResourceTableRVA: 0x2000

View File

@ -1,11 +1,11 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
# RUN: /merge:.foo=.abc /merge:.bar=.def %t.obj /debug
# RUN: llvm-readobj -sections %t.exe | FileCheck %s
# RUN: llvm-readobj --sections %t.exe | FileCheck %s
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
# RUN: /merge:.foo=.bar /merge:.bar=.abc %t.obj /debug
# RUN: llvm-readobj -sections %t.exe | FileCheck --check-prefix=CHECK2 %s
# RUN: llvm-readobj --sections %t.exe | FileCheck --check-prefix=CHECK2 %s
# RUN: not lld-link /out:%t.exe /entry:main /subsystem:console /force \
# RUN: /merge:.rsrc=.foo %t.obj /debug 2>&1 | FileCheck --check-prefix=NO-RSRC %s

View File

@ -3,7 +3,7 @@
# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj
# RUN: lld-link -out:%t.exe -entry:main -subsystem:console %t.obj
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=DUMP %s
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DIRECTORY %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DIRECTORY %s
.text
.global main

View File

@ -1,8 +1,8 @@
# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
# RUN: lld-link /out:%t.dll /dll %t.obj
# RUN: llvm-readobj -file-headers %t.dll | FileCheck -check-prefix=ENTRY %s
# RUN: llvm-readobj --file-headers %t.dll | FileCheck -check-prefix=ENTRY %s
# RUN: lld-link /out:%t.dll /dll /noentry %t.obj
# RUN: llvm-readobj -file-headers %t.dll | FileCheck -check-prefix=NOENTRY %s
# RUN: llvm-readobj --file-headers %t.dll | FileCheck -check-prefix=NOENTRY %s
ENTRY: AddressOfEntryPoint: 0x1000
NOENTRY: AddressOfEntryPoint: 0x0

View File

@ -1,73 +1,73 @@
# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=BIND %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=BIND %s
# RUN: lld-link /allowbind /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=BIND %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=BIND %s
BIND-NOT: IMAGE_DLL_CHARACTERISTICS_NO_BIND
# RUN: lld-link /allowbind:no /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOBIND %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NOBIND %s
NOBIND: IMAGE_DLL_CHARACTERISTICS_NO_BIND
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=ISO %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=ISO %s
# RUN: lld-link /allowisolation /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=ISO %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=ISO %s
ISO-NOT: IMAGE_DLL_CHARACTERISTICS_NO_ISOLATION
# RUN: lld-link /allowisolation:no /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOISO %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NOISO %s
NOISO: IMAGE_DLL_CHARACTERISTICS_NO_ISOLATION
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=ENT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=ENT %s
# RUN: lld-link /out:%t.exe /entry:main /highentropyva %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=ENT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=ENT %s
ENT: IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA
# RUN: lld-link /out:%t.exe /highentropyva:no /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOENT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NOENT %s
NOENT-NOT: IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA
# RUN: lld-link /out:%t.exe /entry:main /integritycheck %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=INT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=INT %s
INT: IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOINT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NOINT %s
# RUN: lld-link /out:%t.exe /integritycheck:no /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOINT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NOINT %s
NOINT-NOT: IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NXCOMPAT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NXCOMPAT %s
# RUN: lld-link /out:%t.exe /entry:main /nxcompat %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NXCOMPAT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NXCOMPAT %s
NXCOMPAT: IMAGE_DLL_CHARACTERISTICS_NX_COMPAT
# RUN: lld-link /out:%t.exe /nxcompat:no /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NONXCOMPAT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NONXCOMPAT %s
NONXCOMPAT-NOT: IMAGE_DLL_CHARACTERISTICS_NX_COMPAT
# RUN: lld-link /out:%t.exe /entry:main /swaprun:CD %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=SWAPCD %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=SWAPCD %s
# RUN: lld-link /out:%t.exe /entry:main /swaprun:cd,net %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=SWAPCD %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=SWAPCD %s
SWAPCD: IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOSWAPCD %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NOSWAPCD %s
NOSWAPCD-NOT: IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP
# RUN: lld-link /out:%t.exe /entry:main /swaprun:NeT %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=SWAPNET %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=SWAPNET %s
# RUN: lld-link /out:%t.exe /entry:main /swaprun:net,cd,cd,net %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=SWAPNET %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=SWAPNET %s
SWAPNET: IMAGE_FILE_NET_RUN_FROM_SWAP
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOSWAPNET %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NOSWAPNET %s
NOSWAPNET-NOT: IMAGE_FILE_NET_RUN_FROM_SWAP
# RUN: not lld-link /out:%t.exe /entry:main /swaprun: %t.obj 2>&1 | \
@ -91,15 +91,15 @@ SWAPERR2: /swaprun: invalid argument: foo
SWAPERR3: /swaprun: invalid argument: cdfoo
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=TSAWARE %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=TSAWARE %s
# RUN: lld-link /out:%t.exe /entry:main /tsaware %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=TSAWARE %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=TSAWARE %s
TSAWARE: IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE
# RUN: lld-link /tsaware:no /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOTSAWARE %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=NOTSAWARE %s
# RUN: lld-link /dll /out:%t.dll /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.dll | FileCheck -check-prefix=NOTSAWARE %s
# RUN: llvm-readobj --file-headers %t.dll | FileCheck -check-prefix=NOTSAWARE %s
# RUN: lld-link /tsaware /dll /out:%t.dll /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.dll | FileCheck -check-prefix=NOTSAWARE %s
# RUN: llvm-readobj --file-headers %t.dll | FileCheck -check-prefix=NOTSAWARE %s
NOTSAWARE-NOT: IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE

View File

@ -1,12 +1,12 @@
# RUN: yaml2obj %s > %t.obj
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj
# RUN: llvm-readobj -sections %t.dll | FileCheck %s
# RUN: llvm-readobj --sections %t.dll | FileCheck %s
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj /section:.foo,rwe
# RUN: llvm-readobj -sections %t.dll | FileCheck --check-prefix=SECTION %s
# RUN: llvm-readobj --sections %t.dll | FileCheck --check-prefix=SECTION %s
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj /merge:.foo=.bar
# RUN: llvm-readobj -sections -section-data %t.dll | FileCheck --check-prefix=MERGE %s
# RUN: llvm-readobj --sections --section-data %t.dll | FileCheck --check-prefix=MERGE %s
# RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj /merge:.foo=.bar /section:.foo,rwe
# RUN: llvm-readobj -sections %t.dll | FileCheck --check-prefix=MERGE-SECTION %s
# RUN: llvm-readobj --sections %t.dll | FileCheck --check-prefix=MERGE-SECTION %s
# CHECK: Name: .foo
# CHECK: Characteristics [

View File

@ -5,6 +5,6 @@ RUN: mkdir %t
RUN: mkdir %t/foo
RUN: lld-link /debug /pdb:%t/foo/./out.pdb /out:%t/out.exe /entry:main /nodefaultlib \
RUN: %t1.obj %t2.obj
RUN: llvm-readobj -coff-debug-directory %t/out.exe | FileCheck %s
RUN: llvm-readobj --coff-debug-directory %t/out.exe | FileCheck %s
CHECK: PDBFileName: {{.*}}tmp{{/|\\}}foo{{/|\\}}out.pdb

View File

@ -1,39 +1,39 @@
# RUN: yaml2obj %p/Inputs/empty.yaml > %t.obj
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:hello.pdb
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix HELLO %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix HELLO %s
# HELLO: PDBFileName: hello.pdb
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:%_Pdb%
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix PDBVAR %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix PDBVAR %s
# PDBVAR: PDBFileName: pdbaltpath.test.tmp.pdb
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_ExT%.pdb
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix EXTVAR %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix EXTVAR %s
# EXTVAR: PDBFileName: fooexe.pdb
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:%_PDB
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix NOCLOSE %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix NOCLOSE %s
# NOCLOSE: PDBFileName: %_PDB
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_PDB
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix NOCLOSE2 %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix NOCLOSE2 %s
# NOCLOSE2: PDBFileName: foo%_PDB
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_PDB%bar%_EXT
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix CLOSEONE %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix CLOSEONE %s
# CLOSEONE: PDBFileName: foopdbaltpath.test.tmp.pdbbar%_EXT
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_PDB%bar%_EXT%
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix CLOSETWO %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix CLOSETWO %s
# CLOSETWO: PDBFileName: foopdbaltpath.test.tmp.pdbbarexe
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_PDB%bar%_EXT%a
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix CLOSETWO2 %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix CLOSETWO2 %s
# CLOSETWO2: PDBFileName: foopdbaltpath.test.tmp.pdbbarexea
# RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%FoO%bar%r%a 2>&1 | FileCheck --check-prefix UNKNOWN-WARN %s
# RUN: llvm-readobj -coff-debug-directory %t.exe | FileCheck --check-prefix ENVVARS %s
# RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix ENVVARS %s
# UNKNOWN-WARN: only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping %FoO% as literal
# UNKNOWN-WARN: only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping %r% as literal
# ENVVARS: PDBFileName: foo%FoO%bar%r%a

View File

@ -7,7 +7,7 @@
EXE: {{H.e.l.l.o}}
# Verify the resource tree layout in the final executable.
# RUN: llvm-readobj -file-headers -coff-resources -section-data %t.exe | \
# RUN: llvm-readobj --file-headers --coff-resources --section-data %t.exe | \
# RUN: FileCheck --check-prefix=RESOURCE_INFO %s
RESOURCE_INFO: ResourceTableRVA: 0x2000

View File

@ -2,7 +2,7 @@
# RUN: echo /out:%t.exe /entry:main %t.obj > %t.rsp
# RUN: lld-link @%t.rsp /heap:0x3000
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
CHECK: SizeOfHeapReserve: 12288
# RUN: not lld-link --rsp-quoting=foobar @%t.rsp 2>&1 | \

View File

@ -2,29 +2,29 @@
# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /debug /pdbaltpath:test.pdb /dll /out:%t.dll /entry:DllMain %t.obj
# RUN: llvm-readobj -coff-debug-directory %t.dll > %t.1.txt
# RUN: llvm-readobj --coff-debug-directory %t.dll > %t.1.txt
# RUN: lld-link /debug /pdbaltpath:test.pdb /dll /out:%t.dll /entry:DllMain %t.obj
# RUN: llvm-readobj -coff-debug-directory %t.dll > %t.2.txt
# RUN: llvm-readobj --coff-debug-directory %t.dll > %t.2.txt
# RUN: cat %t.1.txt %t.2.txt | FileCheck %s
# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /debug /pdb:%t1.pdb /dll /out:%t.dll /entry:DllMain %t.obj
# RUN: llvm-readobj -coff-debug-directory %t.dll > %t.3.txt
# RUN: llvm-readobj --coff-debug-directory %t.dll > %t.3.txt
# RUN: lld-link /debug /pdb:%t2.pdb /dll /out:%t.dll /entry:DllMain %t.obj
# RUN: llvm-readobj -coff-debug-directory %t.dll > %t.4.txt
# RUN: llvm-readobj --coff-debug-directory %t.dll > %t.4.txt
# RUN: cat %t.3.txt %t.4.txt | FileCheck --check-prefix TWOPDBS %s
# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /Brepro /dll /out:%t.dll /entry:DllMain %t.obj
# RUN: llvm-readobj -coff-debug-directory %t.dll | FileCheck --check-prefix REPRO %s
# RUN: llvm-readobj --coff-debug-directory %t.dll | FileCheck --check-prefix REPRO %s
# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /Brepro /debug /dll /out:%t.dll /entry:DllMain %t.obj
# RUN: llvm-readobj -coff-debug-directory %t.dll | FileCheck --check-prefix REPRODEBUG %s
# RUN: llvm-readobj --coff-debug-directory %t.dll | FileCheck --check-prefix REPRODEBUG %s
# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /lldmingw /debug:dwarf /dll /out:%t.dll /entry:DllMain %t.obj
# RUN: llvm-readobj -coff-debug-directory %t.dll | FileCheck --check-prefix MINGW %s
# RUN: llvm-readobj --coff-debug-directory %t.dll | FileCheck --check-prefix MINGW %s
# CHECK: File: [[FILE:.*]].dll
# CHECK: DebugDirectory [

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -triple i686-windows-msvc %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj %S/Inputs/except_handler3.lib -safeseh -out:%t.exe -opt:noref -entry:main
# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s
# RUN: llvm-readobj --coff-load-config %t.exe | FileCheck %s
# CHECK: SEHTable [
# CHECK-NEXT: 0x

View File

@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -triple i686-windows-msvc %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -safeseh -out:%t.exe -entry:main
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# This object lacks a _load_config_used global, so we set
# IMAGE_DLL_CHARACTERISTICS_NO_SEH even though there is an exception handler.

View File

@ -1,11 +1,11 @@
# REQUIRES: x86
# RUN: llvm-mc -triple i686-windows-msvc %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -safeseh -out:%t.exe -opt:noref -entry:main
# RUN: llvm-readobj -coff-basereloc -coff-load-config -file-headers %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: llvm-readobj --coff-basereloc --coff-load-config --file-headers %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: lld-link %t.obj -safeseh -out:%t.exe -opt:noref -entry:main -debug:dwarf
# RUN: llvm-readobj -coff-basereloc -coff-load-config -file-headers %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: llvm-readobj --coff-basereloc --coff-load-config --file-headers %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: lld-link %t.obj -safeseh -out:%t.exe -opt:ref -entry:main
# RUN: llvm-readobj -coff-basereloc -coff-load-config -file-headers %t.exe | FileCheck %s --check-prefix=CHECK-GC
# RUN: llvm-readobj --coff-basereloc --coff-load-config --file-headers %t.exe | FileCheck %s --check-prefix=CHECK-GC
# __safe_se_handler_table needs to be relocated against ImageBase.
# check that the relocation is present.

View File

@ -1,19 +1,19 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
# RUN: /section:.foo,r %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck -check-prefix=R %s
# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=R %s
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
# RUN: /section:.foo,w %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck -check-prefix=W %s
# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=W %s
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
# RUN: /section:.foo,e %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck -check-prefix=E %s
# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=E %s
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
# RUN: /section:.foo,s %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck -check-prefix=S %s
# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=S %s
# R: Characteristics [
# R-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA

View File

@ -1,12 +1,12 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /debug /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck %s
# RUN: llvm-readobj --sections %t.exe | FileCheck %s
# RUN: lld-link /debug:dwarf /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck %s
# RUN: llvm-readobj --sections %t.exe | FileCheck %s
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck -check-prefix=NODEBUG %s
# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=NODEBUG %s
# RUN: lld-link /debug:symtab /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck -check-prefix=NODEBUG %s
# RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=NODEBUG %s
# CHECK: Name: .text
# CHECK: Name: .reloc

View File

@ -1,25 +1,25 @@
# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
DEFAULT: SizeOfStackReserve: 1048576
DEFAULT: SizeOfStackCommit: 4096
# RUN: lld-link /out:%t.exe /entry:main %t.obj /stack:0x3000
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: echo "STACKSIZE 12288" > %t.def
# RUN: lld-link /out:%t.exe /entry:main /def:%t.def %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
CHECK1: SizeOfStackReserve: 12288
CHECK1: SizeOfStackCommit: 4096
# RUN: lld-link /out:%t.exe /entry:main %t.obj /stack:0x5000,0x3000
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
# RUN: echo "STACKSIZE 20480,12288" > %t.def
# RUN: lld-link /out:%t.exe /entry:main /def:%t.def %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
CHECK2: SizeOfStackReserve: 20480
CHECK2: SizeOfStackCommit: 12288

View File

@ -12,7 +12,7 @@
# output SymbolCount: 0 (and dumpbin.exe would error out with "invalid file
# or disk full, cannot seek to 0x1602").
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# CHECK: SymbolCount: 199
.global main

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /dll /noentry /out:%t.dll %t.obj
# RUN: llvm-readobj -file-headers %t.dll | FileCheck %s
# RUN: llvm-readobj --file-headers %t.dll | FileCheck %s
# CHECK: MajorOperatingSystemVersion: 42
# CHECK: MinorOperatingSystemVersion: 43

View File

@ -2,7 +2,7 @@
# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.o
# RUN: lld-link -lldmingw %t.o -out:%t.exe
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# CHECK: AddressOfEntryPoint: 0x1001
# CHECK: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)

View File

@ -1,18 +1,18 @@
# RUN: sed -e s/ENTRYNAME/main/ %s | yaml2obj > %t.obj
# RUN: lld-link /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=MAIN %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=MAIN %s
# RUN: sed s/ENTRYNAME/wmain/ %s | yaml2obj > %t.obj
# RUN: lld-link /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=WMAIN %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WMAIN %s
# RUN: sed s/ENTRYNAME/WinMain/ %s | yaml2obj > %t.obj
# RUN: lld-link /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=WINMAIN %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WINMAIN %s
# RUN: sed s/ENTRYNAME/wWinMain/ %s | yaml2obj > %t.obj
# RUN: lld-link /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=WWINMAIN %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WWINMAIN %s
# MAIN: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
# WMAIN: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj %s > %t.obj
# RUN: lld-link /out:%t.exe %t.obj 2>&1 | FileCheck -check-prefix=WARN %s
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# WARN: warning: found main and WinMain; defaulting to /subsystem:console
# CHECK: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI

View File

@ -1,18 +1,18 @@
# RUN: sed -e s/ENTRYNAME/_main/ %s | yaml2obj > %t.obj
# RUN: lld-link /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=MAIN %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=MAIN %s
# RUN: sed s/ENTRYNAME/_wmain/ %s | yaml2obj > %t.obj
# RUN: lld-link /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=WMAIN %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WMAIN %s
# RUN: sed s/ENTRYNAME/_WinMain@16/ %s | yaml2obj > %t.obj
# RUN: lld-link /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=WINMAIN %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WINMAIN %s
# RUN: sed s/ENTRYNAME/_wWinMain@16/ %s | yaml2obj > %t.obj
# RUN: lld-link /out:%t.exe %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=WWINMAIN %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WWINMAIN %s
# MAIN: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
# WMAIN: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI

View File

@ -1,6 +1,6 @@
# RUN: lld-link /entry:main /out:%t.exe /subsystem:windows \
# RUN: %p/Inputs/ret42.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
CHECK1: MajorOperatingSystemVersion: 6
CHECK1: MinorOperatingSystemVersion: 0
@ -10,7 +10,7 @@ CHECK1: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
# RUN: lld-link /entry:main /out:%t.exe /subsystem:windows,8.9 \
# RUN: %p/Inputs/ret42.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
CHECK2: MajorOperatingSystemVersion: 8
CHECK2: MinorOperatingSystemVersion: 9

View File

@ -4,7 +4,7 @@
# RUN: lld-link -dll -entry:f -out:%t.dll -implib:%t.lib %tobject.obj
# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %tmain.obj %s
# RUN: lld-link -entry:main -out:%t.exe -opt:ref -debug:dwarf %tmain.obj %t.lib
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck %s
# RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s
# CHECK-NOT: Symbol: f

View File

@ -1,13 +1,13 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /debug:dwarf /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -symbols %t.exe | FileCheck %s
# RUN: llvm-readobj --symbols %t.exe | FileCheck %s
# RUN: lld-link /debug:dwarf /opt:noref /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -symbols %t.exe | FileCheck %s
# RUN: llvm-readobj --symbols %t.exe | FileCheck %s
# RUN: lld-link /debug:symtab /opt:noref /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -symbols %t.exe | FileCheck %s
# RUN: llvm-readobj --symbols %t.exe | FileCheck %s
# RUN: lld-link /debug /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -symbols %t.exe | FileCheck -check-prefix=NO %s
# RUN: llvm-readobj --symbols %t.exe | FileCheck -check-prefix=NO %s
# CHECK: Symbols [
# CHECK-NEXT: Symbol {

View File

@ -3,9 +3,9 @@ RUN: yaml2obj %p/Inputs/generic.yaml > %t.obj
RUN: lld-link %t.obj /debug /Brepro /entry:main /nodefaultlib /out:%t.1.exe
RUN: lld-link %t.obj /debug /Brepro /entry:main /nodefaultlib /out:%t.2.exe
RUN: lld-link %t.obj /debug /timestamp:0 /entry:main /nodefaultlib /out:%t.3.exe
RUN: llvm-readobj -file-headers -coff-debug-directory %t.1.exe | FileCheck %s --check-prefix=HASH
RUN: llvm-readobj -file-headers -coff-debug-directory %t.2.exe | FileCheck %s --check-prefix=HASH
RUN: llvm-readobj -file-headers -coff-debug-directory %t.3.exe | FileCheck %s --check-prefix=ZERO
RUN: llvm-readobj --file-headers --coff-debug-directory %t.1.exe | FileCheck %s --check-prefix=HASH
RUN: llvm-readobj --file-headers --coff-debug-directory %t.2.exe | FileCheck %s --check-prefix=HASH
RUN: llvm-readobj --file-headers --coff-debug-directory %t.3.exe | FileCheck %s --check-prefix=ZERO
HASH: ImageFileHeader {
HASH: TimeDateStamp: [[STAMP:.*]]

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# CHECK: TLSTableRVA: 0x1000
# CHECK: TLSTableSize: 0x28

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
# CHECK: TLSTableRVA: 0x1000
# CHECK: TLSTableSize: 0x18

View File

@ -1,11 +1,11 @@
# RUN: yaml2obj < %s > %t.obj
#
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=HEADER %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=HEADER %s
# RUN: llvm-objdump -unwind-info %t.exe | FileCheck -check-prefix=UNWIND %s
#
# RUN: lld-link /merge:.pdata=.rdata /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers -sections %t.exe | FileCheck -check-prefix=HEADER-MERGE %s
# RUN: llvm-readobj --file-headers --sections %t.exe | FileCheck -check-prefix=HEADER-MERGE %s
#
# HEADER: ExceptionTableRVA: 0x3000
#

View File

@ -1,19 +1,19 @@
# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
DEFAULT: MajorImageVersion: 0
DEFAULT: MinorImageVersion: 0
# RUN: lld-link /out:%t.exe /entry:main %t.obj /version:11
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
CHECK1: MajorImageVersion: 11
CHECK1: MinorImageVersion: 0
# RUN: lld-link /out:%t.exe /entry:main %t.obj /version:11.22
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
CHECK2: MajorImageVersion: 11
CHECK2: MinorImageVersion: 22

View File

@ -14,7 +14,7 @@ bar:
.xword bar
// RUN: ld.lld -shared -o %t.so %t.o
// RUN: llvm-readobj -symbols -dyn-relocations %t.so | FileCheck %s
// RUN: llvm-readobj --symbols --dyn-relocations %t.so | FileCheck %s
// CHECK: Dynamic Relocations {
// CHECK-NEXT: {{.*}} R_AARCH64_RELATIVE - [[BAR_ADDR:.*]]

View File

@ -5,7 +5,7 @@
# RUN: llvm-objdump -d %t | FileCheck %s
# RUN: ld.lld -shared %t1 %t2 -o %t3
# RUN: llvm-objdump -d %t3 | FileCheck -check-prefix=DSO %s
# RUN: llvm-readobj -s -r %t3 | FileCheck -check-prefix=DSOREL %s
# RUN: llvm-readobj -S -r %t3 | FileCheck -check-prefix=DSOREL %s
# 0x11024 - 36 = 0x11000
# 0x11028 - 24 = 0x11010

View File

@ -3,7 +3,7 @@
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %p/Inputs/relocation-copy.s -o %t2.o
// RUN: ld.lld -shared %t2.o -soname fixed-length-string.so -o %t2.so
// RUN: ld.lld %t.o %t2.so -o %t3
// RUN: llvm-readobj -s -r --expand-relocs -symbols %t3 | FileCheck %s
// RUN: llvm-readobj -S -r --expand-relocs --symbols %t3 | FileCheck %s
// RUN: llvm-objdump -d %t3 | FileCheck -check-prefix=CODE %s
// RUN: llvm-objdump -s -section=.rodata %t3 | FileCheck -check-prefix=RODATA %s

View File

@ -3,7 +3,7 @@
// RUN: llvm-mc %p/Inputs/aarch64-copy2.s -o %t2.o -filetype=obj -triple=aarch64-pc-linux
// RUN: ld.lld %t2.o -o %t2.so -shared
// RUN: ld.lld %t.o %t2.so -o %t
// RUN: llvm-readobj -t %t | FileCheck %s
// RUN: llvm-readobj --symbols %t | FileCheck %s
.global _start
_start:

View File

@ -4,7 +4,7 @@
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %p/Inputs/shared.s -o %t-lib.o
# RUN: ld.lld -shared %t-lib.o -o %t-lib.so
# RUN: ld.lld %t-lib.so %t.o -o %t.exe
# RUN: llvm-readobj -dyn-relocations %t.exe | FileCheck %s
# RUN: llvm-readobj --dyn-relocations %t.exe | FileCheck %s
## Checks if got access to dynamic objects is done through a got relative
## dynamic relocation and not using plt relative (R_AARCH64_JUMP_SLOT).

View File

@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
// RUN: ld.lld -static %t.o -o %tout
// RUN: llvm-readobj -symbols %tout | FileCheck %s
// RUN: llvm-readobj --symbols %tout | FileCheck %s
// Check that no __rela_iplt_end/__rela_iplt_start
// appear in symtab if there is no references to them.

Some files were not shown because too many files have changed in this diff Show More