aboutsummaryrefslogtreecommitdiff
path: root/bfd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/cache.c')
-rw-r--r--bfd/cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/cache.c b/bfd/cache.c
index 995cf1f..8efbcb9 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -241,7 +241,8 @@ bfd_cache_lookup_worker (bfd *abfd, enum cache_flag flag)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
abort ();
- while (abfd->my_archive)
+ while (abfd->my_archive != NULL
+ && !bfd_is_thin_archive (abfd->my_archive))
abfd = abfd->my_archive;
if (abfd->iostream != NULL)
@@ -466,7 +467,8 @@ cache_bmmap (struct bfd *abfd ATTRIBUTE_UNUSED,
pagesize_m1 = getpagesize () - 1;
/* Handle archive members. */
- if (abfd->my_archive != NULL)
+ if (abfd->my_archive != NULL
+ && !bfd_is_thin_archive (abfd->my_archive))
offset += abfd->origin;
/* Align. */