[LLVMdev] Implementing the hotpatch attribute for X86

Anton Korobeynikov anton at korobeynikov.info
Wed Oct 27 01:34:34 PDT 2010


> I don't know how GCC handles this case. They may do the padding in the
> compiler. You are going to have to look at exactly what GCC does and
> whatever hotpatch loader Wine uses to figure out what to do, but it
> will most likely be incompatible with the Windows implementation.
Why? I don't see how this might be incompatible with what MS linker does;
in any case the end result should be the same.

gcc just emits series of bytes before the function (16 in 32 bit code,
32 - in 64 bit code).
0xcccccccc is used as a filler.

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list