aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.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/ldlang.c
parent69f57659c37106c4407a801d89eed4b3e2243074 (diff)
downloadgdb-607b483327fdfc75fb193870b3c4e7445ce3f64d.zip
gdb-607b483327fdfc75fb193870b3c4e7445ce3f64d.tar.gz
gdb-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/ldlang.c')
-rw-r--r--ld/ldlang.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 35791e4..3d653d4 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -232,7 +232,7 @@ input_statement_is_archive_path (const char *file_spec, char *sep,
if (sep != file_spec)
{
- const char *aname = f->the_bfd->my_archive->filename;
+ const char *aname = bfd_get_filename (f->the_bfd->my_archive);
*sep = 0;
match = name_match (file_spec, aname) == 0;
*sep = link_info.path_separator;
@@ -294,7 +294,7 @@ walk_wild_file_in_exclude_list (struct name_list *exclude_list,
else if (file->the_bfd != NULL
&& file->the_bfd->my_archive != NULL
&& name_match (list_tmp->name,
- file->the_bfd->my_archive->filename) == 0)
+ bfd_get_filename (file->the_bfd->my_archive)) == 0)
return TRUE;
}
@@ -2776,7 +2776,7 @@ wild_sort (lang_wild_statement_type *wild,
}
else
{
- ln = ls->section->owner->filename;
+ ln = bfd_get_filename (ls->section->owner);
la = FALSE;
}
@@ -2791,7 +2791,7 @@ wild_sort (lang_wild_statement_type *wild,
if (fa)
fn = file->filename;
if (la)
- ln = ls->section->owner->filename;
+ ln = bfd_get_filename (ls->section->owner);
i = filename_cmp (fn, ln);
if (i > 0)
@@ -2986,7 +2986,7 @@ check_excluded_libs (bfd *abfd)
while (lib)
{
int len = strlen (lib->name);
- const char *filename = lbasename (abfd->filename);
+ const char *filename = lbasename (bfd_get_filename (abfd));
if (strcmp (lib->name, "ALL") == 0)
{