Fix for s390_elf_cons.

Martin Schwidefsky schwidefsky@de.ibm.com
Mon Jul 30 11:43:00 GMT 2001


>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




More information about the Binutils mailing list