[PATCH] D30709: Handle IMAGE_REL_AMD64_ADDR32NB in RuntimeDyldCOFF

Janosch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 02:23:01 PST 2018


LepelTsmok added a comment.

> 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.

For the current case I know the source code, the compiler flags and everything. But their might be the case that I don't have the source code and only the object file.

> But you're using an object file that explicitly expects __ImageBase to be an IMAGE_DOS_HEADER header.

Even if I set /__ImageBase to the original value, or the lowest section - it doesn't matter. When the crash occures the RIP register will always have the address I overloaded __ImageBase with.

> Using clang/llvm tools to generate the object file, would probably be a better start.

I agree on that, but this can't help me with object files I don't have the code for.

> 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.

I tried this already


Repository:
  rL LLVM

https://reviews.llvm.org/D30709





More information about the llvm-commits mailing list