Nachträgliches linken von binaries
Nils Bokermann
nilsb at bermuda.de
Wed Dec 22 15:43:33 CET 1999
Florian Lohoff writes:
> On Wed, Dec 22, 1999 at 11:58:17AM +0100, Nils Bokermann wrote:
> > > ld -m elf_i386 -static -o test-static -L/usr/lib/gcc-lib/i486-linux/2.7.2.3 test -lgcc -lc -lgcc
> > ^^^
> [...]
> > > (flo at paradigm)/tmp/i# ldd test-static
> > > libc.so.6 => /lib/libc.so.6 (0x4000f000)
> > ^^^^^^^^^^^^
> > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> > > (flo at paradigm)/tmp/i# ./test-static
> > > Segmentation fault
> >
> > Is klar, du hast 2 mal die libc dadrin (und die libgcc auch [aber net
> > weiter schlimm, weil die eh static is])
>
> Falsch - Das statische glibc/libgcc dazulinken sollte nur unresolved symbols
> aufloesen. Das problem ist ein anderes ..
>
> (root at paradigm)/tmp/i$ objdump -x ./test-static | grep UND
> 00000000 F *UND* 00000007 __libc_init_first
> 00000000 F *UND* 0000003e atexit
> 00000000 F *UND* 000000e0 exit
> 00000000 w *UND* 00000000 __gmon_start__
>
> Jetzt laeuft das minimal binary - Allerdings ist did dependency auf
> libc6 und ld-linux.so.2 immer noch vorhanden ...
IMO bekommst du die ld-linux nich weg (wie auch -- ohne dynamic linker
is halt mist....) Und sonst... Weiss net.
Bye, Nils
--
Nils Bokermann /"\
Johanneswerkstr. 90 \ / ASCII Ribbon Campaign
33613 Bielefeld x Say NO to HTML in email and news
Germany / \
More information about the Linux
mailing list