Eli Bendersky <eliben@xxxxxxxxx> writes: > What I'm trying to see is how to convince GCC to generate NON-PIC code > and link it into a shared library for x64. I only managed to do this > with "-fno-PIC -mcmodel=large", and I wonder why with other memory > models it doesn't work out. I suspect this has to do with some > artifact of x64's addressing modes for symbol offsets. Yes. If it were easy to permit non-PIC x86_64 code in a shared library, gcc would do it. But the only way to do that is, as you say, to use the large memory model, which is relatively inefficient. Ian