From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11435 invoked by alias); 6 Apr 2005 10:40:52 -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 11254 invoked from network); 6 Apr 2005 10:40:33 -0000 Received: from unknown (HELO SERRANO.CAM.ARTIMI.COM) (217.40.213.68) by sourceware.org with SMTP; 6 Apr 2005 10:40:33 -0000 Received: from mace ([192.168.1.25]) by SERRANO.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Apr 2005 11:40:21 +0100 From: "Dave Korn" To: "'Christian Groessler'" , Subject: RE: Relocation question (was: RE: Unsupported targets slated for removal) Date: Wed, 06 Apr 2005 10:40:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: Message-ID: X-OriginalArrivalTime: 06 Apr 2005 10:40:21.0180 (UTC) FILETIME=[082F8FC0:01C53A95] X-SW-Source: 2005-04/txt/msg00159.txt.bz2 ----Original Message---- >From: Christian Groessler >Sent: 06 April 2005 11:24 > While doing this I've encountered the following problem. Consider this > source file: > > .text > .long INITFN > INITFN: nop > If I compile it with the old assembler, I get the following relocation > entry in the object file: > RELOCATION RECORDS FOR [.text]: > OFFSET TYPE VALUE > 00000000 r_imm32 INITFN > If I compile it with my BFD_ASSEMBLER modified version, I get > RELOCATION RECORDS FOR [.text]: > OFFSET TYPE VALUE > 00000000 r_imm32 .text > Please note the different VALUEs. > Shouldn't the VALUE be INITFN, like in the old non-bfd assembler? This sounds like a REL-vs-RELA issue to me. Perhaps the old assembler produces a reloc with a value of 4, and places a zero in the .long at offset 0 in the .text section, while the new one produces a reloc with a value of zero, and places the value 4 in the .long at offset 0 in the .text section? You may need to switch the linker over if this is the case, or perhaps there is an assumption in BFD_ASSEMBLER that the linker uses one format rather than the other that isn't justified in this case? cheers, DaveK -- Can't think of a witty .sigline today....