Jeremy White wrote:
> I apologize if this is/was made clear in the elf-dll conversation/code;
> I didn't track that conversation (and the winehq search hasn't come back
> to me yet).
This is not covered in elf-dlls because libwine.so will never occur in
the dll-list (it is not a dll). However, you can try one more thing if
you are desperate. A real hack, but worth trying if you *really* need to
put the PE-header in front of the .text section (which I believe you
don't). You can add a seperate section to sny .so if you edit the
linker-script to put it in front of the .text section. Anyhow, you need
to declare it in the linker-script if you want it to be in the final
object (unless you have a catch all in the linker-script, but that is
most likely at the end). You need to flag this section as read/write and
to be page-aligned.
If you can do with the PE-header anywhere, then you must adjust the RVAs
to be negative (they should wrap). I don't know whether VC will like it,
but it should basically not complain here. You can't get the absolute
addresses of .text and .data/.rodata normally, but you can link in a
couple of dummy objects that declare some global labels in each section.
These objects should be linked as first and last. Be sure to reference
the labels in the core-objects, otherwise they will not necessarily get
linked into the final object.
Hope this gives some inspiration.
Greetings Bertho