From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20854 invoked by alias); 6 Aug 2009 23:52:43 -0000 Received: (qmail 20845 invoked by uid 22791); 6 Aug 2009 23:52:42 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Aug 2009 23:52:37 +0000 Received: (qmail 20849 invoked from network); 6 Aug 2009 23:52:35 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Aug 2009 23:52:35 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.69) (envelope-from ) id 1MZCl8-0006hI-CH for prelink@sourceware.org; Thu, 06 Aug 2009 23:52:34 +0000 Date: Thu, 06 Aug 2009 23:52:00 -0000 From: "Joseph S. Myers" To: prelink@sourceware.org Subject: Fix MSB shift in prelink adjusting debug info Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact prelink-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: prelink-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00007.txt.bz2 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 * 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