2015-07-10 03:54:13 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/machine-x64.yaml > %t.obj
|
[COFF] Implement /safeseh:no and check @feat.00 flags by default
Summary:
Fixes PR41828. Before this, LLD always emitted SafeSEH chunks and
defined __safe_se_handler_table & size. Now, /safeseh:no leaves those
undefined.
Additionally, we were checking for the safeseh @feat.00 flag in two
places: once to emit errors, and once during safeseh table construction.
The error was set up to be off by default, but safeseh is supposed to be
on by default. I combined the two checks, so now LLD emits an error if
an input object lacks @feat.00 and safeseh is enabled. This caused the
majority of 32-bit LLD tests to fail, since many test input object files
lack @feat.00 symbols. I explicitly added -safeseh:no to those tests to
preserve behavior.
Finally, LLD no longer sets IMAGE_DLL_CHARACTERISTICS_NO_SEH if any
input file wasn't compiled for safeseh.
Reviewers: mstorsjo, ruiu, thakis
Reviewed By: ruiu, thakis
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63570
llvm-svn: 366238
2019-07-17 02:17:33 +08:00
|
|
|
# RUN: lld-link -safeseh:no /entry:main /subsystem:console /out:%t.exe %t.obj
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
|
[COFF] Implement /safeseh:no and check @feat.00 flags by default
Summary:
Fixes PR41828. Before this, LLD always emitted SafeSEH chunks and
defined __safe_se_handler_table & size. Now, /safeseh:no leaves those
undefined.
Additionally, we were checking for the safeseh @feat.00 flag in two
places: once to emit errors, and once during safeseh table construction.
The error was set up to be off by default, but safeseh is supposed to be
on by default. I combined the two checks, so now LLD emits an error if
an input object lacks @feat.00 and safeseh is enabled. This caused the
majority of 32-bit LLD tests to fail, since many test input object files
lack @feat.00 symbols. I explicitly added -safeseh:no to those tests to
preserve behavior.
Finally, LLD no longer sets IMAGE_DLL_CHARACTERISTICS_NO_SEH if any
input file wasn't compiled for safeseh.
Reviewers: mstorsjo, ruiu, thakis
Reviewed By: ruiu, thakis
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63570
llvm-svn: 366238
2019-07-17 02:17:33 +08:00
|
|
|
# RUN: lld-link -safeseh:no /entry:main /subsystem:console /machine:x64 \
|
2015-07-08 07:39:18 +08:00
|
|
|
# RUN: /out:%t.exe %t.obj
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
|
2015-05-30 00:06:00 +08:00
|
|
|
|
2015-07-10 03:54:13 +08:00
|
|
|
AMD64: Machine: IMAGE_FILE_MACHINE_AMD64
|
2015-05-30 00:06:00 +08:00
|
|
|
|
2015-07-10 03:54:13 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/machine-x86.yaml > %t.obj
|
[COFF] Implement /safeseh:no and check @feat.00 flags by default
Summary:
Fixes PR41828. Before this, LLD always emitted SafeSEH chunks and
defined __safe_se_handler_table & size. Now, /safeseh:no leaves those
undefined.
Additionally, we were checking for the safeseh @feat.00 flag in two
places: once to emit errors, and once during safeseh table construction.
The error was set up to be off by default, but safeseh is supposed to be
on by default. I combined the two checks, so now LLD emits an error if
an input object lacks @feat.00 and safeseh is enabled. This caused the
majority of 32-bit LLD tests to fail, since many test input object files
lack @feat.00 symbols. I explicitly added -safeseh:no to those tests to
preserve behavior.
Finally, LLD no longer sets IMAGE_DLL_CHARACTERISTICS_NO_SEH if any
input file wasn't compiled for safeseh.
Reviewers: mstorsjo, ruiu, thakis
Reviewed By: ruiu, thakis
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63570
llvm-svn: 366238
2019-07-17 02:17:33 +08:00
|
|
|
# RUN: lld-link -safeseh:no /entry:main /subsystem:console /out:%t.exe %t.obj
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=I386 %s
|
[COFF] Implement /safeseh:no and check @feat.00 flags by default
Summary:
Fixes PR41828. Before this, LLD always emitted SafeSEH chunks and
defined __safe_se_handler_table & size. Now, /safeseh:no leaves those
undefined.
Additionally, we were checking for the safeseh @feat.00 flag in two
places: once to emit errors, and once during safeseh table construction.
The error was set up to be off by default, but safeseh is supposed to be
on by default. I combined the two checks, so now LLD emits an error if
an input object lacks @feat.00 and safeseh is enabled. This caused the
majority of 32-bit LLD tests to fail, since many test input object files
lack @feat.00 symbols. I explicitly added -safeseh:no to those tests to
preserve behavior.
Finally, LLD no longer sets IMAGE_DLL_CHARACTERISTICS_NO_SEH if any
input file wasn't compiled for safeseh.
Reviewers: mstorsjo, ruiu, thakis
Reviewed By: ruiu, thakis
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63570
llvm-svn: 366238
2019-07-17 02:17:33 +08:00
|
|
|
# RUN: lld-link -safeseh:no /entry:main /subsystem:console /machine:x86 \
|
2015-07-09 09:25:49 +08:00
|
|
|
# RUN: /out:%t.exe %t.obj /fixed
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=I386 %s
|
2015-05-30 00:06:00 +08:00
|
|
|
|
2015-07-10 03:54:13 +08:00
|
|
|
I386: Machine: IMAGE_FILE_MACHINE_I386
|
2015-07-08 07:39:18 +08:00
|
|
|
|
2015-07-10 03:54:13 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/machine-x64.yaml > %t.obj
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: not lld-link /entry:main /subsystem:console /machine:x86 \
|
2015-07-09 09:25:49 +08:00
|
|
|
# RUN: /out:%t.exe %t.obj /fixed >& %t.log
|
2015-07-08 07:39:18 +08:00
|
|
|
# RUN: FileCheck -check-prefix=INCOMPAT %s < %t.log
|
|
|
|
|
2015-07-10 03:54:13 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/machine-x86.yaml > %t1.obj
|
|
|
|
# RUN: sed -e s/main/foo/ %p/Inputs/machine-x64.yaml | yaml2obj > %t2.obj
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: not lld-link /entry:main /subsystem:console /out:%t.exe \
|
2015-07-08 07:39:18 +08:00
|
|
|
# RUN: %t1.obj %t2.obj >& %t.log
|
|
|
|
# RUN: FileCheck -check-prefix=INCOMPAT %s < %t.log
|
|
|
|
|
2015-07-10 03:54:13 +08:00
|
|
|
INCOMPAT: .obj: machine type x64 conflicts with x86
|