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: Tue, 31 Jul 2001 09:54:39 +0200
- Cc: binutils at gcc dot gnu dot org
>Somewhat :) I'm claiming that the subtraction of the current location is
>implicit since you are using a pc-relative relocation.
>
>Consider an analogy with pcrel call insns on many architectures. We
>write "call foo", which generates a pcrel reloc against foo with an
>implicit subtraction of ".". We don't write "call foo - .". On x86,
>which uses a pcrel plt reloc, we have "call foo@PLT" too, not
>"call foo@PLT - ." This extends to ".long foo@PLT" if you want a
>pcrel plt reloc.
Yes in the case of a call instruction it makes sense. We make use of
the same notation for the brasl instruction in the 64 bit assembler.
It makes sense because the instructions gives you the hint that you
are dealing with an implicit "- .". In the case of .long you don't
have that hint. And a ".long printk@PLT + . - .LT0_0" is somewhat
harder to understand than ".long printk@PLT - .LT0_0". The pseudo
op .long is by itself absolute.
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