Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c =================================================================== --- gdb-7.9.90.20150709.orig/gdb/gdb_bfd.c 2015-07-09 18:23:59.344017882 +0200 +++ gdb-7.9.90.20150709/gdb/gdb_bfd.c 2015-07-09 18:24:06.986083071 +0200 @@ -24,12 +24,14 @@ #include "hashtab.h" #include "filestuff.h" #include "vec.h" +#ifndef __sparc__ #ifdef HAVE_MMAP #include #ifndef MAP_FAILED #define MAP_FAILED ((void *) -1) #endif #endif +#endif #include "target.h" #include "gdb/fileio.h" #include "inferior.h" @@ -397,6 +399,7 @@ free_one_bfd_section (bfd *abfd, asectio if (sect != NULL && sect->data != NULL) { +#ifndef __sparc__ #ifdef HAVE_MMAP if (sect->map_addr != NULL) { @@ -407,6 +410,7 @@ free_one_bfd_section (bfd *abfd, asectio } else #endif +#endif xfree (sect->data); } } @@ -558,6 +562,7 @@ gdb_bfd_map_section (asection *sectp, bf if (descriptor->data != NULL) goto done; +#ifndef __sparc__ #ifdef HAVE_MMAP if (!bfd_is_section_compressed (abfd, sectp)) { @@ -592,6 +597,7 @@ gdb_bfd_map_section (asection *sectp, bf } } #endif /* HAVE_MMAP */ +#endif /* Handle compressed sections, or ordinary uncompressed sections in the no-mmap case. */