nanogui: Thread: stripping libraries


[<<] [<] Page 1 of 1 [>] [>>]
Subject: stripping libraries
From: Robert Hartley ####@####.####
Date: 31 Jan 2001 12:14:57 -0000
Message-Id: <3A78027F.A673F67E@ics.com>

Alex,

I was having problems with unresolved references.
I put libc, libm, and ld-2.0.7.so in my  /lib fdirectory.
It was kind of big, so I ran the strip command on it, and it shrank way down and
fits nicely on the Helio:

ls -l /opt/tvt/helio-image/root/lib/
total 1624
-rwxrwxr-x    1 root     root       361302 Jan 29 14:42 ld-2.0.7.so*
lrwxrwxrwx    1 root     root           11 Jan 30 15:51 ld.so.1 -> ld-2.0.7.so*
-rwxr-xr-x    1 root     root       991360 Jan 29 14:15 libc-2.0.7.so*
lrwxrwxrwx    1 root     root           13 Jan 30 15:51 libc.so.6 ->
libc-2.0.7.so*
-rwxr-xr-x    1 root     root       287572 Jan 29 14:15 libm-2.0.7.so*
lrwxrwxrwx    1 root     root           13 Jan 30 15:51 libm.so.6 ->
libm-2.0.7.so*

I think the trick is to strip the shared library after it is built.

For example, trying:
file /lib/libc-2.1.3.so
on my Mandrake 7.2 system returned:
/lib/libc-2.1.3.so: ELF 32-bit LSB shared object, Intel 80386, version 1,
stripped

I do not remember stripping them myself, (although I may have accidently)


Robert



Alex Holden wrote:

> On Wed, 31 Jan 2001, Yu Xuanwei wrote:
> > > Don't do that- strip removes the symbols which are needed when linking the
> > > objects together. You can strip the program after it's been linked
> > > together.
> > I doubt it. As far as I know, a striped library is available.
>
> [alex@hyperspace tea-total]# rm -f teatotal
> [alex@hyperspace tea-total]# strip *.o
> [alex@hyperspace tea-total]# make teatotal
> gcc  -s -o teatotal teatotal.o teauntea.o tea-kgen.o randdev.o tead.o
> teatun.o teash.o teacp.o teaprot.o huffman.o heap.o base64.o md5.o btea.o
> readkey.o lineget.o util.o getarg.o
> /usr/lib/crt1.o: In function `_start':
> /usr/lib/crt1.o(.text+0x36): undefined reference to `main'
> collect2: ld returned 1 exit status
> make: *** [teatotal] Error 1
> [alex@hyperspace tea-total]#
>

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=  Robert Hartley                 Mail:         201 Broadway        =
=  Central Region Systems Engineer              Cambridge, MA 02139 =
=  Integrated Computer            Email:        ####@####.####    =
=  Solutions, Inc.                Web Site:     www.ics.com         =
=  Tech Support: ####@####.####  Phone:        800-800-4271        =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Visit the MotifZone (www.motifzone.org) for info on Motif!



Subject: Re: stripping libraries
From: Alex Holden ####@####.####
Date: 31 Jan 2001 12:38:12 -0000
Message-Id: <Pine.LNX.4.04.10101311240450.606-100000@hyperspace.linuxhacker.org>

On Wed, 31 Jan 2001, Robert Hartley wrote:
> I think the trick is to strip the shared library after it is built.

That's right, you weren't stripping shared libraries though, you were
stripping the unlinked object files (which strips away the information
needed to link them together).

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/

Subject: Re: stripping libraries
From: Robert Hartley ####@####.####
Date: 31 Jan 2001 12:45:53 -0000
Message-Id: <3A7809C1.F130C73A@ics.com>

Alex Holden wrote:

> > I think the trick is to strip the shared library after it is built.
>
> That's right, you weren't stripping shared libraries though, you were
> stripping the unlinked object files (which strips away the information
> needed to link them together).

