Hi, > > Ok, here is a vanilla uClibc from SVN.... its x86 architecture. > > i386/pentium-mmx . > > > > > > $ rpm > > argc=1 argv=0xbfbe8094 envp=0xbfbe809c > > [SNIP] > > _dl_malloc:926: mmapping more memory > > _dl_get_ready_to_run:748: Beginning relocation fixups > > _dl_get_ready_to_run:831: calling INIT: /lib/libc.so.0, tpnt->loadaddr = > > 0xb7bfa000, tpnt->dynamic_info[DT_INIT] = 0x54c7f, dl_elf_func = > > 0xb7c4ec7f > > > > Segmentation fault > > This trace looks like it is missing LD_DEBUG=1 rpm or LD_DEBUG=all rpm, > such a trace can get very big so you need to trim it down before > posting. You also need SUPPORT_LD_DEBUG=y in .config
Stupid busybox, it didn't export the env variable .... I'm rebuilding a static sh now. Uploaded RPM debug to ... http://www.linuxrulz.org/nkukard/rpm.log Uploaded my test PIE app to ... http://www.linuxrulz.org/nkukard/rpm.log > Are you sure that it is the call to > DL_CALL_FUNC_AT_ADDR (dl_elf_func, tpnt->loadaddr, (void(*)(void))); > that SEGVs? A printout before and after will confirm that. Just confirmed it, thats definitely where its choking. > Also, you said earlier that dl_elf_func was the same for a successful > and a failed run? You need to do the printout I asked for in both cases > to confirm that. RPM always fails. Other executables which aren't PIE work no problem at all. And the test C app I wrote works fine, simple hello world'er with -fPIE -pie . > Anyhow, assuming it is the libc's INIT that SEGs, try setting a BP in > libc/misc/internals/__uClibc_main.c, __uClibc_init() and single step to > see what SEGs. I wrote a simple 5 liner C app to test PIE ... it works, the RPM executable doesn't so it must be something unique to this case. Let me see what I can do. Just having trouble getting the symbol names in gdb, I've enabled all debugging info with -g3 and rebuilt uclibc, then copied the .so's over ... but still getting ??'s in my gdb backtrace ... hrmmm. -N
signature.asc
Description: This is a digitally signed message part
_______________________________________________ uClibc mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/uclibc
