aboutsummaryrefslogtreecommitdiff
path: root/binutils/arsup.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-05-19 12:35:56 +0930
committerAlan Modra <amodra@gmail.com>2020-05-19 12:35:56 +0930
commitc177f3771c821d649bc1b1d6dc67caa0a0a22f78 (patch)
tree9dbca410452dee46148f2fcc7adf39b7d467fda9 /binutils/arsup.c
parent765cf5f623dbc2de8c8791bce9a29fcc3492436c (diff)
downloadgdb-c177f3771c821d649bc1b1d6dc67caa0a0a22f78.zip
gdb-c177f3771c821d649bc1b1d6dc67caa0a0a22f78.tar.gz
gdb-c177f3771c821d649bc1b1d6dc67caa0a0a22f78.tar.bz2
Use bfd_get_filename throughout binutils
* ar.c (map_over_members, get_pos_bfd, delete_members, move_members), (replace_members): Use bfd_get_filename rather than accessing bfd->filename directly. * arsup.c (map_over_list, ar_delete, ar_replace, ar_extract): Likewise. * binemul.c (do_ar_emul_append): Likewise. * coffgrok.c (coff_grok): Likewise.
Diffstat (limited to 'binutils/arsup.c')
-rw-r--r--binutils/arsup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 00967c9..a668f27 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -77,8 +77,8 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
for (head = arch->archive_next; head; head = head->archive_next)
{
- if (head->filename != NULL
- && FILENAME_CMP (ptr->name, head->filename) == 0)
+ if (bfd_get_filename (head) != NULL
+ && FILENAME_CMP (ptr->name, bfd_get_filename (head)) == 0)
{
found = TRUE;
function (head, prev);
@@ -311,7 +311,7 @@ ar_delete (struct list *list)
while (member)
{
- if (FILENAME_CMP(member->filename, list->name) == 0)
+ if (FILENAME_CMP (bfd_get_filename (member), list->name) == 0)
{
*prev = member->archive_next;
found = 1;
@@ -376,7 +376,7 @@ ar_replace (struct list *list)
while (member)
{
- if (FILENAME_CMP (member->filename, list->name) == 0)
+ if (FILENAME_CMP (bfd_get_filename (member), list->name) == 0)
{
/* Found the one to replace. */
bfd *abfd = bfd_openr (list->name, NULL);
@@ -474,7 +474,7 @@ ar_extract (struct list *list)
while (member && !found)
{
- if (FILENAME_CMP (member->filename, list->name) == 0)
+ if (FILENAME_CMP (bfd_get_filename (member), list->name) == 0)
{
extract_file (member);
found = 1;