From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16758 invoked by alias); 11 Dec 2004 05:38:21 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 16696 invoked from network); 11 Dec 2004 05:38:16 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 11 Dec 2004 05:38:16 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CczxL-0000zP-JL; Sat, 11 Dec 2004 00:38:11 -0500 Date: Sat, 11 Dec 2004 05:38:00 -0000 From: Daniel Jacobowitz To: binutils@sources.redhat.com Cc: Hans-Peter Nilsson Subject: Re: RFA: Don't canonicalize STT_SECTION syms Message-ID: <20041211053811.GA3747@nevyn.them.org> Mail-Followup-To: binutils@sources.redhat.com, Hans-Peter Nilsson References: <20041210140431.GF12046@bubble.modra.org> <200412101514.iBAFEVEf002240@ignucius.se.axis.com> <20041210151929.GA14328@nevyn.them.org> <20041211042043.GJ12046@bubble.modra.org> <20041211043426.GA31280@nevyn.them.org> <20041211045751.GL12046@bubble.modra.org> <20041211050729.GA1103@nevyn.them.org> <20041211053202.GM12046@bubble.modra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041211053202.GM12046@bubble.modra.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00136.txt.bz2 On Sat, Dec 11, 2004 at 04:02:02PM +1030, Alan Modra wrote: > On Sat, Dec 11, 2004 at 12:07:29AM -0500, Daniel Jacobowitz wrote: > > drow@nevyn:~/qtmp% ld -r -o foo foo.o bar.o > > Mutter. ld -r. Mutter. Well, you could get the same result using a final link. > > 00000000 l d foo 00000000 foo > > 00000000 *UND* 00000000 foo > > > > I'd be really confused! "Why didn't 'foo' resolve to 'foo'?" the user > > asks me... > > Well, I'm not wedded to the trick I used. In fact, I made provision for > reverting the elfcode.h change without needing to change the testsuite. > > Having the name there does have some benefit, for example with these > section syms that some targets emit: > > 00000000 l d *ABS* 00000000 .shstrtab > 00000000 l d *ABS* 00000000 .symtab > 00000000 l d *ABS* 00000000 .strtab Hmm, yeah (another note for "weird elf things" volume #37... section symbols not in a section? how DOES that work?). I've been forcibly reminded that STT_SECTION symbols are not, in principle, all that special. You could have one with a name, or without. Objdump would ideally reveal that difference - though I have gotten in the habit of using readelf when I need this much precision, since its output better corresponds to ELF, which is (gasp) better documented than BFD internals. How _do_ absolute section symbols work anyway? -- Daniel Jacobowitz