public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@zembu.com>
To: jj@sunsite.ms.mff.cuni.cz
Cc: binutils@sourceware.cygnus.com, davem@redhat.com
Subject: Re: [PATCH] Support for R_SPARC_OLO10 relocations
Date: Thu, 08 Jul 1999 20:02:00 -0000	[thread overview]
Message-ID: <19990709012046.6401.qmail@daffy.airs.com> (raw)
In-Reply-To: <19990705174729.B1736@mff.cuni.cz>

   Date: Mon, 5 Jul 1999 17:47:29 +0200
   From: Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>

   This patch adds support for R_SPARC_OLO10 relocation.
   It is in fact a compound relocation equal to R_SPARC_LO10 and R_SPARC_13
   with no symbol applied on top of it, so I have modelled the support from
   elf64-mips.c which already supports compound relocations.

Are you copying some existing ABI?  I ask because this implementation
seems overly complex.  There is already a place to store the addend:
the instruction itself.  I don't see any reason to store an additional
addend in the Rela structure.  The range of possible values would seem
to be limited by the nature of the relocation.

This patch seems to have several parts which are unrelated to
R_SPARC_OLO10 support, such as the readelf.c and the sparc-dis.c
patches.  Please submit unrelated patches separately.  That will speed
the process of checking them in.  Thanks.

   --- ./include/elf/sparc.h.jj	Tue Jun 29 10:51:49 1999
   +++ ./include/elf/sparc.h	Mon Jul  5 14:44:35 1999
   @@ -138,9 +138,9 @@ END_RELOC_NUMBERS

    /* Relocation macros.  */

   -#define ELF64_R_TYPE_DATA(info)		(((bfd_vma) (info) << 32) >> 40)
   +#define ELF64_R_TYPE_DATA(info)		(((bfd_signed_vma) (info) << 32) >> 40)

This bit of the patch appears to assume that a right shift of a signed
value does an arithmetic shift.  However, C does not guarantee this:
the result of a right shift of a signed negative value is
implementation defined.

Ian

  parent reply	other threads:[~1999-07-08 20:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-05  8:47 Jakub Jelinek
1999-07-08 15:50 ` Richard Henderson
1999-07-09  5:40   ` [PATCH] My current SPARC patches Jakub Jelinek
1999-07-16 14:34     ` Richard Henderson
1999-07-08 16:09 ` [PATCH] Support for R_SPARC_OLO10 relocations Richard Henderson
1999-07-08 20:02 ` Ian Lance Taylor [this message]
1999-07-08 23:34   ` Jakub Jelinek
1999-07-09  9:52     ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990709012046.6401.qmail@daffy.airs.com \
    --to=ian@zembu.com \
    --cc=binutils@sourceware.cygnus.com \
    --cc=davem@redhat.com \
    --cc=jj@sunsite.ms.mff.cuni.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).