aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph S dot Myers <joseph at codesourcery dot com>2009-08-06 23:52:34 +0000
committerMark Hatle <mark.hatle@windriver.com>2010-07-22 18:24:08 -0500
commit8d8e74b4f9aaaaa3fa28d562930d7c815c988108 (patch)
treed29c3946cd00a4e3984e1e17e0e7b45e12d4353b
parent8bcdedc34ed809dc0582d10fb25c97ff610b1067 (diff)
downloadprelink-cross-8d8e74b4f9aaaaa3fa28d562930d7c815c988108.tar.gz
prelink-cross-8d8e74b4f9aaaaa3fa28d562930d7c815c988108.tar.bz2
prelink-cross-8d8e74b4f9aaaaa3fa28d562930d7c815c988108.zip
Fix MSB shift in prelink adjusting debug infocross_prelink_20061201
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.
-rw-r--r--trunk/ChangeLog.cross5
-rw-r--r--trunk/src/dwarf2.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/trunk/ChangeLog.cross b/trunk/ChangeLog.cross
index 946a154..557ce43 100644
--- a/trunk/ChangeLog.cross
+++ b/trunk/ChangeLog.cross
@@ -2,6 +2,11 @@
* Integrate prelinker/cross-prelinking patches
+ 2009-08-06 Joseph Myers <joseph@codesourcery.com>
+
+ * src/dwarf2.c (dwarf2_write_le64, dwarf2_write_be64): Shift by 56
+ not 58 for MSB.
+
2009-03-19 Joseph Myers <joseph@codesourcery.com>
Issue #4626
diff --git a/trunk/src/dwarf2.c b/trunk/src/dwarf2.c
index 4c27836..a0a89dd 100644
--- a/trunk/src/dwarf2.c
+++ b/trunk/src/dwarf2.c
@@ -115,7 +115,7 @@ dwarf2_write_le64 (unsigned char *p, GElf_Addr val)
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 @@ dwarf2_write_be64 (unsigned char *p, GElf_Addr val)
p[3] = val >> 32;
p[2] = val >> 40;
p[1] = val >> 48;
- p[0] = val >> 58;
+ p[0] = val >> 56;
}
static struct