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: Wed, 3 Apr 2013 21:34:23 +0200
- Subject: Re: [patch] validate binary before use
- References: <20121227211328 dot GA5739 at host2 dot jankratochvil dot net> <50DCBBD1 dot 7000707 at qnx dot com> <5107F591 dot 304 at qnx dot com> <20130131063518 dot GA3027 at host2 dot jankratochvil dot net> <510A7EB0 dot 90702 at qnx dot com> <51278A2A dot 9000802 at qnx dot com> <512E42D1 dot 3040101 at qnx dot com> <514C58B2 dot 6090701 at qnx dot com> <20130328183727 dot GA14798 at host2 dot jankratochvil dot net> <515B0632 dot 1040502 at qnx dot com>
On Tue, 02 Apr 2013 18:24:18 +0200, Aleksandar Ristovski wrote:
> >>+ const CORE_ADDR sect_lma = l_addr + bfd_section_vma (so->abfd, asect);
> >
> >"lma" is irrelevant here, it needs to be VMA as you do runtime
> >target_read_memory for that address.
>
> [AR] I read "lma" as load memory address, i.e. address where it is
> actually loaded. This is to differentiate load address from virtual
> address as set by the link-editor.
It is no longer in the code but LMA was confusing, LMA is an established term
in bfd scope with a different meaning:
$ info '(ld)Output Section LMA'
This is not yet a full review.
Thanks,
Jan