This is the mail archive of the
mailing list for the GDB project.
Re: [7.0] PR/9174: gdb can't handle PIE
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Thiago Jung Bauermann <thiago dot bauermann at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 5 Aug 2009 20:04:30 +0200
- Subject: Re: [7.0] PR/9174: gdb can't handle PIE
- References: <firstname.lastname@example.org>
On Wed, 29 Jul 2009 22:40:54 +0200, Thiago Jung Bauermann wrote:
> I just removed my name from the task in the subject in the wiki page for
> GDB 7.0. The task consists of taking one of the two "competing" patches which
> implement PIE support and herding it upstream, or implementing a third patch.
It is questionable how much clean it should be.
The right way would be to make all the GDB read-in symbols non-relocated and
relocated by section_offsets/ANOFFSET only on each use.
Currently the (Red Hat) PIE patch
does a needless reread of the symbol files when the executable gets its final
in-memory address from solib_add() as it has been added there to the shared
/* For SVR4 versions, the first entry in the link map is for the
inferior executable, so we must ignore it. For some versions of
SVR4, it has no name. For others (Solaris 2.3 for example), it
does have a name, so we can no longer use a missing name to
decide when to ignore it. */
+ /* Pie case, main executable has been relocated. */
This non-relocated symbols functionality should be also applicable for the
multi-executables support (as somewhere Tom Tromey made a note about).
(there are sure more cleanups to be done)