Mail Archives: djgpp/2003/04/25/04:13:47
Eric Rudd (rudd AT cyberoptics DOT com) wrote:
: I thought that routines in libc.a could be called
: from a program compiled either with or without -fomit-frame-pointer, but
: I found that I could call the existing div.o in libc.a only if I didn't
: use -fomit-frame-pointer. Hmm...
If I'm not terribly wrong, that should always work. Either the libc
function uses ebp as frame pointer, in which case it must save it. Or
it doesn't, in which case if it uses ebp to other things it must put
some value it wants there (and save ebp to it doesn't clobber it of
course). So you can't have a bad value in ebp unless the compiler or
the code is broken. And the code is not broken (in that way) as it's
plain C so ebp isn't available to be messed up.
It looks like your gcc or the gcc used to compile libc is broken. And
of those two it most likely is your gcc as different compilations
flags for you make a difference.
Right,
MartinS
- Raw text -