// archive.cc -- archive support for gold
-// Copyright (C) 2006-2015 Free Software Foundation, Inc.
+// Copyright (C) 2006-2021 Free Software Foundation, Inc.
// This file is part of gold.
int read_size;
Object *obj = NULL;
bool is_elf_obj = false;
+ bool unclaimed = false;
if (is_elf_object(input_file, memoff, &ehdr, &read_size))
{
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<size_t>(off));
+ if (unclaimed)
+ gold_error(_("%s: plugin failed to claim member %s at %zu"),
+ this->name().c_str(), member_name.c_str(),
+ static_cast<size_t>(off));
+ else
+ gold_error(_("%s: member %s at %zu is not an ELF object"),
+ this->name().c_str(), member_name.c_str(),
+ static_cast<size_t>(off));
return NULL;
}