| Summary: | connmand segfault with qemumips sato/sdk images | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Meta-yocto | Reporter: | xianchao zhang <xianchao.zhang> |
| Component: | meta-yocto | Assignee: | Qing He <qing.he> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | dongxiao.xu, jessica.zhang, kevin.tian, poky.bs.watcher, poky.watcher, qing.he, richard.purdie, sgw, xianchao.zhang |
| Version: | 0.9 | ||
| Target Milestone: | 0.9 M4 | ||
| Hardware: | x86 | ||
| OS: | mips | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Program Management | Documentation change: | --- |
|
Description
xianchao zhang
2010-09-07 23:47:44 UTC
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. With the latest nightly build (20100928), this issue has been fixed. |