From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25455 invoked by alias); 15 Aug 2005 20:21:06 -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 25439 invoked by uid 22791); 15 Aug 2005 20:21:02 -0000 Received: from sadr.equallogic.com (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 15 Aug 2005 20:21:02 +0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id j7FKL1ZZ001818 for ; Mon, 15 Aug 2005 16:21:01 -0400 Received: from M31.equallogic.com (M31.equallogic.com [172.16.1.31]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id j7FKL0Nd001813 for ; Mon, 15 Aug 2005 16:21:01 -0400 Received: from pkoning.equallogic.com ([172.16.1.163]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 15 Aug 2005 16:21:00 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17152.63787.724675.956910@gargle.gargle.HOWL> Date: Mon, 15 Aug 2005 20:21:00 -0000 From: Paul Koning To: gdb@sources.redhat.com Subject: enable_break() in solib-svr4.c X-SW-Source: 2005-08/txt/msg00060.txt.bz2 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. paul