Subject: Shared libraries and symbols

From: Michael Meskes <[email-masked]>
Date: Sun, 1 Sep 1996 12:31:27 +0200 (MET DST)

Can we strip shared libraries? I don't know whether that's possible but I
just found out that 'nm /lib/libc.so.5.4.4' (yes, I know this is not the
Debian version) on my system gives:

/lib/libc.so.5.4.4: no symbols

However, almost all other shared libraries come with symbols, some even with
debugging sysmbols (at least strip -g is able to reduce the library size).
If these symbols are not needed I'd like to ask all libraries to be stripped
since it saves an awful lot of disk space. If for some reasons the symbols
are needed could anyone tell me why my libc works?

Michael

-- 
Michael Meskes                   |    _____ ________ __  ____
[email-masked] |   / ___// ____/ // / / __ \___  __________
[email-masked]                  |   \__ \/ /_  / // /_/ /_/ / _ \/ ___/ ___/
[email-masked]                |  ___/ / __/ /__  __/\__, /  __/ /  (__  )
Use Debian GNU/Linux!            | /____/_/      /_/  /____/\___/_/  /____/

---

From: Dominik Kubla <[email-masked]>
Date: Mon, 02 Sep 1996 21:20:02 +0200

Hi Michael,

[...]
> /lib/libc.so.5.4.4: no symbols

This is most certainly a bug!

[...]
> are needed could anyone tell me why my libc works?

Try debug a dynamically linked binary using gdb and you will see lots of
messages about loading symbols from the shared libraries ...

I would prefer to keep the symbols in the libraries.

CU,
  Dominik
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Visit the FAN SITE of the WORLD LEAGUE OF AMERICAN FOOTBALL:
<A HREF="http://www.uni-mainz.de/~kubla/WLAF/Welcome.html>HTTP</A> or
<A HREF="file:/afs/zdv.uni-mainz.de/homes/UFO/kubla/public_html/WLAF/Welcome.ht
ml">AFS file</A> access.

---

From: Michael Meskes <[email-masked]>
Date: Tue, 3 Sep 1996 08:23:15 +0200 (MET DST)

Hi Dominik,

> This is most certainly a bug!

Why? It works without a problem. I got this libc by using David's Debian
files with HJ's sources.

> messages about loading symbols from the shared libraries ...

circe:meskes 108) nm /lib/libc.so.5.4.4
/lib/libc.so.5.4.4: no symbols
circe:meskes 109) ./t
Segmentation fault (core dumped)
circe:meskes 110) gdb t core
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.15.1 (i486-linux), Copyright 1995 Free Software Foundation, Inc...
Core was generated by ./t'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.5.4.4...done.
Reading symbols from /lib/ld-linux.so.1...done.
#0  0x4006eeb4 in memmove ()

So where's the problem? 

> I would prefer to keep the symbols in the libraries.

As for the static libraries they have to be kept but the for the shared
ones? Also I don't see any reason why debugging symbols are kept. I ran
`strip -g` on my libraries and saved about 500K (sorry don't know the
libraries that had the debugging symbols).

Michael