Aha!

Alex,

Thank you for this early morning clarification,

Robert

Subject: Re: stripping libraries
From: Alex Holden ####@####.####
Date: 31 Jan 2001 13:05:58 -0000
Message-Id: <Pine.LNX.4.04.10101311308090.606-100000@hyperspace.linuxhacker.org>

On Wed, 31 Jan 2001, Robert Hartley wrote:
> Thank you for this early morning clarification,

I'm in the GMT time zone, so it's actually early in the afternoon for me.

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/

Subject: Re: stripping libraries
From: "Yu Xuanwei" ####@####.####
Date: 1 Feb 2001 01:16:41 -0000
Message-Id: <01c101c08bed$666e7980$6400000a@sinocluster.com>

----- Original Message -----
From: Robert Hartley ####@####.####
Cc: nanogui linuxhacker ####@####.####
Sent: Wednesday, January 31, 2001 8:18 PM
Subject: stripping libraries


> Alex,
>
> I was having problems with unresolved references.
> I put libc, libm, and ld-2.0.7.so in my  /lib fdirectory.
> It was kind of big, so I ran the strip command on it, and it shrank way
down and
> fits nicely on the Helio:
>
> ls -l /opt/tvt/helio-image/root/lib/
> total 1624
> -rwxrwxr-x    1 root     root       361302 Jan 29 14:42 ld-2.0.7.so*
> lrwxrwxrwx    1 root     root           11 Jan 30 15:51 ld.so.1 ->
ld-2.0.7.so*
> -rwxr-xr-x    1 root     root       991360 Jan 29 14:15 libc-2.0.7.so*
> lrwxrwxrwx    1 root     root           13 Jan 30 15:51 libc.so.6 ->
> libc-2.0.7.so*
> -rwxr-xr-x    1 root     root       287572 Jan 29 14:15 libm-2.0.7.so*
> lrwxrwxrwx    1 root     root           13 Jan 30 15:51 libm.so.6 ->
> libm-2.0.7.so*
>
> I think the trick is to strip the shared library after it is built.
Right! It's available.
>
> For example, trying:
> file /lib/libc-2.1.3.so
> on my Mandrake 7.2 system returned:
> /lib/libc-2.1.3.so: ELF 32-bit LSB shared object, Intel 80386, version 1,
> stripped
>
> I do not remember stripping them myself, (although I may have accidently)
>
>
> Robert
>
>
>
> Alex Holden wrote:
>
> > On Wed, 31 Jan 2001, Yu Xuanwei wrote:
> > > > Don't do that- strip removes the symbols which are needed when
linking the
> > > > objects together. You can strip the program after it's been linked
> > > > together.
> > > I doubt it. As far as I know, a striped library is available.
> >
> > [alex@hyperspace tea-total]# rm -f teatotal
> > [alex@hyperspace tea-total]# strip *.o
> > [alex@hyperspace tea-total]# make teatotal
> > gcc  -s -o teatotal teatotal.o teauntea.o tea-kgen.o randdev.o tead.o
> > teatun.o teash.o teacp.o teaprot.o huffman.o heap.o base64.o md5.o
btea.o
> > readkey.o lineget.o util.o getarg.o
> > /usr/lib/crt1.o: In function `_start':
> > /usr/lib/crt1.o(.text+0x36): undefined reference to `main'
> > collect2: ld returned 1 exit status
> > make: *** [teatotal] Error 1
> > [alex@hyperspace tea-total]#
> >
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> =  Robert Hartley                 Mail:         201 Broadway        =
> =  Central Region Systems Engineer              Cambridge, MA 02139 =
> =  Integrated Computer            Email:        ####@####.####    =
> =  Solutions, Inc.                Web Site:     www.ics.com         =
> =  Tech Support: ####@####.####  Phone:        800-800-4271        =
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> Visit the MotifZone (www.motifzone.org) for info on Motif!
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.