[RFC] Make solib-frv.c work in a non-FDPIC environment

Daniel Jacobowitz drow@false.org
Sat Nov 15 22:50:00 GMT 2008


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



More information about the Gdb-patches mailing list