This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: s390 gas bug
- To: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- Subject: Re: s390 gas bug
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Wed, 3 Oct 2001 00:04:41 +0930
- Cc: Nick Clifton <nickc at cambridge dot redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, binutils at sources dot redhat dot com, laroche at redhat dot com
- References: <OF7417AF34.31A110BF-ONC1256AD9.004C537A@de.ibm.com>
On Tue, Oct 02, 2001 at 03:55:43PM +0200, Martin Schwidefsky wrote:
>
> > > it doesn't create an R_390_PLT32 relocation and instead hardcodes
> > > address of f1 above it. For static int f1 (void) { return 1; } this
> > > would be right, but as f1 is global symbol, it should be possible to
> > > override f1 at runtime
> >
> > Well, for certain file formats, yes.
> >
> > It sounds like the s390 gas port needs to define TC_FORCE_RELOCATION
> > and then have it return true for BFD_RELOC_S390_PLT32 relocs, and
> > probably some others as well.
>
> Isn't that what tc_fix_adjustable is supposed to catch ?
>
Well, no, not for this particular case. You need to define
TC_FORCE_RELOCATION to cover this situation because to the generic
code in write.c:fixup_segment, your "f1@PLT-.LT1_0" expression
looks like the subtraction of two syms in one segment. The normal
action is to perform the subtraction and not emit a reloc.
Alan