Hi,
Thank you for your response.
I also received a response from Mr. Scott Collins
and he also suggested that I look into xptcall. As of
this time, however, I can't get my Stackguard-compiled
plug-in to fail! :) Plug-ins refer to third-party application
like Acrobat reader. If I compile it with StackGuard, it
should fail...
> I see you did not post a response to blizzard's question.
Sorry about not responding to Mr. Blizzard's question. It's
because I don't have something definite to answer him yet.
Stackguard is a modified gcc compiler. I think the modifications
were under 100 lines and all can be found in gcc's function_prologue()
and function_epilogue() in i386.c.
It pushes a canary value (dynamically computed at run-time) before
the calling functions return address. Additional code is then placed
in the function epilogue() to check for this
canary value before returning to the caller's address.
I don't think an application can tell if a specific library is compiled
by stackguard or not. I'm also not sure and hopefully,
I can find this out soon since this is also an important part of
the project.
Again, thanks for the response. :)
Leslie
> Do you need to modify the calling convention for all calls? or
> only some limited set?
>
> Are you seeing specific problems?
>
> If you recompile *everything* then I'd expect this to mostly
> work. One place you'd have problems with is xptcall.
> See: http://www.mozilla.org/scriptable/xptcall-faq.html
>
> This is platform specific asm code that aims to make and use the
> same call signatures that the compiler would generate. If you are
> dealing with code that will call or be called by objects using
> xptcall then you'd need to modify your copy of that code for your
> specific platform.
>
> I'll be happy to try to answer specific questions. Let's keep any
> discussion on the newsgroups to invite insight from others.
>
> John.