From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25960 invoked by alias); 1 Apr 2014 21:00:09 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 25944 invoked by uid 89); 1 Apr 2014 21:00:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: smtp.smtpout.orange.fr Received: from smtp08.smtpout.orange.fr (HELO smtp.smtpout.orange.fr) (80.12.242.130) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 Apr 2014 21:00:06 +0000 Received: from beldin ([92.149.62.172]) by mwinf5d16 with ME id kl011n00E3iydPg03l02yj; Tue, 01 Apr 2014 23:00:04 +0200 From: Robert Jarzmik To: Jan Kratochvil Cc: gdb@sourceware.org, robert.jarzmik@intel.com Subject: Re: Gdb, PIE and scan_dyntag(DT_DEBUG) References: <87bnwuuhzp.fsf@free.fr> <20140331184724.GA6038@host2.jankratochvil.net> <877g7augck.fsf@free.fr> <20140401064803.GA31557@host2.jankratochvil.net> X-URL: http://belgarath.falguerolles.org/ Date: Tue, 01 Apr 2014 21:00:00 -0000 In-Reply-To: <20140401064803.GA31557@host2.jankratochvil.net> (Jan Kratochvil's message of "Tue, 1 Apr 2014 08:48:03 +0200") Message-ID: <8738hwvk8e.fsf@free.fr> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-04/txt/msg00001.txt.bz2 Jan Kratochvil writes: > On Tue, 01 Apr 2014 00:56:59 +0200, Robert Jarzmik wrote: >> To be more precise, the ELF program headers of the unstripped binary and the >> stripped binary didn't match, > > In general eu-strip (from elfutils; compared to binutils strip) is more > preserving the binaries when they still should match each other. > And Fedora is using eu-strip for the debug info packages separation. > IIRC I have seen some other distro using regular strip for it. And you're damn right about it. I checked the Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align *** unstripped app_process *** [Requesting program interpreter: /system/bin/linker64] LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000001788 0x0000000000001788 R E 1000 LOAD 0x0000000000001c20 0x0000000000002c20 0x0000000000002c20 0x00000000000003e0 0x00000000000003e8 RW 1000 *** binutils strip passed app_process *** [Requesting program interpreter: /system/bin/linker64] LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000001788 0x0000000000001788 R E 1000 LOAD 0x0000000000001c20 0x0000000000002c20 0x0000000000002c20 0x00000000000003d8 0x00000000000003e8 RW 1000 *** elfutils eu-strip passed app_process *** [Requesting program interpreter: /system/bin/linker64] LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000001788 0x0000000000001788 R E 1000 LOAD 0x0000000000001c20 0x0000000000002c20 0x0000000000002c20 0x00000000000003e0 0x00000000000003e8 RW 1000 So eu-strip makes my day :) Thanks for the info, I didn't know there was a difference in strip between binutils and elfutils. Cheers. -- Robert