[PATCH] Change return value of _bfd_mmap_temporary
Alan Modra
amodra@gmail.com
Mon Sep 8 12:53:25 GMT 2025
On Thu, Sep 04, 2025 at 03:42:28PM -0600, Tom Tromey wrote:
> _bfd_mmap_temporary will return MAP_FAILED in some cases, but only one
> caller was prepared for this. This caused a couple of issues in gdb.
>
> This patch chnages _bfd_mmap_temporary to always return NULL on
> failure. It also changes the logic to fall back to bfd_malloc if mmap
> fails.
>
> I took the opportunity to change some "(void *) -1" to MAP_FAILED
> where appropriate.
Looks good to me.
--
Alan Modra
More information about the Binutils
mailing list