This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH RFA] solib-svr4.c patch for dynamic executables



The comparison of the executable's PC with the new process's PC seems
fragile to me.  We already know of two cases where this can happen
(interpreters and dynamic executables); I wonder whether more will
appear in the future.

How would you feel about including *both* tests in
svr4_relocate_main_executable --- both testing for a .interp section,
and testing the DYNAMIC flag?

Something like:

	if (exec file is DYNAMIC
            && exec file has no .interp
            && exec file's entry PC is different from new process's PC)
          then do the relocation

This would avoid testing the PC when we run non-DYNAMIC programs with
no .interp.  (Which would be an old-fashioned statically linked
program, right?)

But either way, I feel I am nitpicking on shaky ground.  Commit the
change, with or without my suggestion, and we'll just see what
happens.

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