From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13435 invoked by alias); 19 Apr 2006 12:33:42 -0000 Received: (qmail 13418 invoked by uid 22791); 19 Apr 2006 12:33:41 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 19 Apr 2006 12:33:40 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FWBsC-0002Rk-8s; Wed, 19 Apr 2006 08:33:32 -0400 Date: Wed, 19 Apr 2006 12:33:00 -0000 From: Daniel Jacobowitz To: Randolph Chung Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa] Shared object matching for solib-som.c Message-ID: <20060419123331.GA9052@nevyn.them.org> Mail-Followup-To: Randolph Chung , gdb-patches@sources.redhat.com References: <44458D3D.4030506@tausq.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44458D3D.4030506@tausq.org> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00260.txt.bz2 On Wed, Apr 19, 2006 at 09:07:09AM +0800, Randolph Chung wrote: > I notice that most of the solib variants do not need to do this type of > processing; unfortunately I haven't figured out a better way to handle > the SOM case. Perhaps somebody more familiar with the solib code/SOM can > comment? No one else needs to do this, in fact. This is from the symfile section_offsets callback; but why can't you do this in the solib relocate_section_addresses callback instead? In fact, you already do, so it is not at all clear to me why you need to adjust the offsets here. Other targets only need to adjust the one copy in the section table. Ah, I think this normally works via build_section_addr_info_from_section_table. Which produces the second parameter for som_symfile_offsets. Which is now valid for shared libraries. It's just that the way that function _uses_ it is bogus for shared libraries. Instead of finding the .text offset you'd have to honor the section indexes. See default_symfile_offsets. Also the two solib-som.c functions setting offsets use different data offsets, so beware that. -- Daniel Jacobowitz CodeSourcery