Testing Env: Host: Ubuntu 10.04 LTS Kernel: 2.6.32-21-generic-pae Image location: http://autobuilder.pokylinux.org/milestone/20100905-1/ 1. download sato or sdk image from milesone build. 2. boot up qemumips with either image 3. run command 'connmand', segfault will arise. ################### root@qemumips:~# connmand Segmentation fault ####################
I'll look at this bug
It's interesting, crash actually happened in /lib/ld.so.1. Tracing back, found it's in elf/rtld.c:1612 > /* Set up debugging before the debugger is notified for the first time. */ > #ifdef ELF_MACHINE_DEBUG_SETUP > /* Some machines (e.g. MIPS) don't use DT_DEBUG in this way. */ > ELF_MACHINE_DEBUG_SETUP (main_map, r); // <== 1612 > ELF_MACHINE_DEBUG_SETUP (&GL(dl_rtld_map), r); > #else and ELF_MACHINE_DEBUG_SETUP is defined in ports/sysdeps/mips/dl-machine.h: > /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in > with the run-time address of the r_debug structure */ > #define ELF_MACHINE_DEBUG_SETUP(l,r) \ > do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \ > *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \ > (ElfW(Addr) *)(r); \ > } while (0) Looking at the connmand binary: > 0x70000016 (MIPS_RLD_MAP) 0 So this is where it crashes. According to sysv-abi mips supplement, "DT_MIPS_RLD_MAP ... is used by debugging. It contains the address of a 32-bit word in the .data section which is supplied by the compilation environment. The word's contents are not specified and programs using this value are not ABI - compliant." This means MIPS_RLD_MAP should have legitimate values rather than 0, the problem probably lies in binutils. Will look around to see which configuration triggers the issue.
the triggering parameter is -Wl,--version-script=connman.ver, since the _RLD_MAP variable is rendered local by the version script, DT_MIPS_RLD_MAP cannot get the value of the variable and thus leaves 0 there. Possible solutions are: 1. add _RLD_MAP in global section of connman.ver 2. modify binutils to let it fill DT_MIPS_RLD_MAP regardless the locality of _RLD_MA 3. add sanity check in glibc to ignore MIPS_RLD_MAP if it's 0 we also needs to checkif eglibc suffers from this issue.
http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=0f55d28a4d1f425343eb5aeae3eb7ffb3efd266a
With the latest nightly build (20100928), this issue has been fixed.