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]

Re: Reloc BUG in as


"Mark E." <snowball3@bigfoot.com> writes:

> > a.out:     file format elf32-i386
> > 
> > RELOCATION RECORDS FOR [.text]:
> > OFFSET   TYPE              VALUE
> > 00000001 R_386_PC32        *ABS*
> 
> Hmm, I get a different (correct?) result with coff-i386:
> 
> a:
> b:
> call a-b
> 
> test.o:     file format coff-go32
> 
> RELOCATION RECORDS FOR [.text]:
> OFFSET   TYPE              VALUE 
> 00000001 DISP32            fake

Note that you are comparing with the correct result.  The incorrect
result is the one without the reloc.

Your coff-i386 result might well be correct, depending upon how the
linker handles the reloc.  After the final link you should see a call
to the absolute address 0.  If you see anything else, then something
went wrong somewhere.

Ian


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