| 07:15.00 | *** join/#uclibc tahorg (~loic@perax.net1.nerim.net) |
| 14:58.04 | *** join/#uclibc ibot (ibot@12-237-229-200.client.attbi.com) |
| 14:58.04 | *** topic/#uclibc is Discussion of uClibc, busybox, tinylogin, and related stuff | Sept 9 -- uClibc 0.9.21 released | Sept 12 -- Busybox 1.0.0-pre3 released |
| 16:06.08 | *** join/#uclibc andersee (~andersee@codepoet.org) |
| 17:09.19 | *** join/#uclibc sjhill (~sjhill@65.117.135.105) |
| 17:33.01 | *** join/#uclibc DaveM_ (~david@h24-207-7-221.dlt.dccnet.com) |
| 19:17.33 | *** join/#uclibc andersee (~andersee@codepoet.org) |
| 19:27.52 | waldi | does uclibc 0.9.21 work on powerpc? at least a binary linked against the lib out of the debian package of that gives illegal instruction |
| 19:33.58 | andersee | waldi: prior to release I ran it on my powerpc system and it worked fine for me |
| 19:37.12 | *** join/#uclibc TheMasterMind1 (~aman@h-66-167-146-176.MCLNVA23.dynamic.covad.net) |
| 19:37.57 | waldi | hmm |
| 19:39.28 | waldi | should direct execution of the dynlinker work? |
| 20:12.08 | andersee | i.e. /bin/ld.uClibc.so.0 |
| 20:12.11 | andersee | no |
| 20:12.38 | andersee | That should print "Invalid ELF header" and exit |
| 20:15.15 | *** join/#uclibc dsmith (~dsmith@mail.actron.com) |
| 20:30.56 | waldi | it segfaults |
| 20:31.53 | waldi | why should it say something about invalid elf header? it is a valid elf executabl |
| 20:39.52 | DaveM_ | waldi: maybe it would be helpful to find out where it segfaults. Try compiling uClibc with debugging information, and then you can interpret the segafault message better |
| 20:40.50 | waldi | hmm, lets try |
| 20:45.45 | andersee | waldi: it is an ELF interpreter |
| 20:46.04 | andersee | waldi: if it is not provided with an ELF file to interpret, it chokes |
| 20:46.25 | andersee | waldi: and I have not taught it to accept and load elf files specified on the command line |
| 20:46.51 | andersee | therefore, you cannot usefully invoke it from the command line |
| 20:47.34 | waldi | okay, lets build them |
| 20:49.58 | waldi | hmm, i enabled build with debugging symbols, but it don't define -g |
| 20:50.50 | waldi | hmm, it does, okay |
| 20:52.56 | andersee | waldi: you may want to also build with SUPPORT_LD_DEBUG and/or SUPPORT_LD_DEBUG_EARLY enabled |
| 20:53.02 | DaveM_ | andersee: I could have sworn, that the uClibc ld-uClibc, used to be able to load elf files from the command line. Is this a removed feature? |
| 20:53.24 | waldi | andersee: i see |
| 20:53.31 | andersee | waldi: that will let you try and track down your ld.so problems |
| 20:53.36 | andersee | $ /lib/ld-uClibc.so.0.system /bin/true |
| 20:53.36 | andersee | Invalid ELF header |
| 20:53.45 | andersee | DaveM_: Idon't think |
| 20:53.52 | andersee | DaveM_: Idon't think it has ever done that |
| 20:54.23 | DaveM_ | andersee: maybe I am wrong. I actually get a segfault on my system instead of an invalid header |
| 20:54.31 | andersee | DaveM_: glibc's does |
| 20:54.43 | andersee | DaveM_: hmm |
| 20:54.46 | andersee | DaveM_: arch? |
| 20:55.11 | DaveM_ | arm |
| 20:56.19 | DaveM_ | andersee: not that it really matters, whether an unsupported feature returns a segfault or an Invalid ELF header error. Either way the user will quickly figure out that it doesn't work |
| 20:56.54 | andersee | ok. Well the segfault is harmless. I may not have properly checked this case on arm and ppc |
| 20:57.03 | andersee | DaveM_: yep |
| 20:57.05 | andersee | :-) |
| 20:57.30 | waldi | yak, the debian build is completely broken |
| 20:58.22 | andersee | waldi: My arm, mips, powerpc, and x86 systems are all debian... |
| 20:58.45 | andersee | waldi: or do you mean the 'dpkg-buildpackage' build? |
| 20:58.46 | waldi | andersee: the debian packaging is broken |
| 20:58.58 | andersee | waldi: ahh, yes. I expect it probably is |
| 20:59.33 | andersee | waldi: I do have to admit to never building a uClibc .deb... |
| 21:00.30 | andersee | waldi: I always just build and use |
| 21:00.33 | waldi | hmm, now the compiled against binary always segfault |
| 21:01.04 | andersee | waldi: Want me to fire up my powerpc box and give you a login? |
| 21:01.23 | andersee | for comparison? |
| 21:01.31 | waldi | staticaly linked binaries works |
| 21:01.52 | andersee | waldi: uClibc 0.9.21? or latest from cvs? |
| 21:02.09 | DaveM_ | waldi: what are the permissions on /lib/ld-uClibc... ? |
| 21:02.21 | waldi | andersee: 0.9.21 |
| 21:02.42 | waldi | DaveM_: 755 |
| 21:03.08 | waldi | andersee: i enabled early debug, what should it show? |
| 21:03.32 | andersee | For any dynamically linked app, lots of debug noise |
| 21:03.54 | waldi | hmm, it show nothing |
| 21:04.54 | andersee | ?? |
| 21:05.08 | andersee | did you forget to do a 'make install' |
| 21:05.09 | andersee | ? |
| 21:06.01 | DaveM_ | try running ldd on your app, and make sure that every library it requires is in place |
| 21:06.59 | waldi | andersee: i just reinstalled it |
| 21:10.21 | waldi | hmm, powerpc-uclibc-ldd shows always 0x0 as address |
| 21:11.28 | andersee | waldi: not a problem |
| 21:12.03 | waldi | ah, it is hardcoded |
| 21:12.19 | andersee | waldi: that is 0x0 when it cannot exec the file and dynamically determine the actual load values |
| 21:12.40 | andersee | waldi: if it were able to exec the file, it would print correct values |
| 21:13.15 | waldi | ah, okay |
| 21:19.11 | andersee | waldi: anyway, here is my test system |
| 21:19.15 | andersee | # cat /proc/cpuinfo |
| 21:19.15 | andersee | cpu : 604r |
| 21:19.15 | andersee | clock : 400MHz |
| 21:19.15 | andersee | revision : 49.2 (pvr 0009 3102) |
| 21:19.15 | andersee | bogomips : 399.76 |
| 21:19.15 | andersee | machine : PReP MTX Plus |
| 21:19.17 | andersee | l2 cache : none |
| 21:19.19 | andersee | simms : |
| 21:19.25 | andersee | # ldd /usr/bin/gcc |
| 21:19.25 | andersee | <PROTECTED> |
| 21:19.25 | andersee | <PROTECTED> |
| 21:19.43 | andersee | # gcc --version | head -n1 |
| 21:19.43 | andersee | gcc (GCC) 3.3 |
| 21:20.24 | andersee | guess I can start that now |
| 21:20.34 | waldi | andersee: i have an 750FX |
| 21:20.50 | waldi | powermac, newworld |
| 21:20.52 | andersee | mine is an old motorola box |
| 21:21.16 | andersee | I guess that is obvious though, since my box is PReP |
| 21:22.03 | waldi | is it possible to debug the dynlinker with gdb? i don't think so |
| 21:22.11 | andersee | waldi: nope |
| 21:22.56 | andersee | That is why I added SUPPORT_LD_DEBUG_EARLY -- so I could debug the thing before relocations and whatnot were done |
| 21:23.16 | waldi | hmm |
| 21:25.20 | andersee | It is also ld.so's job to enable communication with gdb.... |
| 21:26.13 | andersee | but that can't be done till somewhat late in the process |
| 21:34.36 | waldi | hmm, if i compile it with debugging, i see a segfault in _dl_strlen |
| 21:35.18 | andersee | waldi: any details your can get would be great |
| 21:35.21 | andersee | err |
| 21:35.22 | andersee | you |
| 21:37.56 | waldi | it seems do fail during the first SEND_STDERR |
| 21:38.15 | andersee | waldi: hmm |
| 21:38.31 | andersee | Lemme check SUPPORT_LD_DEBUG_EARLY on my ppc box |
| 21:38.52 | waldi | do you know which register holds the failing address? |
| 21:41.18 | andersee | waldi: ok, I see a segfault with SUPPORT_LD_DEBUG_EARLY enabled |
| 21:41.23 | waldi | hmm, no, i should not put the send_stderr before the first other thing |
| 21:41.40 | waldi | without it segfaults while derefenrecing aux_dat |
| 21:42.17 | andersee | probably a result of powerpc putting all const strings into a section needing relocation |
| 21:42.58 | waldi | possible |
| 21:44.06 | waldi | load_addr is 0 |
| 21:44.55 | andersee | waldi: ok, this will fix the segfault |
| 21:44.58 | andersee | $ cvs diff ldso/include/ld_string.h |
| 21:44.59 | andersee | Index: ldso/include/ld_string.h |
| 21:44.59 | andersee | =================================================================== |
| 21:44.59 | andersee | RCS file: /var/cvs/uClibc/ldso/include/ld_string.h,v |
| 21:44.59 | andersee | retrieving revision 1.1 |
| 21:44.59 | andersee | diff -u -r1.1 ld_string.h |
| 21:45.01 | andersee | --- ldso/include/ld_string.h 19 Aug 2003 06:05:30 -0000 1.1 |
| 21:45.03 | andersee | +++ ldso/include/ld_string.h 29 Sep 2003 21:44:35 -0000 |
| 21:45.05 | andersee | @@ -243,7 +243,7 @@ |
| 21:45.07 | andersee | <PROTECTED> |
| 21:45.09 | andersee | <PROTECTED> |
| 21:45.12 | andersee | <PROTECTED> |
| 21:45.14 | andersee | -#if defined mc68000 || defined __arm__ || defined __mips__ || defined __sh__ |
| 21:45.15 | andersee | +#if defined(mc68000) || defined(__arm__) || defined(__mips__) || defined(__sh__) || defined(__powerpc__) |
| 21:45.17 | andersee | <PROTECTED> |
| 21:45.19 | andersee | <PROTECTED> |
| 21:45.21 | andersee | <PROTECTED> |
| 21:45.25 | andersee | just had the wrong code path there for ppc |
| 21:46.15 | waldi | ah, looks better |
| 21:46.34 | waldi | now i get a SIGILL |
| 21:46.57 | andersee | I can see I've also let powerpc SUPPORT_LD_DEBUG support lapse behind |
| 21:47.00 | andersee | waldi: hmm |
| 21:47.13 | andersee | waldi: an illegal instruction eh? |
| 21:47.23 | waldi | yes |
| 21:47.48 | andersee | waldi: could be gcc, binutils, bad optimization, etc... |
| 21:47.58 | waldi | yes |
| 21:48.25 | andersee | waldi: anything special needed for you to tune for the powerpc 750FX |
| 21:48.27 | andersee | ? |
| 21:48.43 | waldi | hmm, gdb shows an address within a section called .plt |
| 21:49.01 | waldi | no, 6xx and 7xx should be complete compatible |
| 21:49.19 | waldi | within the standard instruction set |
| 21:53.18 | DaveM_ | Quick question, not really uClibc related (but no one answered me on #gcc). How does gcc know where to look for crt*.o files? |
| 21:55.15 | andersee | DaveM_: It is compiled into the binary |
| 21:56.09 | DaveM_ | with --prefix? |
| 21:56.39 | DaveM_ | btw: I'm trying to cross-compile a native compiler |
| 21:56.53 | waldi | hmm, it failes somewhere in the module loading |
| 21:57.04 | andersee | DaveM_: see standard_startfile_prefix_1 and standard_startfile_prefix_2 in gcc-version/gcc/gcc.c |
| 21:57.09 | DaveM_ | thanks |
| 22:06.23 | waldi | andersee: what is the .plt section used for? |
| 22:31.01 | andersee | waldi: the procedure linkage table. You will want to find a copy of the powerpc ELF ABI |
| 22:31.23 | andersee | http://www.linuxbase.org/spec/refspecs/elf/elf.pdf |
| 22:31.25 | andersee | http://www.linuxbase.org/spec/refspecs/elf/elfspec_ppc.pdf |