aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index b43d111..ee3a084 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -3426,7 +3426,15 @@ display_any_bfd (bfd *file, int level)
display_any_bfd (arfile, level + 1);
if (last_arfile != NULL)
- bfd_close (last_arfile);
+ {
+ bfd_close (last_arfile);
+ /* PR 17512: file: ac585d01. */
+ if (arfile == last_arfile)
+ {
+ last_arfile = NULL;
+ break;
+ }
+ }
last_arfile = arfile;
}