Add additional code to function (c/c++) while compiling

Ian Lance Taylor ian@wasabisystems.com
Thu Apr 15 15:15:00 GMT 2004


Raphael Zulliger <zulliger@indel.ch> writes:

> i would like to add a very simple stack-protection (for our own-brewed
> os) to the code compiled with gcc 3.x. therefore i should be able to
> add about 5 lines of PPC assembler to each function body... first i
> hoped this should be quite easy - but it seams to be harder than
> expected. at least for me.

You might try taking a look at how -fstack-check is implemented.

Ian



More information about the Gcc-help mailing list