Re: [AD] proposed patch for nicer asm symbols exports

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, Aug 07, 2004, Eric Botcazou wrote:
> >    However, on x86 library code need not be compiled with -fPIC because
> > the architecture allows linking non-PIC code with PIC code in the same
> > object.
> 
> In a shared object???
> 
> What is the sense of
> 
>     movl %eax, my_global
> 
> in a shared library then, where my_global is defined by the library?  More
> precisely, given 2 executables using the shared library, what happens when
> this line is executed by one of them?

   I am not sure I understand your question. If you are suggesting
that one executable may affect the other, this is simply not possible,
shared objects only share code. It's better if it's PIC code, because
the dynamic loader has fewer relocations to do, but on x86 it's not
mandatory.

-- 
Sam.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/