This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Fix for s390_elf_cons.
- To: Alan Modra <amodra at bigpond dot net dot au>
- Subject: Re: Fix for s390_elf_cons.
- From: "Martin Schwidefsky" <schwidefsky at de dot ibm dot com>
- Date: Mon, 30 Jul 2001 20:38:43 +0200
- Cc: binutils at gcc dot gnu dot org
>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.
Hmm, but .LT0_0 is a local label for the start of the literal pool. What
you have is
.long (printk@PLT - .) + (. - .LT0_0)
The second part is an absolute addend and the first part is the pc relative
distance to the plt of printk. Does this makes sense?
blue skies,
Martin
Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com