X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fbfdwin.c;h=51b4faca76c09027b07edf329bd40199c16c9e9a;hb=081e778cb855581fe63a9b26aa582900da5d1a8b;hp=4103e9c2f55e3f489ef937caf30f896f93c9dbe7;hpb=103ae312ba3c0b864851454b34a2104eff3370ad;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c index 4103e9c2f5..51b4faca76 100644 --- a/bfd/bfdwin.c +++ b/bfd/bfdwin.c @@ -1,6 +1,5 @@ /* Support for memory-mapped windows into a BFD. - Copyright 1995, 1996, 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2011 - Free Software Foundation, Inc. + Copyright (C) 1995-2020 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -145,11 +144,13 @@ bfd_get_file_window (bfd *abfd, int fd; /* Find the real file and the real offset into it. */ - while (abfd->my_archive != NULL) + while (abfd->my_archive != NULL + && !bfd_is_thin_archive (abfd->my_archive)) { offset += abfd->origin; abfd = abfd->my_archive; } + offset += abfd->origin; /* Seek into the file, to ensure it is open if cacheable. */ if (abfd->iostream == NULL