aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-05-19 12:57:15 +0930
committerAlan Modra <amodra@gmail.com>2020-05-19 12:57:15 +0930
commit607b483327fdfc75fb193870b3c4e7445ce3f64d (patch)
tree184200d9b5f0b36628520554c4d28476137fe650 /ld/ldmisc.c
parent69f57659c37106c4407a801d89eed4b3e2243074 (diff)
downloadbinutils-607b483327fdfc75fb193870b3c4e7445ce3f64d.zip
binutils-607b483327fdfc75fb193870b3c4e7445ce3f64d.tar.gz
binutils-607b483327fdfc75fb193870b3c4e7445ce3f64d.tar.bz2
Use bfd_get_filename throughout ld
* emultempl/beos.em (sort_by_file_name): Use bfd_get_filename rather than accessing bfd->filename directly. * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Likewise. * emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise. * emultempl/spuelf.em (embedded_spu_file): Likewise. * ldlang.c (input_statement_is_archive_path, wild_sort), (check_excluded_libs): Likewise. * ldmain.c (add_archive_element): Likewise. * ldmisc.c (vfinfo): Likewise. * pe-dll.c (auto_export, generate_edata, pe_create_import_fixup), (pe_dll_generate_implib, pe_process_import_defs): Likewise. * plugin.c (plugin_object_p): Likewise.
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index b714b97..cc090a5 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -456,10 +456,11 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
fprintf (fp, "%s generated", program_name);
else if (abfd->my_archive != NULL
&& !bfd_is_thin_archive (abfd->my_archive))
- fprintf (fp, "%s(%s)", abfd->my_archive->filename,
- abfd->filename);
+ fprintf (fp, "%s(%s)",
+ bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd));
else
- fprintf (fp, "%s", abfd->filename);
+ fprintf (fp, "%s", bfd_get_filename (abfd));
}
else if (*fmt == 'I')
{
@@ -472,7 +473,8 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bfd_boolean is_warning)
if (i->the_bfd != NULL
&& i->the_bfd->my_archive != NULL
&& !bfd_is_thin_archive (i->the_bfd->my_archive))
- fprintf (fp, "(%s)%s", i->the_bfd->my_archive->filename,
+ fprintf (fp, "(%s)%s",
+ bfd_get_filename (i->the_bfd->my_archive),
i->local_sym_name);
else
fprintf (fp, "%s", i->filename);