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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PICCA Frédéric-Emmanuel <frederic-emmanuel.picca@xxxxxxxxxxxxxxxxxxxxx>
writes:

> 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.

Ah, I see.  You need to rewrite references to global variables to go
through a register.

movl    _128mm@GOTPCREL(%rip),%rax
psubw     mm2,(%rax)

The easiest way to see the right code to generate is to write C code
which accesses a global variable in the same way, compile it with the -S
option, and look at the resulting assembly code.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux