diff options
author | Alan Modra <amodra@gmail.com> | 2024-04-09 08:50:23 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2024-04-09 11:21:57 +0930 |
commit | 7c71e67e119eb36f62803797640b7638bac6d5e8 (patch) | |
tree | e40cd4281c2d219a6855f635e8d5de78d579dcc1 /bfd | |
parent | c8d45dbd0a05885f57e52f9b852bea4c84bf3062 (diff) | |
download | gdb-7c71e67e119eb36f62803797640b7638bac6d5e8.zip gdb-7c71e67e119eb36f62803797640b7638bac6d5e8.tar.gz gdb-7c71e67e119eb36f62803797640b7638bac6d5e8.tar.bz2 |
Remove dead code in bfdwin.c
All of bfdwin.c is wrapped in USE_MMAP. There isn't any point in
HAVE_MMAP tests inside USE_MMAP.
* bfdwin.c (bfd_free_window, bfd_get_file_window): Delete
HAVE_MMAP conditionals.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/bfdwin.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c index 73e4463..0ef7b14 100644 --- a/bfd/bfdwin.c +++ b/bfd/bfdwin.c @@ -118,20 +118,14 @@ bfd_free_window (bfd_window *windowp) if (i->mapped) { -#ifdef HAVE_MMAP munmap (i->data, i->size); goto no_free; -#else - abort (); -#endif } #ifdef HAVE_MPROTECT mprotect (i->data, i->size, PROT_READ | PROT_WRITE); #endif free (i->data); -#ifdef HAVE_MMAP no_free: -#endif i->data = 0; /* There should be no more references to i at this point. */ free (i); @@ -174,7 +168,6 @@ bfd_get_file_window (bfd *abfd, return false; i->data = NULL; } -#ifdef HAVE_MMAP if (ok_to_map && (i->data == NULL || i->mapped == 1) && (abfd->flags & BFD_IN_MEMORY) == 0) @@ -249,9 +242,6 @@ bfd_get_file_window (bfd *abfd, else fprintf (stderr, _("not mapping: env var not set\n")); } -#else - ok_to_map = 0; -#endif #ifdef HAVE_MPROTECT if (!writable) |