<div dir="ltr">Reverted in r313414. Thank you for pointing it out!</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 13, 2017 at 10:14 AM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We probably want to revert this patch now that r303374 is reverted.<div><br></div><div>Peter</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, May 18, 2017 at 1:26 PM, Rui Ueyama via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br>
Date: Thu May 18 15:26:58 2017<br>
New Revision: 303378<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=303378&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=303378&view=rev</a><br>
Log:<br>
Set IMAGE_DLL_CHARACTERISTICS_NO_B<wbr>IND.<br>
<br>
Our output is not compatible with the Binding feature, so make it<br>
explicit that.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D33336" rel="noreferrer" target="_blank">https://reviews.llvm.org/D3333<wbr>6</a><br>
<br>
Modified:<br>
    lld/trunk/COFF/Config.h<br>
    lld/trunk/COFF/Driver.cpp<br>
    lld/trunk/COFF/Writer.cpp<br>
    lld/trunk/test/COFF/hello32.te<wbr>st<br>
    lld/trunk/test/COFF/options.te<wbr>st<br>
<br>
Modified: lld/trunk/COFF/Config.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Config.h?rev=303378&r1=303377&r2=303378&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/COFF/Config.h?<wbr>rev=303378&r1=303377&r2=303378<wbr>&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/Config.h (original)<br>
+++ lld/trunk/COFF/Config.h Thu May 18 15:26:58 2017<br>
@@ -155,7 +155,6 @@ struct Configuration {<br>
   uint32_t MajorOSVersion = 6;<br>
   uint32_t MinorOSVersion = 0;<br>
   bool DynamicBase = true;<br>
-  bool AllowBind = true;<br>
   bool NxCompat = true;<br>
   bool AllowIsolation = true;<br>
   bool TerminalServerAware = true;<br>
<br>
Modified: lld/trunk/COFF/Driver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=303378&r1=303377&r2=303378&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/COFF/Driver.cp<wbr>p?rev=303378&r1=303377&r2=3033<wbr>78&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/Driver.cpp (original)<br>
+++ lld/trunk/COFF/Driver.cpp Thu May 18 15:26:58 2017<br>
@@ -820,8 +820,6 @@ void LinkerDriver::link(ArrayRef<co<wbr>nst c<br>
     Config->ManifestInput.push_ba<wbr>ck(Arg->getValue());<br>
<br>
   // Handle miscellaneous boolean flags.<br>
-  if (Args.hasArg(OPT_allowbind_no)<wbr>)<br>
-    Config->AllowBind = false;<br>
   if (Args.hasArg(OPT_allowisolatio<wbr>n_no))<br>
     Config->AllowIsolation = false;<br>
   if (Args.hasArg(OPT_dynamicbase_n<wbr>o))<br>
<br>
Modified: lld/trunk/COFF/Writer.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.cpp?rev=303378&r1=303377&r2=303378&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/COFF/Writer.cp<wbr>p?rev=303378&r1=303377&r2=3033<wbr>78&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/Writer.cpp (original)<br>
+++ lld/trunk/COFF/Writer.cpp Thu May 18 15:26:58 2017<br>
@@ -615,14 +615,19 @@ template <typename PEHeaderTy> void Writ<br>
   PE->SizeOfStackCommit = Config->StackCommit;<br>
   PE->SizeOfHeapReserve = Config->HeapReserve;<br>
   PE->SizeOfHeapCommit = Config->HeapCommit;<br>
+<br>
+  // Import Descriptor Tables and Import Address Tables are merged<br>
+  // in our output. That's not compatible with the Binding feature<br>
+  // that is sort of prelinking. Setting this flag to make it clear<br>
+  // that our outputs are not for the Binding.<br>
+  PE->DLLCharacteristics = IMAGE_DLL_CHARACTERISTICS_NO_B<wbr>IND;<br>
+<br>
   if (Config->AppContainer)<br>
     PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_APPC<wbr>ONTAINER;<br>
   if (Config->DynamicBase)<br>
     PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_DYNA<wbr>MIC_BASE;<br>
   if (Config->HighEntropyVA)<br>
     PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_HIGH<wbr>_ENTROPY_VA;<br>
-  if (!Config->AllowBind)<br>
-    PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_NO_B<wbr>IND;<br>
   if (Config->NxCompat)<br>
     PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_NX_C<wbr>OMPAT;<br>
   if (!Config->AllowIsolation)<br>
<br>
Modified: lld/trunk/test/COFF/hello32.te<wbr>st<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/hello32.test?rev=303378&r1=303377&r2=303378&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/test/COFF/hell<wbr>o32.test?rev=303378&r1=303377&<wbr>r2=303378&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/COFF/hello32.te<wbr>st (original)<br>
+++ lld/trunk/test/COFF/hello32.te<wbr>st Thu May 18 15:26:58 2017<br>
@@ -41,9 +41,10 @@ HEADER-NEXT:   MinorSubsystemVersion: 0<br>
 HEADER-NEXT:   SizeOfImage: 16896<br>
 HEADER-NEXT:   SizeOfHeaders: 512<br>
 HEADER-NEXT:   Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)<br>
-HEADER-NEXT:   Characteristics [ (0x9140)<br>
+HEADER-NEXT:   Characteristics [ (0x9940)<br>
 HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_APP<wbr>CONTAINER (0x1000)<br>
 HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_DYN<wbr>AMIC_BASE (0x40)<br>
+HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_NO_<wbr>BIND (0x800)<br>
 HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_NX_<wbr>COMPAT (0x100)<br>
 HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_TER<wbr>MINAL_SERVER_AWARE (0x8000)<br>
 HEADER-NEXT:   ]<br>
<br>
Modified: lld/trunk/test/COFF/options.te<wbr>st<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/options.test?rev=303378&r1=303377&r2=303378&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/test/COFF/opti<wbr>ons.test?rev=303378&r1=303377&<wbr>r2=303378&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/COFF/options.te<wbr>st (original)<br>
+++ lld/trunk/test/COFF/options.te<wbr>st Thu May 18 15:26:58 2017<br>
@@ -2,13 +2,7 @@<br>
<br>
 # RUN: lld-link /out:%t.exe /entry:main %t.obj<br>
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=BIND %s<br>
-# RUN: lld-link /allowbind /out:%t.exe /entry:main %t.obj<br>
-# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=BIND %s<br>
-BIND-NOT: IMAGE_DLL_CHARACTERISTICS_NO_B<wbr>IND<br>
-<br>
-# RUN: lld-link /allowbind:no /out:%t.exe /entry:main %t.obj<br>
-# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOBIND %s<br>
-NOBIND: IMAGE_DLL_CHARACTERISTICS_NO_B<wbr>IND<br>
+BIND: IMAGE_DLL_CHARACTERISTICS_NO_B<wbr>IND<br>
<br>
 # RUN: lld-link /out:%t.exe /entry:main %t.obj<br>
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=ISO %s<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-1717822122088158018gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</font></span></div>
</blockquote></div><br></div>