This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add support for the Win32 hook prologue (try 3)


On 09/11/2009 12:48 PM, Stefan Dösinger wrote:
Am Friday 11 September 2009 20:51:29 schrieb Kai Tietz:
Hmm, I think config/i386/i386.c is the better place for this, as wine
uses linux target compiler to compile some DLLs, and I asume this
feature should be used there, too. Or am I wrong here?

Sorry, yes. config/i386/winnt.c is correct. I was wrong here.
Wine uses the linux target to compile its code. The files in the end are .so
files. There's some magic to embed PE headers in them, but from the
compiler's point of view they are .so files. We also use the Linux dynamic
loader to load them.

In which case, hooking into ASM_DECLARE_FUNCTION_NAME will be tricky, but doable. You may want to follow the lead of ASM_DECLARE_RESULT in elfos.h and define a normally empty macro you can override in i386 generic code.

Please use as many functions in i386.c / winnt.c as you can,
as opposed to putting actual code into the header files.


r~



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]