This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [7.0] PR/9723: gdb breakpoints silently fail on PIE binaries
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Thiago Jung Bauermann <thiago dot bauermann at gmail dot com>
- Cc: gdb at sourceware dot org, Joel Brobecker <brobecker at adacore dot com>
- Date: Sun, 19 Jul 2009 21:13:00 -0700
- Subject: Re: [7.0] PR/9723: gdb breakpoints silently fail on PIE binaries
- References: <200907192257.08197.thiago.bauermann@gmail.com>
On Sun, Jul 19, 2009 at 6:57 PM, Thiago Jung
Bauermann<thiago.bauermann@gmail.com> wrote:
> All this to say: can somebody save me some research time and tell in high
> level how can I recognize from looking at an ELF file that I'm dealing with a
> PIE binary (NOT a PIC library, of course)? Something like "see if the frob bit
> in the bozo section is set") is enough, I can go from there.
Elf*_Ehdr.e_type == ET_DYN for the main executable?
Elf*_Phdr.p_vaddr == 0 for the first PT_LOAD segment?
[This one is only true for non-prelinked -pie executable.]
Cheers,
--
Paul Pluzhnikov