diff options
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/bfd-in.h | 1 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 1 | ||||
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/ar.c | 4 | ||||
-rw-r--r-- | binutils/size.c | 8 | ||||
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/ldlang.c | 8 | ||||
-rw-r--r-- | ld/ldmain.c | 8 | ||||
-rw-r--r-- | ld/ldmisc.c | 10 | ||||
-rw-r--r-- | ld/plugin.c | 6 |
11 files changed, 39 insertions, 24 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index db25f2e..53c7c88 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 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 * archive.c (open_nested_file): Set my_archive. * bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 656d991..a7532c5 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -511,7 +511,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); #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) diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index b536a59..2d6237c 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -518,7 +518,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); #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) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 77a6604..ff8161a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,10 @@ 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 * bucomm.c (bfd_get_archive_filename): Return file name within thin archive. diff --git a/binutils/ar.c b/binutils/ar.c index 3d2bc59..3afa253 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -1003,7 +1003,7 @@ print_contents (bfd *abfd) 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 @@ -1081,7 +1081,7 @@ extract_file (bfd *abfd) 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) diff --git a/binutils/size.c b/binutils/size.c index ddb3bf4..07a570e 100644 --- a/binutils/size.c +++ b/binutils/size.c @@ -499,8 +499,8 @@ print_berkeley_format (bfd *abfd) 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! */ @@ -587,8 +587,8 @@ print_sysv_format (bfd *file) 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"); diff --git a/ld/ChangeLog b/ld/ChangeLog index ac56c8f..4518b46 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,12 @@ 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 * ldmain.c (add_archive_element): Just print file name of file within thin archives. diff --git a/ld/ldlang.c b/ld/ldlang.c index 1cbba39..f29651a 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -2499,9 +2499,9 @@ wild_sort (lang_wild_statement_type *wild, 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 @@ -2510,9 +2510,9 @@ wild_sort (lang_wild_statement_type *wild, 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 diff --git a/ld/ldmain.c b/ld/ldmain.c index 3c5065f..406833b 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -865,17 +865,17 @@ add_archive_element (struct bfd_link_info *info, 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); } diff --git a/ld/ldmisc.c b/ld/ldmisc.c index 321db9a..5efff74 100644 --- a/ld/ldmisc.c +++ b/ld/ldmisc.c @@ -231,13 +231,13 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning) 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); } diff --git a/ld/plugin.c b/ld/plugin.c index c347cfa..ebde25f 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -1089,9 +1089,9 @@ plugin_object_p (bfd *ibfd) 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) |