fe44a531e0
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
32 lines
875 B
ArmAsm
32 lines
875 B
ArmAsm
# REQUIRES: x86
|
|
|
|
# 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
|
|
|
|
# NO-EXPORTS-NOT: Name:
|
|
|
|
.global _foobar
|
|
.global _DllMainCRTStartup@12
|
|
.global _dataSym
|
|
.text
|
|
_DllMainCRTStartup@12:
|
|
ret
|
|
_foobar:
|
|
ret
|
|
.data
|
|
_dataSym:
|
|
.int 4
|
|
|
|
# Test specifying -exclude-all-symbols, on an object file that contains
|
|
# dllexport directive for some of the symbols. In this case, the dllexported
|
|
# symbols are still exported.
|
|
|
|
# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
|
|
#
|
|
# RUN: lld-link -safeseh:no -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
|
|
|
|
# DLLEXPORT: Name: exportfn3
|