This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Relocation question (was: RE: Unsupported targets slated forremoval)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]