From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22938 invoked by alias); 8 Aug 2007 17:41:16 -0000 Received: (qmail 22827 invoked by uid 22791); 8 Aug 2007 17:41:16 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 17:41:08 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 1A22E2AA38B; Wed, 8 Aug 2007 13:41:06 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id kdFfSoNd6HF9; Wed, 8 Aug 2007 13:41:06 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D45EE2AA383; Wed, 8 Aug 2007 13:41:05 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id CBCC8E7B54; Wed, 8 Aug 2007 10:44:37 -0700 (PDT) Date: Wed, 08 Aug 2007 17:41:00 -0000 From: Joel Brobecker To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] fix build failure in solib-som.c Message-ID: <20070808174437.GB3738@adacore.com> References: <20070807204529.GA3681@adacore.com> <20070807144733.26f94534@ironwood.lan> <20070807224348.GA3738@adacore.com> <20070807161954.748a5eb5@ironwood.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070807161954.748a5eb5@ironwood.lan> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00145.txt.bz2 Hi Kevin, > > > > 2007-08-07 Joel Brobecker > > > > > > > > * solib-som.c (som_relocate_section_addresses): Stop saving > > > > the $CODE$ section in the so_list structure. > > > > > > > > This files compiles fine again after this change is applied. > > > > > > > > Would that be OK to apply? > > > > > > I think it would be better to revise the code to set so->addr_low and > > > so->addr_high to sec->addr and sec->endaddr respectively. You'll also > > > have to move this block of code to the end of the function. > > > > Isn't that already done in som_current_sos, though? > > It is, but those addresses won't be relocated. In order to be > consistent with the other ports, I think these values should be > relocated. Note that solib.c's solib_map_sections() sets `addr_low' > and `addr_high' for .text after the relocation has been done. Clearly > this won't work for SOM since the .text section is named differently. > However, given that `addr_low' and `addr_high' are set after the > relocation has been performed (for other ports with a .text), I think > it makes sense to arrange the SOM-specific code as suggested in my > earlier reply. I'm beginning to think too that the assignments to > addr_low and addr_high ought to be removed from som_current_sos(). I had a closer look. I don't think we need to relocate the addr_low and addr_high addresses, because they were extracted from the load map info (which I would imagine would contain already relocated addresses). This is in som_current_sos. This is only by luck, but it looks like my original patch still makes sense, no? I did a quick test by running any program, and doing a "info sharedlibrary", and it looks likes the addresses are indeed relocated (they don't correspond to the $CODE$ or $TEXT$ addresses printed by objdump). -- Joel