This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Fix for s390_elf_cons.
- To: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- Subject: Re: Fix for s390_elf_cons.
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Mon, 30 Jul 2001 13:47:20 +0930
- Cc: binutils at gcc dot gnu dot org
- References: <OF51DE34DF.8B6159E0-ONC1256A98.0077728B@de.ibm.com>
On Sun, Jul 29, 2001 at 11:53:07PM +0200, Martin Schwidefsky wrote:
>
> Andreas complained that binutils-2.11.90.0.24 doesn't work on s390/s390x.
> Well he is right. The problem is that the behaviour of fixup_segment has
> changed a bit.
Hmm, I guess that's this change:
2001-06-27 Alan Modra <amodra@bigpond.net.au>
* write.c (fixup_segment <Difference of 2 syms same seg>): Don't
subtract MD_PCREL_FROM_SECTION for 68k.
(fixup_segment <Difference of 2 syms different seg>): Only fudge
by adding MD_PCREL_FROM_SECTION for 68k or if not already pcrel.
Curiousity got the better of me, and I built an s390-linux cross-
compiler to see why this would affect you. Output from a -fPIC
compile showed:
[snip]
.LC0:
.string "blah"
[snip]
.LT0_0:
.LC1:
.long .LC0-.LT0_0
.LC2:
.long printk@PLT-.LT0_0
[snip]
This leaves me wondering why your plt relocs are marked pcrel. It seems
to me that they ought to be non-pcrel since you are already subtracting
off a location-relative value with "-.LT0_0". Alternatively, the correct
syntax for a pc-relative relocation would be
.long printk@PLT + (. - .LT0_0)
since a pc-relative reloc implicitly subtracts "." from the symbol value.
Alan