From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31901 invoked by alias); 23 Mar 2011 15:29:53 -0000 Received: (qmail 31841 invoked by uid 22791); 23 Mar 2011 15:29:50 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Mar 2011 15:29:45 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2NFTioU013018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 23 Mar 2011 11:29:44 -0400 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2NFTgQT019039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Mar 2011 11:29:43 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p2NFTgZt017478; Wed, 23 Mar 2011 16:29:42 +0100 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p2NFTgEU017477; Wed, 23 Mar 2011 16:29:42 +0100 Date: Wed, 23 Mar 2011 15:49:00 -0000 From: Jan Kratochvil To: elfutils-devel@lists.fedorahosted.org Cc: binutils@sourceware.org, gdb-patches@sourceware.org Subject: [2/3, ppc64, elfutils patch] eu-strip vs. func addresses for GDB inferior calls Message-ID: <20110323152942.GA13640@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg01029.txt.bz2 Hi, the elfutils part. before the fix: binary: [11] .text PROGBITS 00000000100003e0 0003e0 000410 00 AX 0 0 16 [22] .opd PROGBITS 0000000010010ad8 000ad8 0000b8 00 WA 0 0 8 [28] .gnu_debuglink PROGBITS 0000000000000000 000c2c 00001c 00 0 0 4 .debug: [11] .text NOBITS 00000000100003e0 000250 000410 00 AX 0 0 16 [22] .opd NOBITS 0000000010010ad8 000250 0000b8 00 WA 0 0 8 ^^^^^^^^ [30] .debug_info PROGBITS 0000000000000000 0002b1 0000b1 00 0 0 1 after the fix: binary: [11] .text PROGBITS 00000000100003e0 0003e0 000410 00 AX 0 0 16 [22] .opd PROGBITS 0000000010010ad8 000ad8 0000b8 00 WA 0 0 8 [28] .gnu_debuglink PROGBITS 0000000000000000 000c2c 00001c 00 0 0 4 .debug: [11] .text NOBITS 00000000100003e0 000250 000410 00 AX 0 0 16 [22] .opd PROGBITS 0000000010010ad8 000250 0000b8 00 WA 0 0 8 ^^^^^^^^ [30] .debug_info PROGBITS 0000000000000000 000369 0000b1 00 0 0 1 The patch has been regression tested on x86_64-fedora14-linux-gnu, ppc64-rhel61-linux-gnu. Thanks, Jan src/ 2011-03-23 Jan Kratochvil * strip.c (handle_elf): Provide `.opd' copy for the .debug file. --- a/src/strip.c +++ b/src/strip.c @@ -883,7 +883,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, bool discard_section = (shdr_info[cnt].idx > 0 && shdr_info[cnt].debug_data == NULL && shdr_info[cnt].shdr.sh_type != SHT_NOTE - && cnt != ehdr->e_shstrndx); + && cnt != ehdr->e_shstrndx + && strcmp (shdr_info[cnt].name, ".opd") != 0); /* Set the section header in the new file. */ GElf_Shdr debugshdr = shdr_info[cnt].shdr;