alsa-lib 1.0.2 -fPIC problem with gcc 3.4
Falk Hueffner
falk.hueffner@student.uni-tuebingen.de
Sun Feb 8 13:13:00 GMT 2004
Jan Killius <jkillius@arcor.de> writes:
> there seems to be a problem with the assembler code and -fPIC. My
> question is, it is a gcc problem or a code problem. And how we can
> solve it ?
Gcc inline assembly is not designed for whole functions. Best would be
to simply put the code into a .s file and compile it seperately. That
would also improve readability.
If you absolutely have to use inline assembly (I don't see any reason,
but some people seem to fanatically insist on it), save and restore
the PIC register manually inside the asm and don't mark it as
clobbered.
--
Falk
More information about the Gcc-help
mailing list