public inbox for prelink@sourceware.org
 help / color / mirror / Atom feed
* Fix MSB shift in prelink adjusting debug info
@ 2009-08-06 23:52 Joseph S. Myers
  2009-08-07  6:15 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2009-08-06 23:52 UTC (permalink / raw)
  To: prelink

This patch fixes an incorrect shift by 58 instead of 56 when computing the 
most significant byte when prelink adjusts debug info.  Please commit if 
OK.

This problem manifests itself as test failures for SPARC64 but not other 
platforms I've tested, probably because the mmap_base setting for that 
platform has a nonzero MSB and most others don't.

2009-08-06  Joseph Myers  <joseph@codesourcery.com>

	* src/dwarf2.c (dwarf2_write_le64, dwarf2_write_be64): Shift by 56
	not 58 for MSB.

Index: src/dwarf2.c
===================================================================
--- src/dwarf2.c	(revision 173)
+++ src/dwarf2.c	(working copy)
@@ -115,7 +115,7 @@
   p[4] = val >> 32;
   p[5] = val >> 40;
   p[6] = val >> 48;
-  p[7] = val >> 58;
+  p[7] = val >> 56;
 }
 
 static void
@@ -139,7 +139,7 @@
   p[3] = val >> 32;
   p[2] = val >> 40;
   p[1] = val >> 48;
-  p[0] = val >> 58;
+  p[0] = val >> 56;
 }
 
 static struct

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix MSB shift in prelink adjusting debug info
  2009-08-06 23:52 Fix MSB shift in prelink adjusting debug info Joseph S. Myers
@ 2009-08-07  6:15 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2009-08-07  6:15 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: prelink

On Thu, Aug 06, 2009 at 11:52:34PM +0000, Joseph S. Myers wrote:
> This patch fixes an incorrect shift by 58 instead of 56 when computing the 
> most significant byte when prelink adjusts debug info.  Please commit if 
> OK.

Committed, thanks.

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-07  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-06 23:52 Fix MSB shift in prelink adjusting debug info Joseph S. Myers
2009-08-07  6:15 ` Jakub Jelinek

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