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: R_MIPS_26 testcase
Date: Wed, 04 Aug 1999 14:02:00 -0000	[thread overview]
Message-ID: <19990804230046.B15625@uni-koblenz.de> (raw)
In-Reply-To: <19990804134926T.mitchell@codesourcery.com>

On Wed, Aug 04, 1999 at 01:49:26PM -0700, Mark Mitchell wrote:

> I think I already fixed this.  I get:
> 
>   Disassembly of section .text:
> 
>   0000000000000000 <bar-0x18000>:
> 	  ...
> 
>   0000000000018000 <bar>:
>      18000:	3c020002 	lui	$v0,0x2
> 			  18000: R_MIPS_HI16	.text
>      18004:	24428000 	addiu	$v0,$v0,-32768
> 			  18004: R_MIPS_LO16	.text
> 	  ...
> 
> which looks like the right thing to me: 0x20000 - 0x8000 = 0x18000
> unless I'm really losing it.

Yep, test cases #7 and #8 are ok now.  #6 still is broken.  Shifting
left of the the jump destination has to be done before adding
something to it like in this patch fragment:

@@ -6581,6 +6573,9 @@
            /* There's nothing to do for non-local relocations.  */
            continue;
 
+          if (r_type == R_MIPS_26)
+              addend <<= 2;
+
          r_symndx = ELF32_R_SYM (rel->r_info);
          sym = local_syms + r_symndx;
          if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)

  Ralf

  reply	other threads:[~1999-08-04 14:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-04 13:30 Ralf Baechle
1999-08-04 13:46 ` Mark Mitchell
1999-08-04 14:02   ` Ralf Baechle [this message]
1999-08-04 14:47     ` Ralf Baechle
1999-08-04 15:22       ` Mark Mitchell
1999-08-04 17:11         ` Ralf Baechle
1999-08-04 18:17           ` Mark Mitchell
1999-08-04 19:24             ` Ralf Baechle
1999-08-04 21:43               ` 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=19990804230046.B15625@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).