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: Fix for s390_elf_cons.


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


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