| # RUN: yaml2obj %p/Inputs/hello.obj.yaml > %t.obj |
| # |
| # RUN: lld -flavor link /out:%t1.exe /subsystem:console /force -- %t.obj |
| # RUN: llvm-readobj -file-headers %t1.exe | FileCheck %s \ |
| # RUN: --check-prefix=DYNAMICBASE |
| # |
| # RUN: lld -flavor link /out:%t2.exe /subsystem:console /force /dynamicbase:no \ |
| # RUN: -- %t.obj |
| # RUN: llvm-readobj -file-headers %t2.exe | FileCheck %s \ |
| # RUN: --check-prefix=NODYNAMICBASE |
| # |
| # RUN: lld -flavor link /out:%t3.exe /subsystem:console /force /fixed -- %t.obj |
| # RUN: llvm-readobj -file-headers %t3.exe | FileCheck %s \ |
| # RUN: --check-prefix=NODYNAMICBASE |
| # |
| # RUN: not lld -flavor link /out:%t4.exe /subsystem:console /force /fixed \ |
| # RUN: /dynamicbase -- %t.obj 2> %t.err |
| # RUN: FileCheck %s --check-prefix=DYNAMIC-AND-FIXED < %t.err |
| |
| DYNAMICBASE: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE |
| |
| NODYNAMICBASE-NOT: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE |
| |
| DYNAMIC-AND-FIXED: /dynamicbase must not be specified with /fixed |