From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 799 invoked by alias); 30 Jul 2004 18:19:19 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 775 invoked from network); 30 Jul 2004 18:19:17 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sourceware.org with SMTP; 30 Jul 2004 18:19:17 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id E75A847D91; Fri, 30 Jul 2004 11:19:16 -0700 (PDT) Date: Fri, 30 Jul 2004 18:19:00 -0000 From: Joel Brobecker To: Thiemo Seufer Cc: Mark Kettenis , binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Re: [RFA] MIPS_TEXT symbols should be associated to .text section? Message-ID: <20040730181916.GS1167@gnat.com> References: <20040721204604.GN1278@gnat.com> <20040729220156.GK1167@gnat.com> <20040729221904.GT965@rembrandt.csv.ica.uni-stuttgart.de> <200407292314.i6TNEqwV024526@elgar.kettenis.dyndns.org> <20040730003138.GU965@rembrandt.csv.ica.uni-stuttgart.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040730003138.GU965@rembrandt.csv.ica.uni-stuttgart.de> User-Agent: Mutt/1.4i X-SW-Source: 2004-07/txt/msg00508.txt.bz2 Thiemo, One more thing I forgot about your patch: > case SHN_MIPS_DATA: > - asym->section = mips_elf_data_section_ptr; > + { > + asection *section = elf_tdata (abfd)->elf_data_section; > + > + BFD_ASSERT (SGI_COMPAT (abfd)); > + if (section != NULL) > + asym->section = section; > + } > break; I think that addresses for MIPS_DATA symbols follow the same rule as in MIPS_TEXT: These are absolute addresses, so we need to substract the section base address as well, to turn them into offsets. I verified this empirically by inspecting an executable that had some MIPS_DATA symbols. -- Joel