From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11193 invoked by alias); 2 Mar 2005 02:40:37 -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 11125 invoked from network); 2 Mar 2005 02:40:33 -0000 Received: from unknown (HELO imta06ps.mx.bigpond.com) (144.140.83.143) by sourceware.org with SMTP; 2 Mar 2005 02:40:33 -0000 Received: from modra.org ([144.136.221.26]) by imta06ps.mx.bigpond.com with ESMTP id <20050302024031.XPTP13745.imta06ps.mx.bigpond.com@modra.org> for ; Wed, 2 Mar 2005 02:40:31 +0000 Received: by bubble.modra.org (Postfix, from userid 500) id 2E42F19EE40; Wed, 2 Mar 2005 13:10:31 +1030 (CST) Date: Wed, 02 Mar 2005 02:40:00 -0000 From: Alan Modra To: binutils@sources.redhat.com Subject: Re: compiling binutils with -DDEBUG Message-ID: <20050302024030.GY5299@bubble.modra.org> Mail-Followup-To: binutils@sources.redhat.com References: <20050301020120.GJ5299@bubble.modra.org> <20050301104949.GN5299@bubble.modra.org> <20050301220245.GS5299@bubble.modra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2005-03/txt/msg00061.txt.bz2 On Tue, Mar 01, 2005 at 08:40:37PM -0500, Ian Lance Taylor wrote: > Alan Modra writes: > > > > If the assert in fixup_segment() fails, then > > > MRI common symbols will not be handled correctly. > > > > Are you sure? I couldn't see why it mattered that the sym was resolved > > at write.c:1857 versus being resolved at write.c:2588. The mri common > > testcase looks to produce good results. > > A relocation against a symbol in an MRI common section has to be > converted into a relocation against the MRI common symbol with the > appropriate addend. That is what the code in fixup_segment is doing. Understood. The relocs appear correct to me. ie. resolve_symbol_value is doing the right thing, I think. dump.o: file format elf32-m68k RELOCATION RECORDS FOR [.data]: OFFSET TYPE VALUE 00000000 R_68K_32 com1 00000004 R_68K_32 00com2+0x00000004 dump.o: file format a.out-zero-big RELOCATION RECORDS FOR [.data]: OFFSET TYPE VALUE 00000000 32 com1 00000004 32 00com2 dump.o: file format coff-m68k RELOCATION RECORDS FOR [.data]: OFFSET TYPE VALUE 00000000 32 com1 00000004 32 00com2 -- Alan Modra IBM OzLabs - Linux Technology Centre