This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix Gold/strip discrepancies for PR 11786
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>, Cary Coutant <ccoutant at google dot com>
- Date: Tue, 5 Nov 2013 14:36:35 +0100
- Subject: Re: [PATCH] Fix Gold/strip discrepancies for PR 11786
- Authentication-results: sourceware.org; auth=none
- References: <yjt24n85x78h dot fsf at ruffy dot mtv dot corp dot google dot com> <20131031154957 dot GA11260 at host2 dot jankratochvil dot net> <CADPb22QKBpYpmmZzeKJy7JWukpfkTQcYZDm+KeEkr6K_92LJ2A at mail dot gmail dot com>
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