* gcc error at link-edit - help needed
@ 2005-06-13 12:36 Derbey Nadia
0 siblings, 0 replies; only message in thread
From: Derbey Nadia @ 2005-06-13 12:36 UTC (permalink / raw)
To: gcc-help
Hi,
I'm writing a library that calls the stat() syscall.
Building the library works fine.
When trying to compile a test program that uses this library I get the
following error during link-edit:
---
/usr/bin/ld: tst_lib_1: hidden symbol `stat' in
/usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make: *** [tst_lib_1] Error 1
---
Does anybody have an idea of what is happening?
Versions:
gcc: gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
ld: GNU ld version 2.15.92.0.2 20040927
Note: I tried to compile a small test program that calls stat() without
any intermediate library, and everything worked fine. So I'm wondering
whether the problem comes from the way I'm building my library. Here's
the line extracted from my Makefile:
$(CC) -o $@ -shared -Wl,--whole-archive -Wl,--soname -Wl,$(VSONAME)
-nostdlib -nostartfiles $(COBJS)
Please Cc me, since I'm not subscribed
Thanks for your help,
Nadia
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-13 12:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-13 12:36 gcc error at link-edit - help needed Derbey Nadia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).