diff options
Diffstat (limited to 'bfd/bfdio.c')
-rw-r--r-- | bfd/bfdio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/bfdio.c b/bfd/bfdio.c index 55deb3b..71991bd 100644 --- a/bfd/bfdio.c +++ b/bfd/bfdio.c @@ -234,7 +234,8 @@ bfd_tell (bfd *abfd) bfd *parent_bfd = abfd; ptr = abfd->iovec->btell (abfd); - while (parent_bfd->my_archive != NULL) + while (parent_bfd->my_archive != NULL + && !bfd_is_thin_archive (parent_bfd->my_archive)) { ptr -= parent_bfd->origin; parent_bfd = parent_bfd->my_archive; @@ -289,7 +290,7 @@ bfd_seek (bfd *abfd, file_ptr position, int direction) if (direction == SEEK_CUR && position == 0) return 0; - if (abfd->format != bfd_archive && abfd->my_archive == 0) + if (abfd->my_archive == NULL || bfd_is_thin_archive (abfd->my_archive)) { if (direction == SEEK_SET && (bfd_vma) position == abfd->where) return 0; @@ -314,7 +315,8 @@ bfd_seek (bfd *abfd, file_ptr position, int direction) { bfd *parent_bfd = abfd; - while (parent_bfd->my_archive != NULL) + while (parent_bfd->my_archive != NULL + && !bfd_is_thin_archive (parent_bfd->my_archive)) { file_position += parent_bfd->origin; parent_bfd = parent_bfd->my_archive; |