X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gold%2Farchive.cc;h=3922860685f7f366ded83abef263d1933fa7a0b4;hb=4bdb25fe6902963ca9cf91d6b2688cf888527bf8;hp=a1e21285776cd6ed1320054db69f9da5a441e938;hpb=6f2750feaf2827ef8a1a0a5b2f90c1e9a6cabbd1;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/archive.cc b/gold/archive.cc index a1e2128577..3922860685 100644 --- a/gold/archive.cc +++ b/gold/archive.cc @@ -1,6 +1,6 @@ // archive.cc -- archive support for gold -// Copyright (C) 2006-2016 Free Software Foundation, Inc. +// Copyright (C) 2006-2019 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -690,6 +690,7 @@ Archive::get_elf_object_for_member(off_t off, bool* punconfigured) int read_size; Object *obj = NULL; bool is_elf_obj = false; + bool unclaimed = false; if (is_elf_object(input_file, memoff, &ehdr, &read_size)) { @@ -716,12 +717,20 @@ Archive::get_elf_object_for_member(off_t off, bool* punconfigured) delete obj; return plugin_obj; } + + unclaimed = true; } if (!is_elf_obj) { - gold_error(_("%s: member at %zu is not an ELF object"), - this->name().c_str(), static_cast(off)); + if (unclaimed) + gold_error(_("%s: plugin failed to claim member %s at %zu"), + this->name().c_str(), member_name.c_str(), + static_cast(off)); + else + gold_error(_("%s: member %s at %zu is not an ELF object"), + this->name().c_str(), member_name.c_str(), + static_cast(off)); return NULL; }