[PATCH] D30709: Handle IMAGE_REL_AMD64_ADDR32NB in RuntimeDyldCOFF

Frederich Munch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 09:29:43 PST 2018


marsupial added a comment.

In https://reviews.llvm.org/D30709#1019309, @LepelTsmok wrote:

> > I think what you're trying to do just isn't unsupported at this time.
>
> So it is supported?


Should have read: I think what you're trying to do just **isn't supported** at this time.

> I will not always have the source code

Which seems to imply you also won't know the flags it was compiled with thus making it difficult to setup the target machine to match.

> I agree! But when I overload an address "no body knows" that it is a function it appears to be a normal address which could be form a variable as well.

But you're using an object file that explicitly expects __ImageBase  to be an IMAGE_DOS_HEADER  header.
The code generated could be attempting to access data from offsets/sections that aren't mapped properly.

Using clang/llvm tools to generate the object file, would probably be a better start.
It might make more sense to post on the LLVM list as to exactly what you are trying to accomplish and why it must be done this way.


Repository:
  rL LLVM

https://reviews.llvm.org/D30709





More information about the llvm-commits mailing list