From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6224 invoked by alias); 15 Aug 2005 20:59:24 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6205 invoked by uid 22791); 15 Aug 2005 20:59:19 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 15 Aug 2005 20:59:19 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j7FKx9dL005989; Mon, 15 Aug 2005 22:59:10 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j7FKx9ga013451; Mon, 15 Aug 2005 22:59:09 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j7FKx9S9027511; Mon, 15 Aug 2005 22:59:09 +0200 (CEST) Date: Mon, 15 Aug 2005 20:59:00 -0000 Message-Id: <200508152059.j7FKx9S9027511@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: pkoning@equallogic.com CC: gdb@sources.redhat.com In-reply-to: <17152.63787.724675.956910@gargle.gargle.HOWL> (message from Paul Koning on Mon, 15 Aug 2005 16:20:59 -0400) Subject: Re: enable_break() in solib-svr4.c References: <17152.63787.724675.956910@gargle.gargle.HOWL> X-SW-Source: 2005-08/txt/msg00061.txt.bz2 > Date: Mon, 15 Aug 2005 16:20:59 -0400 > From: Paul Koning > > The code in solib-svr4.c in several places seems to assume that the > shared lib loader is linked to base address 0, loaded somewhere else, > and relocated at runtime -- and ditto for other libraries. > > I've just been battling a bug in enable_break, where the load address > of the shared lib loader is added to a symbol address from the > solib_break_names[] list. That produces nonsense on NetBSD/MIPS, > because ldd.elf_so is linked to 5ffe0000 so that address is added to > the symbol address (5ffexxxx). I seem to recall that we have had problems with this in the past, and that MIPS is a bit of an odd one out in this respect. I also seem to recall that NetBSD/MIPS changed some data structures in the dynamic linker which doesn't make things easier for gdb. What version of NetBSD are you using? > As a hack solution I have it add the load address only if the symbol > value is less than the load address. It seems to me the correct way > to cure this is to compute the relocation delta -- the difference > between the load address and the as-linked VMA of the start of the > library (from the program headers). I did something like this in > svr4_relocate_section_addresses. It'd help if you actually attached your solution ;-). Mark