This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] validate binary before use
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 1 Feb 2013 21:04:18 +0100
- Subject: Re: [patch] validate binary before use
- References: <50DCAA5C.3000301@qnx.com> <20121227205924.GA5109@host2.jankratochvil.net> <50DCB787.6020601@qnx.com> <20121227211328.GA5739@host2.jankratochvil.net> <50DCBBD1.7000707@qnx.com> <5107F591.304@qnx.com> <20130130191646.GA1034@host2.jankratochvil.net> <510A7E4B.4040608@qnx.com> <20130201030610.GA12800@host2.jankratochvil.net> <510BD1BF.2050209@qnx.com>
On Fri, 01 Feb 2013 15:31:27 +0100, Aleksandar Ristovski wrote:
> On 13-01-31 10:06 PM, Jan Kratochvil wrote:
> >This behavior is correct. Changing it would break all the tools around.
>
> <offtopic>
> If you say so. IMO it is less than ideal, it should specify l_addr
> as expected and make prelink transparent. Like this, it special
> cases meaning of this field, which is common and across many systems
> happens to always have the same meaning (except when 'successful'
> prelinking happens).
> </offtopic>
FYI on gdbserver/linux-low.c get_phdr_phnum_from_proc_auxv finds PHDR_MEMADDR
which is the absolute L_ADDR form you ask for.
Just solib-svr4.c tries to be (is it?) cross-OS compatible so it does not have
this PHDR_MEMADDR value available.
Regards,
Jan