[PATCH] [PECOFF] Don't set IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE if "-fixed" is provided
Ron Ofir
ron.ofir at gmail.com
Fri Jul 26 09:02:04 PDT 2013
Changed WriterPECOFF to not set the IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE flag if "-fixed" is provided to the driver.
http://llvm-reviews.chandlerc.com/D1224
Files:
WriterPECOFF.cpp
Index: WriterPECOFF.cpp
===================================================================
--- WriterPECOFF.cpp
+++ WriterPECOFF.cpp
@@ -195,7 +195,6 @@
// be set, but regular binaries seem to have these bits, so we follow
// them.
uint16_t dllCharacteristics =
- llvm::COFF::IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE |
llvm::COFF::IMAGE_DLL_CHARACTERISTICS_NO_SEH;
if (targetInfo.isTerminalServerAware())
dllCharacteristics |=
@@ -202,6 +201,8 @@
llvm::COFF::IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE;
if (targetInfo.isNxCompat())
dllCharacteristics |= llvm::COFF::IMAGE_DLL_CHARACTERISTICS_NX_COMPAT;
+ if (targetInfo.getBaseRelocationEnabled())
+ dllCharacteristics |= llvm::COFF::IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE;
_peHeader.DLLCharacteristics = dllCharacteristics;
_peHeader.SizeOfStackReserve = targetInfo.getStackReserve();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1224.1.patch
Type: text/x-patch
Size: 926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130726/61b4ff2a/attachment.bin>
More information about the llvm-commits
mailing list