public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Fix addend computation of MeP's HI16S reloc.
@ 2007-07-04 14:29 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2007-07-04 14:29 UTC (permalink / raw)
  To: binutils

Hi Guys,

  I am applying the patch below to fix a bug in the computation of the
  addend for the MeP's HI16S reloc.  The actual patch was developed by
  Richard Henderson a while ago, but it was accidentally omitted when
  the MeP port was contributed.

Cheers
  Nick

bfd/ChangeLog
2007-07-04  Nick Clifton  <nickc@redhat.com>

	Import this patch from an internal tree:
	
	2001-07-17  Richard Henderson  <rth@redhat.com>

	* elf32-mep.c (mep_final_link_relocate) [R_MEP_HI16S]: Correctly
	compensate for high bit set in R_MEP_LOW16.

Index: bfd/elf32-mep.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-mep.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 elf32-mep.c
*** bfd/elf32-mep.c	3 Jul 2007 14:26:41 -0000	1.6
--- bfd/elf32-mep.c	4 Jul 2007 14:22:31 -0000
*************** mep_final_link_relocate
*** 333,338 ****
--- 333,340 ----
        byte[3^e2] = ((u >> 16) & 0xff);
        break;
      case R_MEP_HI16S: /* ----------------vutsrqponmlkjihg */
+       if (s & 0x8000)
+ 	s += 0x10000;
        byte[2^e2] = ((s >> 24) & 0xff);
        byte[3^e2] = ((s >> 16) & 0xff);
        break;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-04 14:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-04 14:29 PATCH: Fix addend computation of MeP's HI16S reloc Nick Clifton

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).