From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10752 invoked by alias); 31 Aug 2005 20:31:07 -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 10713 invoked by uid 22791); 31 Aug 2005 20:30:52 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 31 Aug 2005 20:30:52 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j7VKUp9O017170 for ; Wed, 31 Aug 2005 16:30:51 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j7VKUpV28353; Wed, 31 Aug 2005 16:30:51 -0400 Received: from localhost.localdomain (vpn50-99.rdu.redhat.com [172.16.50.99]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id j7VKUo54027690; Wed, 31 Aug 2005 16:30:50 -0400 Received: from ironwood.lan (ironwood.lan [192.168.64.8]) by localhost.localdomain (8.12.11/8.12.10) with ESMTP id j7VKUjMI000487; Wed, 31 Aug 2005 13:30:45 -0700 Date: Wed, 31 Aug 2005 20:31:00 -0000 From: Kevin Buettner To: Paul Koning Cc: gdb@sources.redhat.com Subject: Re: enable_break() in solib-svr4.c Message-ID: <20050831133045.7e6ea3ee@ironwood.lan> In-Reply-To: <17152.63787.724675.956910@gargle.gargle.HOWL> References: <17152.63787.724675.956910@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2005-08/txt/msg00128.txt.bz2 On Mon, 15 Aug 2005 16:20:59 -0400 Paul Koning wrote: > 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). > > 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. I too would like to see your solution, hack or not. Is this issue different than the ones already discussed as part of the following thread? http://sources.redhat.com/ml/gdb/2002-12/msg00266.html Kevin