This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH] Fix Gold/strip discrepancies for PR 11786


On Mon, 04 Nov 2013 23:21:33 +0100, Doug Evans wrote:
> On Thu, Oct 31, 2013 at 8:49 AM, Jan Kratochvil
> > On Sat, 26 Oct 2013 01:26:22 +0200, Doug Evans wrote:
> >> --- a/gdb/solib-svr4.c
> >> +++ b/gdb/solib-svr4.c
> >> @@ -2608,6 +2608,22 @@ svr4_exec_displacement (CORE_ADDR *displacementp)
> >>                 if (memcmp (phdrp, phdr2p, sizeof (*phdrp)) == 0)
> >>                   continue;
> >>
> >> +               /* Gold and strip differ on the flags and alignment of
> >> +                  PT_GNU_RELRO.  See PR 11786.  */
> >> +               if (phdr2[i].p_type == PT_GNU_RELRO)
> >> +               {
> >> +                 Elf32_External_Phdr tmp_phdr = *phdrp;
> >> +                 Elf32_External_Phdr tmp_phdr2 = *phdr2p;
> >
> > One can modify directly *phdrp and *phdr2p, when we decide to ignore the
> > PT_GNU_RELRO differences there is no other use for that data.
> 
> I like the locality, and not imposing the side effect outside the
> scope of the task at hand (PT_GNU_RELRO).

OK, why not.


Jan


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