This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] x86: adjust relocation overflow complaint types
- From: Michael Matz <matz at suse dot de>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Jan Beulich <JBeulich at novell dot com>, binutils at sources dot redhat dot com
- Date: Mon, 1 Aug 2005 11:53:26 +0200 (CEST)
- Subject: Re: [PATCH] x86: adjust relocation overflow complaint types
- References: <s2b126e7.064@lyle.provo.novell.com> <Pine.LNX.4.58.0508011100130.20330@wotan.suse.de><jey87m3syb.fsf@sykes.suse.de>
Hi,
On Mon, 1 Aug 2005, Andreas Schwab wrote:
> > % ./ld/ld-new -o mm -Ttext 0 -e bios_f000 mm.o
> > mm.o: In function `bios_f000':
> > : relocation truncated to fit: R_386_PC16 against symbol `bios_f000'
> > defined in .text section in mm.o
> >
> > This is because bfd now thinks the jump is out of range.
>
> Which is correct, in the context of 32 bit ELF.
Yeah.
> > I don't know how to teach bfd to make a difference between .code16 and
> > .code32 (or .code64 for that matter) in doing the overflow checking.
>
> The linker only knows about the 32 bit ELF format. There is no
> relocation that can represent a pc-relative relocation that wraps around
> in 16 bits.
Right, but fact is, that dosemu can now not be build anymore, and from a
user perspective this error message is wrong. Perhaps a PC16 reloc
should just not warn on suspected overflow, because it most often will be
used in .code16 context probably.
Ciao,
Michael.