[PATCH] D35767: [COFF] Correctly set the thumb bit in DLL export addresses

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 22 22:31:08 PDT 2017


mstorsjo added a comment.

In https://reviews.llvm.org/D35767#818232, @compnerd wrote:

> Does link actually set the ISA selection bit on the EAT entries?  I don't remember that behaviour from it and I dont have it on hand to check.


Yes, I checked with MS link.exe and this matches what it does.



================
Comment at: COFF/DLL.cpp:331
       } else {
-        write32le(P, cast<Defined>(E.Sym)->getRVA());
+        write32le(P, cast<Defined>(E.Sym)->getRVA() + Offset);
       }
----------------
compnerd wrote:
> Don't use `+1`.  If the ISA selection bit is set, then you will have erased it.
Ok, will change into `| 1` instead.


https://reviews.llvm.org/D35767





More information about the llvm-commits mailing list