This is the mail archive of the
mailing list for the glibc project.
Re: changiing rtld.c
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 1 Oct 2002 19:07:10 -0400
- Subject: Re: changiing rtld.c
- References: <20021001222524.GA12331@redhat.com>
On Tue, Oct 01, 2002 at 03:25:24PM -0700, Aldy Hernandez wrote:
> Hi guys.
> I have a question...
> I'm working on some PPC hacks for glibc, which have triggered a SIGFPE
> in ld.so.1. Gdbing the process doesn't help because the backtrace
> just takes me back to some unrecognizeable (to me) instructions.
> I'm trying to track down where the SIGFPE got generated.
> So I hacked rtld.c's dl_main() like thus:
> signal(SIGFPE, myh);
> to catch the signal in myh(). Perhaps I can put a breakpoint on myh()
> and go up the chain that way. I dunno if this is the appropriate way
> of debugging this sort of thing.
> However, I keep getting:
> /local/aldy/sep-18/glibc/libc_pic.a(init-first.os): In function `init':
> /kermit/source/glibc-2.2.5/csu/../sysdeps/unix/sysv/linux/init-first.c:59: multiple definition of `__libc_multiple_libcs'
> /local/aldy/sep-18/glibc/elf/dl-allobjs.os:/kermit/source/altivec-020216-branch/devo/glibc/elf/../sysdeps/powerpc/dl-machine.h:345: first defined here
> /local/aldy/sep-18/glibc/libc_pic.a(init-first.os): In function `_dl_start':
> /kermit/source/glibc-2.2.5/csu/../sysdeps/unix/sysv/linux/init-first.c:138: multiple definition of `_dl_start'
> /local/aldy/sep-18/glibc/elf/dl-allobjs.os:/kermit/source/altivec-020216-branch/devo/glibc/elf/rtld.c:171: first defined here
> /local/aldy/sep-18/glibc/../tools-install/bin/../lib/gcc-lib/powerpc-unknown-linux-gnu/3.1-altivec-020603/../../../../powerpc-unknown-linux-gnu/bin/ld: Warning: size of symbol `_dl_start' changed from 404 to 16 in /local/aldy/sep-18/glibc/libc_pic.a(init-first.os)
> Hints, tips? Am I going about it the wrong way?
For the purposes of testing, you could try adding the assembly code
necessary to make the syscall to set a signal handler. Signal() isn't
in ld.so anywhere. Thus the link error.
On the other hand, it won't be any more legible than the previous
MontaVista Software Debian GNU/Linux Developer