This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [7.0] PR/9174: gdb can't handle PIE

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
library list:
        /* 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]