From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29874 invoked by alias); 24 Mar 2014 11:42:24 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 29863 invoked by uid 89); 24 Mar 2014 11:42:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 24 Mar 2014 11:42:22 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id BC3F5270AA56 for ; Mon, 24 Mar 2014 12:42:19 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QCnzfivPz4WT for ; Mon, 24 Mar 2014 12:42:19 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 97944270AA19 for ; Mon, 24 Mar 2014 12:42:19 +0100 (CET) From: Tristan Gingold Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: [Patch]: Fix output of objdump -Wf Message-Id: Date: Mon, 24 Mar 2014 11:42:00 -0000 To: "binutils@sourceware.org Development" Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00251.txt.bz2 Hello, the purpose of this patch is to correctly display the values of FDE pc in o= bjdump -Wf: it sets the address field of struct dwarf_section, so that dwarf.c:get_encoded_valu= e can relocate pcrel encoded values. With this patch, the output of objdump -Wf matches the output of readelf -w= f. No regressions for i386-linux Ok for trunk ? Tristan. binutils/ * objdump.c (load_specific_debug_section): Set address of section. diff --git a/binutils/objdump.c b/binutils/objdump.c index 20e3b09..14f4122 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -2259,7 +2259,7 @@ load_specific_debug_section (enum dwarf_section_displ= ay_enum debug, if (section->start !=3D NULL) return 1; =20 - section->address =3D 0; + section->address =3D bfd_get_section_vma (abfd, sec); section->size =3D bfd_get_section_size (sec); section->start =3D NULL; ret =3D bfd_get_full_section_contents (abfd, sec, §ion->start);