public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@uni-koblenz.de>
To: Mark Mitchell <mark@codesourcery.com>
Cc: binutils@sourceware.cygnus.com
Subject: Re: PATCH for GOT16 handling
Date: Mon, 09 Aug 1999 17:31:00 -0000	[thread overview]
Message-ID: <19990810023110.F31627@uni-koblenz.de> (raw)
In-Reply-To: <19990809155231M.mitchell@codesourcery.com>

On Mon, Aug 09, 1999 at 03:52:31PM -0700, Mark Mitchell wrote:

> Also fixed is a problem with looking for matching GOT16 entries in the
> GOT.

> 	(mips_elf_got16_entry): Use mips_elf_high to calculate the value
> 	to use wheen looking for a preexisting GOT entry.

> *************** mips_elf_got16_entry (abfd, info, value)
> *** 5537,5543 ****
>     bfd_vma index;
>     bfd_vma address;
>   
> !   value &= 0xffff0000;
>     g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
>   
>     /* Look to see if we already have an appropriate entry.  */
> --- 5537,5547 ----
>     bfd_vma index;
>     bfd_vma address;
>   
> !   /* Although the ABI says that it is "the high-order 16 bits" that we
> !      want, it is really the %high value.  The complete value is
> !      calculated with a `addiu' of a LO16 relocation, just as with a
> !      HI16/LO16 pair.  */
> !   value = mips_elf_high (value);
>     g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
>   
>     /* Look to see if we already have an appropriate entry.  */

This is broken, try test case #11 which will show you a bad got.  The
correct fix is to just add change the mips_elf_high() line into
value += 0x8000.

  Ralf

  reply	other threads:[~1999-08-09 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-09 15:48 Mark Mitchell
1999-08-09 17:31 ` Ralf Baechle [this message]
1999-08-09 20:12   ` Mark Mitchell
1999-08-09 20:20   ` Mark Mitchell

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=19990810023110.F31627@uni-koblenz.de \
    --to=ralf@uni-koblenz.de \
    --cc=binutils@sourceware.cygnus.com \
    --cc=mark@codesourcery.com \
    /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).