This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Building libstdc++ non-shared with -fpic ?


On Jun 30, 2000, Ingo Rohloff <lundril@gmx.net> wrote:

>> > Now if you try to build a shared library, which uses code of a 
>> > static libstdc++, this will lead to problems, because the
>> > static libstdc++ will contain code which is NOT position 
>> > independent. 
>> 
>> No, it won't lead to problems - at least not if these two library
>> copies had the same source code, and where compiled by the same
>> compiler release. You can certainly combine non-PIC code into a shared
>> library, at least on Linux.

> How is this possible ?

It isn't always possible.  It depends on support from dynamic loaders,
to perform relocations on non-PIC code.  But then, since they will be
modifying code pages of the shared library, the pages will not be
shareable between multiple processes.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]