RE: Reducing glibc with mklibs.sh

3 messages, 3 authors, 2001-10-24 · open the first message on its own page

RE: Reducing glibc with mklibs.sh

From: Jean-Denis Boyer <hidden>
Date: 2001-10-18 13:07:04

A couple of things are missing in your configuration for mklibs.sh
to properly work. I spent many hours finding what was the exact
configuration to have mklibs.sh properly works.
I understood when I installed Debian Linux on a PC,
and looked how the boot-floppies package was installed.
That was a lot easier than understanding the script.

First, the map files should be present along with the pic files.
Next, to properly reduce libc, mklibs.sh needs two or three
(depending on the glibc version) objects files:
    soinit.o sofini.o interp.o
AFAIK, mklibs.sh needs extra object files only for libc.

As an example, I successfully cross-reduced glibc-2.2.4 for powerpc-linux,
on my ix86 Redhat.
The files were installed in the following hierarchy:
  /usr/local/powerpc-linux/lib/libc_pic.a
  /usr/local/powerpc-linux/lib/libc_pic.map
  /usr/local/powerpc-linux/lib/libc_pic/interp.o
  /usr/local/powerpc-linux/lib/libc_pic/soinit.o
  /usr/local/powerpc-linux/lib/libc_pic/sofini.o

The map file is generated along with the pic file, when building the libc
package.
It may have a different name, like 'libc.map', but mklibs.sh looks for
'libc_pic.map'.
The object files are found under the directory elf/ (also in glibc build)
with the extension .os.

Note: I successfully reduced libpthread.so, also.

Good luck.
--------------------------------------------
 Jean-Denis Boyer, B.Eng., Technical Leader
 Mediatrix Telecom Inc.
 4229 Garlock Street
 Sherbrooke (Québec)
 J1L 2C8  CANADA
 (819)829-8749 x241
--------------------------------------------

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

RE: Reducing glibc with mklibs.sh

From: Michael Habermann <hidden>
Date: 2001-10-24 02:04:06

At 09:07 AM 10/18/2001 -0400, Jean-Denis Boyer wrote:
A couple of things are missing in your configuration for mklibs.sh
to properly work. I spent many hours finding what was the exact
configuration to have mklibs.sh properly works.
Thank you very much, it worked in exactly this way. I could reduce my
libc-2.2.2 from 1.1 MB to 500 kB now.

For the other people trying this here is my script I execute after
compiling and installing  glibc 2.2.2:

---
#!/bin/sh
cp libc_pic.a ../lib/
cp libc.map ../lib/libc_pic.map
mkdir ../lib/libc_pic
cp elf/interp.os ../lib/libc_pic/interp.o
cp elf/soinit.os ../lib/libc_pic/soinit.o
cp elf/sofini.os ../lib/libc_pic/sofini.o
---


Note: I successfully reduced libpthread.so, also.

How have you done the libthread? Standard compilation for glibc produces
_pic only for libc on my system. My libm is still quite large.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Reducing glibc with mklibs.sh

From: Mark Hatle <hidden>
Date: 2001-10-24 02:21:47

quoted
Note: I successfully reduced libpthread.so, also.
How have you done the libthread? Standard compilation for glibc produces
_pic only for libc on my system. My libm is still quite large.
I suggest you download the Hard Hat Linux (ftp.mvista.com) source rpm
for glibc.  I believe there is either a patch or a special "step" in the
%install section of the rpm spec file.

(It works for LOT, but is probably applicable to mklibs.sh)

--Mark

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help