Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: linux-mips@fnet.fr, linux@cthulhu.engr.sgi.com
Subject: gcc -shared ... -lc ?
Date: Mon, 5 Jan 1998 18:45:10 +0100	[thread overview]
Message-ID: <19980105184510.65220@alpha.franken.de> (raw)

Hi,

while compiling redhat 5.0 rpms, I've found something very strange, when
building shared libraries. Some of the built shared libs are very big and
a nm on them shows, that the whole libc (I guess so) is included.  Binaries
inked against these library just dump core. The built line for these shared 
libs always ends with a -lc. Now I'm wondering wether this is a ld bug or
just a user error. What's really weird is the following patch from one
of the redhat rpms:

--- termcap-2.0.8/Makefile.ewt  Tue Jul  8 11:08:00 1997
+++ termcap-2.0.8/Makefile      Tue Jul  8 11:08:12 1997
@@ -41,7 +41,7 @@
 
 $(SHARED_LIB): $(OBJS)
        cd pic; \
-       $(CC) -shared -o ../$@ -Wl,-soname,$(SONAME_SHARED_LIB) $(OBJS)
+       $(CC) -shared -o ../$@ -Wl,-soname,$(SONAME_SHARED_LIB) $(OBJS) -lc
 
 pic:
        -if [ ! -d pic ]; then mkdir pic; fi

So it looks like the ld for alpha and i386 don't include the whole libc
when linked with the comand line above. Any hints ?

Thomas.

-- 
See, you not only have to be a good coder to create a system like Linux,
you have to be a sneaky bastard too ;-)
                   [Linus Torvalds in <4rikft$7g5@linux.cs.Helsinki.FI>]

             reply	other threads:[~1998-01-05 17:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-05 17:45 Thomas Bogendoerfer [this message]
1998-01-05 18:10 ` gcc -shared ... -lc ? Timothy Stonis
1998-01-05 21:09 ` ralf
1998-01-05 23:16   ` Thomas Bogendoerfer
1998-01-06  0:08     ` Alan Cox
1998-01-06  0:08       ` Alan Cox
1998-01-06  5:31       ` ralf
1998-01-06 15:21       ` Thomas Bogendoerfer
1998-01-06 20:11     ` Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980105184510.65220@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=linux-mips@fnet.fr \
    --cc=linux@cthulhu.engr.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox