This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Make solib-frv.c work in a non-FDPIC environment
- From: Daniel Jacobowitz <drow at false dot org>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 15 Nov 2008 11:14:43 -0500
- Subject: Re: [RFC] Make solib-frv.c work in a non-FDPIC environment
- References: <20081114162103.05241f81@mesquite.lan>
On Fri, Nov 14, 2008 at 04:21:03PM -0700, Kevin Buettner wrote:
> + if (nsegs < 0)
> + return NULL;
> +
> /* Allocate space for the complete (external) loadmap. */
> ext_ldmbuf_size = sizeof (struct ext_elf32_fdpic_loadmap)
> + (nsegs - 1) * sizeof (struct ext_elf32_fdpic_loadseg);
<= 0? I realize it's probably OK in practice, assuming
ext_elf32_fdpic_loadmap has a trailing [1] array, but allocating less
than the size of the array would be strange.
Otherwise sounds good.
--
Daniel Jacobowitz
CodeSourcery