Re: Gdb, PIE and scan_dyntag(DT_DEBUG)
Robert Jarzmik <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Jan Kratochvil <[email protected]> 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