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.



>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



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