[uClibc]troubles with Busybox and latest uClibc CVS snapshot

Tom Cameron TCameron at stmarysbank.com
Thu May 31 18:32:09 UTC 2001


Wayne,
	As far as running ldd on these apps, it will NOT work unless you
have installed the uClibc libraries on the host machine.  Basically, what's
happening is when you compile BusyBox and TinyLogin vs. uClibc, we're
telling them to link against uClibc's libraries, and that their "eventual"
location will be /lib.  When you run ldd, what you're seeing is ldd looking
for the libraries in /lib...and they're not there.
	Now, that being said, if you were to run ldd on the target machine,
you would get the expected results, hopefully.  (Un?)fortunately, BusyBox
does NOT have an LDD built in, so you're out of luck on this one.  Anyway, I
just wanted to let you know.
	Oh, one more thing, if you're trying to run the programs (BB and/or
Tinylogin) on the host machine and haven't installed the libraries on it (to
/lib), then you're S.O.L. too, for the same reasoning as the LDD problem.
Good luck, and keep us posted.

--
Thomas Cameron
Network Technician / Operations Specialist
St. Mary's Bank
"First in the Nation, Second to none"

> -----Original Message-----
> From:	Wayne Buckhanan [SMTP:buck at andrews.edu]
> Sent:	Thursday, May 31, 2001 2:00 PM
> To:	Erik Andersen
> Cc:	uclibc at uclibc.org
> Subject:	Re: [uClibc]troubles with Busybox and lastest uClibc CVS
> snapshot
> 
> I'm not sure what changed but I can get busybox 0.51 to compile with
> today's
> snapshot of uClibc.
> 
> On Thu, May 31, 2001 at 10:35:11AM -0600, Erik Andersen wrote:
> > This suggests to me that you compiled uClibc with "HAS_MMU=false" in
> > your Config...
> 
> That may have been the case for the snapshot I downloaded on the 28th
> since it didn't seem to set HAS_MMU at all unless the proc was an SH.
> But I'm positive that the snapshot from yesterday has HAS_MMU=true.
> 
> > This is very odd.  updwtmp() is enabled in tinylogin/utmp.c in the CVS
> > version.  Could you try with the latest from CVS?
> The CVS of tinylogin compiles fine.
> 
> Now I'm confused why I can't run busybox or tinylogin on my devel sys.
> 
> bash$ ldd tinylogin
> /usr/bin/ldd: ./tinylogin: No such file or directory
> bash$ ./tinylogin
> bash: ./tinylogin: No such file or directory
> 
> bash$ ldd busybox
> /usr/bin/ldd: ./busybox: No such file or directory
> bash$ ./busybox
> bash: ./busybox: No such file or directory
> 
> I tried setting my LD_LIBRARY_PATH to where I installed the libs and
> that doesn't seem to make a difference.
> 
> While I'm on a roll at breaking things I've managed to recreate Andreas'
> ldd troubles under a RedHat install (likely 7.0 but it might be 6.2, can't
> remember which).
> 
> bash$ ldd ~/WLinB/i386-linux-uclibc/lib/libuClibc-0.9.5.so 
> ldd: warning: you do not have execution permission for
> `/homes/buck/WLinB/i386-linux-uclibc/lib/libuClibc-0.9.5.so'
>         /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40030000)
>         ld-uclibc.so.0 =>
> /home/buck/WLinB/i386-linux-uclibc/lib/ld-uclibc.so.0 (0x40032000)
>         libc.so.6 => /lib/libc.so.6 (0x4003d000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> bash$ readelf -ld ~/WLinB/i386-linux-uclibc/lib/libuClibc-0.9.5.so 
> 
> Elf file is DYN (Shared object file)
> Entry point 0xdaf0
> There are 3 program headers, starting at offset 34:
> 
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   LOAD           0x000000 0x00000000 0x00000000 0x2b0c7 0x2b0c7 R E 0x1000
>   LOAD           0x02b0e0 0x0002c0e0 0x0002c0e0 0x0039c 0x02804 RW 0x1000
>   DYNAMIC        0x02b41c 0x0002c41c 0x0002c41c 0x00060 0x00060 RW  0x4
> 
>  Section to Segment mapping:
>   Segment Sections...
>    00     .hash .dynsym .dynstr .rel.text .rel.rodata .rel.data .text
> .rodata 
>    01     .data .got .dynamic .bss 
>    02     .dynamic 
> 
> Dynamic segment at offset 0x2b41c contains 12 entries:
>   Tag        Type                         Name/Value
>   0x00000001 (NEEDED)                     Shared library: [ld-uclibc.so.0]
>   0x0000000e (SONAME)                     Library soname: [libc.so.0]
>   0x00000004 (HASH)                       0x94
>   0x00000005 (STRTAB)                     0x4344
>   0x00000006 (SYMTAB)                     0x1474
>   0x0000000a (STRSZ)                      7279 (bytes)
>   0x0000000b (SYMENT)                     16 (bytes)
>   0x00000011 (REL)                        0x5fb4
>   0x00000012 (RELSZ)                      31536 (bytes)
>   0x00000013 (RELENT)                     8 (bytes)
>   0x00000016 (TEXTREL)                    0
>   0x00000000 (NULL)                       0
> bash$ readelf -ld tinylogin
> 
> Elf file is EXEC (Executable file)
> Entry point 0x804f750
> There are 5 program headers, starting at offset 34:
> 
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   PHDR           0x000034 0x08048034 0x08048034 0x000a0 0x000a0 R E 0x4
>   INTERP         0x0000d4 0x080480d4 0x080480d4 0x00014 0x00014 R   0x1
>       [Requesting program interpreter: /lib/ld-uclibc.so.0]
>   LOAD           0x000000 0x08048000 0x08048000 0x09ce8 0x09ce8 R E 0x1000
>   LOAD           0x009d00 0x08052d00 0x08052d00 0x003d0 0x01694 RW 0x1000
>   DYNAMIC        0x00a050 0x08053050 0x08053050 0x00080 0x00080 RW  0x4
> 
>  Section to Segment mapping:
>   Segment Sections...
>    00     
>    01     .interp 
>    02     .interp .hash .dynsym .dynstr .rel.bss .rel.plt .plt .text
> .rodata 
>    03     .data .got .dynamic .bss 
>    04     .dynamic 
> 
> Dynamic segment at offset 0xa050 contains 16 entries:
>   Tag        Type                         Name/Value
>   0x00000001 (NEEDED)                     Shared library: [libcrypt.so.0]
>   0x00000001 (NEEDED)                     Shared library: [libc.so.0]
>   0x00000004 (HASH)                       0x80480e8
>   0x00000005 (STRTAB)                     0x8048edc
>   0x00000006 (SYMTAB)                     0x804855c
>   0x0000000a (STRSZ)                      1217 (bytes)
>   0x0000000b (SYMENT)                     16 (bytes)
>   0x00000015 (DEBUG)                      0
>   0x00000003 (PLTGOT)                     0x8052e68
>   0x00000002 (PLTRELSZ)                   952 (bytes)
>   0x00000014 (PLTREL)                     REL
>   0x00000017 (JMPREL)                     0x80493d0
>   0x00000011 (REL)                        0x80493a0
>   0x00000012 (RELSZ)                      48 (bytes)
>   0x00000013 (RELENT)                     8 (bytes)
>   0x00000000 (NULL)                       0
> bash$ readelf -ld ../busybox-0.51/busybox
> 
> Elf file is EXEC (Executable file)
> Entry point 0x806201c
> There are 5 program headers, starting at offset 34:
> 
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   PHDR           0x000034 0x08048034 0x08048034 0x000a0 0x000a0 R E 0x4
>   INTERP         0x0000d4 0x080480d4 0x080480d4 0x00014 0x00014 R   0x1
>       [Requesting program interpreter: /lib/ld-uclibc.so.0]
>   LOAD           0x000000 0x08048000 0x08048000 0x1fa2a 0x1fa2a R E 0x1000
>   LOAD           0x01fa40 0x08068a40 0x08068a40 0x00e8c 0x04ae8 RW 0x1000
>   DYNAMIC        0x020854 0x08069854 0x08069854 0x00078 0x00078 RW  0x4
> 
>  Section to Segment mapping:
>   Segment Sections...
>    00     
>    01     .interp 
>    02     .interp .hash .dynsym .dynstr .rel.bss .rel.plt .plt .text
> .rodata 
>    03     .data .got .dynamic .bss 
>    04     .dynamic 
> 
> Dynamic segment at offset 0x20854 contains 15 entries:
>   Tag        Type                         Name/Value
>   0x00000001 (NEEDED)                     Shared library: [libc.so.0]
>   0x00000004 (HASH)                       0x80480e8
>   0x00000005 (STRTAB)                     0x80494d0
>   0x00000006 (SYMTAB)                     0x8048760
>   0x0000000a (STRSZ)                      1729 (bytes)
>   0x0000000b (SYMENT)                     16 (bytes)
>   0x00000015 (DEBUG)                      0
>   0x00000003 (PLTGOT)                     0x8069530
>   0x00000002 (PLTRELSZ)                   1584 (bytes)
>   0x00000014 (PLTREL)                     REL
>   0x00000017 (JMPREL)                     0x8049bc4
>   0x00000011 (REL)                        0x8049b94
>   0x00000012 (RELSZ)                      48 (bytes)
>   0x00000013 (RELENT)                     8 (bytes)
>   0x00000000 (NULL)                       0
> bash$ 
> 
> -- 
> Wayne Buckhanan					buck at andrews.edu
> Piro:				Largo:
> "Why are you naked?"		"One must take drastic measures to prevent 
> 				static discharge.  Care must be taken to 
> (Visit Piro and Largo at	preserve the purity of these components."
> http://www.megatokyo.com)	"PH34R MY L33T N3KKID SKILLZ!!!"
> 
> 
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://uclibc.org/mailman/listinfo/uclibc





More information about the uClibc mailing list