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]

Relocation question (was: RE: Unsupported targets slated for removal)


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



If I compile it with the old assembler, I get the following relocation
entry in the object file:


/tmp/yyy.o:     file format coff-z8k

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE
00000000 r_imm32           INITFN


If I compile it with my BFD_ASSEMBLER modified version, I get


/tmp/zzz.o:     file format coff-z8k

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE
00000000 r_imm32           .text


Please note the different VALUEs.

If I compile the same source file with i386-coff-as, I get the same
result:


/tmp/333.o:     file format coff-i386

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE
00000000 dir32             .text


Shouldn't the VALUE be INITFN, like in the old non-bfd assembler?

regards,
chris



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