This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: libgcc_s : What links to it and why?


Jeff Blaine <jblaine@mitre.org> writes:

> > I have no explanation for this behaviour.  If you run the link
> > command
> > using the -v option, does it pass -lgcc_s to the linker?  Is there any
> > chance that you somewhere have a file named libgcc.so?  (You should
> > normally have libgcc.a and libgcc_s.so).

> subversion-1.2.0:cairo> ldd subversion/clients/cmdline/.libs/svn |
> grep libgcc
>          libgcc_s.so.1 =>         /usr/rcf/lib/libgcc_s.so.1

This in itself doesn't prove that your program was linked with
libgcc_s.so.  It may be the case that your program was linked with
something which uses uses libgcc_s.so.

To see whether your program was linked with libgcc_s.so, you need to
do something like "objdump -p FILE | grep NEEDED".  If you see
libgcc_s.so on that list, then your program was linked with
libgcc_s.so.

ldd, on the other hand, does the transitive closure.  That is, ldd
will print any shared library which was used by your program or by any
shared library which your program linked against, recursively.

> Yes, there is a /usr/rcf/lib/libgcc_s.so that MUST remain where it is.
> I simply don't want to link to it with my *other* (production) GCC.

Actually, I was asking whether you had a libgcc.so file somewhere.
That would be another way to get a dependency on libgcc_s.so: if -lgcc
causes the linker to find libgcc.so, and that file has a DT_SONAME of
libgcc_s.so.

Ian


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