aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 6cda73ce..52d3119 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -141,6 +141,9 @@ SUBSECTION
#include "hashtab.h"
#include "filenames.h"
#include "bfdlink.h"
+#if BFD_SUPPORTS_PLUGINS
+#include "plugin.h"
+#endif
#ifndef errno
extern int errno;
@@ -2299,7 +2302,6 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
{
char *first_name = NULL;
bfd *current;
- file_ptr elt_no = 0;
struct orl *map = NULL;
unsigned int orl_max = 1024; /* Fine initial default. */
unsigned int orl_count = 0;
@@ -2334,7 +2336,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
/* Map over each element. */
for (current = arch->archive_head;
current != NULL;
- current = current->archive_next, elt_no++)
+ current = current->archive_next)
{
if (bfd_check_format (current, bfd_object)
&& (bfd_get_file_flags (current) & HAS_SYMS) != 0)
@@ -2344,6 +2346,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
long src_count;
if (bfd_get_lto_type (current) == lto_slim_ir_object
+#if BFD_SUPPORTS_PLUGINS
+ && !bfd_plugin_target_p (current->xvec)
+#endif
&& report_plugin_err)
{
report_plugin_err = false;
@@ -2399,12 +2404,11 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
map = new_map;
}
- if (syms[src_count]->name != NULL
- && syms[src_count]->name[0] == '_'
- && syms[src_count]->name[1] == '_'
- && strcmp (syms[src_count]->name
- + (syms[src_count]->name[2] == '_'),
- "__gnu_lto_slim") == 0
+ if (bfd_lto_slim_symbol_p (current,
+ syms[src_count]->name)
+#if BFD_SUPPORTS_PLUGINS
+ && !bfd_plugin_target_p (current->xvec)
+#endif
&& report_plugin_err)
{
report_plugin_err = false;