summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-06-14 13:24:37 +0930
committerAlan Modra <amodra@gmail.com>2016-06-14 13:24:37 +0930
commit3860d2b4b72feeef4cf045c6c9907a0476f46f3d (patch)
tree60d7a2907b3fcc6cab7bb227ad14bf91d9913c93 /binutils
parentb0cffb47671ffbaac559c1f17a9f248256ea6c42 (diff)
downloadbinutils-gdb-3860d2b4b72feeef4cf045c6c9907a0476f46f3d.tar.gz
Delete bfd_my_archive macro
Many more places use abfd->my_archive rather than bfd_my_archive (abfd), so let's make the code consistently use the first idiom. bfd/ * bfd-in.h (bfd_my_archive): Delete. * bfd-in2.h: Regenerate. binutils/ * ar.c: Expand uses of bfd_my_archive. * size.c: Likewise. ld/ * ldlang.c: Expand uses of bfd_my_archive. * ldmain.c: Likewise. * ldmisc.c: Likewise. * plugin.c: Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/ar.c4
-rw-r--r--binutils/size.c8
3 files changed, 11 insertions, 6 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 77a66044875..ff8161a1b41 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 3d2bc59dcd7..3afa25333c6 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 ddb3bf480d0..07a570eff7f 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");