RE : problem of non-pic code due to asm code.

PICCA Frédéric-Emmanuel
Fri Aug 21 21:50:00 GMT 2009


> I don't understand what you are asking.

> Are you saying that code compiled with -fPIC is invalid?  That sounds
> like a bug, but I couldn't see it in your e-mail.  If that is the
> problem, please show us a small example with the generated assembly
> code.  And don't forget to tell us which version of gcc you are using.

No I am just saying that both jpeg_xxx_mmx.c files contain
asm code handwritten. And even if I compile them with the
-fPIC flag, this asm code is non-pic due to code like the one I posted in
the previous mail. So once compile it is not valid for a shared library.

And I do not know enought of asm to write it the right way for a shared library.
So I asked if someone with more asm experience could look at the code and tell me what
is wrong with it.

I red a gentoo introduction about non-pic fix

I think the 8.5 section is related to my problem.

I am using the gcc 4.3 from debian/unstable.

I tryed to explain this in my previous mail.

Is it clearer ?

Sorry for my poor english, It is not my mother tongue.

> Or are you saying that the code was not compiled with -fPIC, and
> therefore you can not use it in a shared library?  


> If that is the
> problem, then the only option is to recompile it with -fPIC.  There is
> no way to convert non-PIC into PIC after it has been compiled.

I understand but thr poblem is with the asm code in the file.


More information about the Gcc-help mailing list