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)


Pedro Alves writes:
>Eh, then this doesn't make much sense to me then:
>
>   "In order for the linker to produce a hotpatchable image, the .obj files
>   must have been compiled with /hotpatch (Create Hotpatchable Image)."
>
>By my reading, that implies that there's _something_ in the .obj
>files to tag functions that might need the padding. 

I don't understand that reading at all.  All that it's saying is that
using /functionpadmin alone won't make the resulting image hotpatchable.
You also need to compile with /hotpatch for the two-byte NOP to be
added at the start of every function, as the linker the won't do this.
The linker doesn't care which functions need the minimum padding,
as the /functionpadmin option applies to *all* functions in the image,
regardless of what prologue they might have.  The /hotpatch option works
similarily, every function in the resulting object file will have the
initial two-byte NOP.  There's no way in Microsoft's system to say only
certain functions in the image need to be hotpatchable, the intention
is that it's all-or-nothing.

					Ross Ridge


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