This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Relocation question (was: RE: Unsupported targets slated forremoval)
- From: Matt Thomas <matt at 3am-software dot com>
- To: Christian Groessler <chris at groessler dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 06 Apr 2005 04:10:43 -0700
- Subject: Re: Relocation question (was: RE: Unsupported targets slated forremoval)
- References: <Pine.LNX.4.30.0504061213280.1393-100000@ds9.groessler.org>
Christian Groessler wrote:
> Hi,
>
>
>>----- Alan Modra wrote -----
>>On Tue, Mar 22, 2005 at 06:08:30PM +0100, Christian Groessler wrote:
>>
>>>> z8k-*-* Christian, please update z8k to use bfd!
>>>
>>>Is there a guide how to do this somewhere, or should I simply start
>>>defining BFD_ASSEMBLER and then fix what breaks...
>>
>>Yes, set bfd_gas=yes in configure.tgt, then fix what breaks. Compare
>>target object files before and after..
>
>
> While doing this I've encountered the following problem. Consider this
> source file:
>
> .text
> .long INITFN
> INITFN: nop
INITFN does not seem to be a .globl symbol so it's not exported
from the object.
> Shouldn't the VALUE be INITFN, like in the old non-bfd assembler?
I don't think so. Since INITFN is not global, the reloc can't
reference it. So instead, the reloc uses .text+4; I'm assuming
that the assembler placed a value of 4 in the .long.
Does the reloc change if you add .globl INITFN ?
--
Matt Thomas email: matt@3am-software.com
3am Software Foundry www: http://3am-software.com/bio/matt/
Cupertino, CA disclaimer: I avow all knowledge of this message.