[PATCH] Preliminary support for dynamically loadable coff objects

Lang Hames lhames at gmail.com
Tue Feb 24 13:08:39 PST 2015


Hi Andy,

> I'd be happy to add a test -- would checking in an object file be ok, or would you rather have the test input be an assembly file?

> 

> If the latter, I'll have to figure out how to express what I want in your assembly syntax.


I usually just take some IR that requires the relocations that I want to test, then run it through llc to get the assembly. Then you can add a few rtdyld-check lines to verify that the relocations are correctly applied.

The various *.s files under llvm/test/ExecutionEngine/RuntimeDyld/ should give you an idea of the rtdyld-check syntax, but if anything's unclear I'd be happy to help out.

> I'll probably hold off refactoring for architecture unless you feel strongly we should do it now.


I have a strong preference for the refactor being done before this is committed. You don't have to go as far with the refactor as RuntimeDyldMachO does (i.e using the curiously recursive template idiom). You can just subclass RuntimeDyldCOFF and implement processRelocationRef, resolveRelocation and finalizeObject in the the RuntimeDyldCOFF_X86_64 subclass if you like.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7793

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list