+2016-06-14 Alan Modra <amodra@gmail.com>
+
+ * bfd-in.h (bfd_my_archive): Delete.
+ * bfd-in2.h: Regenerate.
+
2016-06-14 Alan Modra <amodra@gmail.com>
PR ld/20241
#define bfd_get_file_flags(abfd) ((abfd)->flags)
#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_my_archive(abfd) ((abfd)->my_archive)
#define bfd_has_map(abfd) ((abfd)->has_armap)
#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
#define bfd_get_file_flags(abfd) ((abfd)->flags)
#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_my_archive(abfd) ((abfd)->my_archive)
#define bfd_has_map(abfd) ((abfd)->has_armap)
#define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)
+2016-06-14 Alan Modra <amodra@gmail.com>
+
+ * ar.c: Expand uses of bfd_my_archive.
+ * size.c: Likewise.
+
2016-06-14 Alan Modra <amodra@gmail.com>
PR ld/20241
if (nread != tocopy)
/* xgettext:c-format */
fatal (_("%s is not a valid archive"),
- bfd_get_filename (bfd_my_archive (abfd)));
+ bfd_get_filename (abfd->my_archive));
/* fwrite in mingw32 may return int instead of bfd_size_type. Cast the
return value to bfd_size_type to avoid comparison between signed and
if (nread != tocopy)
/* xgettext:c-format */
fatal (_("%s is not a valid archive"),
- bfd_get_filename (bfd_my_archive (abfd)));
+ bfd_get_filename (abfd->my_archive));
/* See comment above; this saves disk arm motion */
if (ostream == NULL)
fputs (bfd_get_filename (abfd), stdout);
- if (bfd_my_archive (abfd))
- printf (" (ex %s)", bfd_get_filename (bfd_my_archive (abfd)));
+ if (abfd->my_archive)
+ printf (" (ex %s)", bfd_get_filename (abfd->my_archive));
}
/* I REALLY miss lexical functions! */
svi_total = 0;
printf ("%s ", bfd_get_filename (file));
- if (bfd_my_archive (file))
- printf (" (ex %s)", bfd_get_filename (bfd_my_archive (file)));
+ if (file->my_archive)
+ printf (" (ex %s)", bfd_get_filename (file->my_archive));
printf (":\n%-*s %*s %*s\n", svi_namelen, "section",
svi_sizelen, "size", svi_vmalen, "addr");
+2016-06-14 Alan Modra <amodra@gmail.com>
+
+ * ldlang.c: Expand uses of bfd_my_archive.
+ * ldmain.c: Likewise.
+ * ldmisc.c: Likewise.
+ * plugin.c: Likewise.
+
2016-06-14 Alan Modra <amodra@gmail.com>
PR ld/20241
archive. */
if (file->the_bfd != NULL
- && bfd_my_archive (file->the_bfd) != NULL)
+ && file->the_bfd->my_archive != NULL)
{
- fn = bfd_get_filename (bfd_my_archive (file->the_bfd));
+ fn = bfd_get_filename (file->the_bfd->my_archive);
fa = TRUE;
}
else
fa = FALSE;
}
- if (bfd_my_archive (ls->section->owner) != NULL)
+ if (ls->section->owner->my_archive != NULL)
{
- ln = bfd_get_filename (bfd_my_archive (ls->section->owner));
+ ln = bfd_get_filename (ls->section->owner->my_archive);
la = TRUE;
}
else
header_printed = TRUE;
}
- if (bfd_my_archive (abfd) == NULL
- || bfd_is_thin_archive (bfd_my_archive (abfd)))
+ if (abfd->my_archive == NULL
+ || bfd_is_thin_archive (abfd->my_archive))
{
minfo ("%s", bfd_get_filename (abfd));
len = strlen (bfd_get_filename (abfd));
}
else
{
- minfo ("%s(%s)", bfd_get_filename (bfd_my_archive (abfd)),
+ minfo ("%s(%s)", bfd_get_filename (abfd->my_archive),
bfd_get_filename (abfd));
- len = (strlen (bfd_get_filename (bfd_my_archive (abfd)))
+ len = (strlen (bfd_get_filename (abfd->my_archive))
+ strlen (bfd_get_filename (abfd))
+ 2);
}
lang_input_statement_type *i;
i = va_arg (arg, lang_input_statement_type *);
- if (bfd_my_archive (i->the_bfd) != NULL
- && !bfd_is_thin_archive (bfd_my_archive (i->the_bfd)))
+ if (i->the_bfd->my_archive != NULL
+ && !bfd_is_thin_archive (i->the_bfd->my_archive))
fprintf (fp, "(%s)",
- bfd_get_filename (bfd_my_archive (i->the_bfd)));
+ bfd_get_filename (i->the_bfd->my_archive));
fprintf (fp, "%s", i->local_sym_name);
- if ((bfd_my_archive (i->the_bfd) == NULL
- || bfd_is_thin_archive (bfd_my_archive (i->the_bfd)))
+ if ((i->the_bfd->my_archive == NULL
+ || bfd_is_thin_archive (i->the_bfd->my_archive))
&& filename_cmp (i->local_sym_name, i->filename) != 0)
fprintf (fp, " (%s)", i->filename);
}
return NULL;
}
- inarchive = (bfd_my_archive (ibfd) != NULL
- && !bfd_is_thin_archive (bfd_my_archive (ibfd)));
- name = inarchive ? bfd_my_archive (ibfd)->filename : ibfd->filename;
+ inarchive = (ibfd->my_archive != NULL
+ && !bfd_is_thin_archive (ibfd->my_archive));
+ name = inarchive ? ibfd->my_archive->filename : ibfd->filename;
fd = open (name, O_RDONLY | O_BINARY);
if (fd < 0)