diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-19 12:35:03 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-19 12:35:03 +0930 |
commit | 765cf5f623dbc2de8c8791bce9a29fcc3492436c (patch) | |
tree | 1e87eff4df1606a321398a0a43997673ffc0a0d0 /bfd/elf32-spu.c | |
parent | 0e1d094e96739f71f5041731a1769021421a71ca (diff) | |
download | gdb-765cf5f623dbc2de8c8791bce9a29fcc3492436c.zip gdb-765cf5f623dbc2de8c8791bce9a29fcc3492436c.tar.gz gdb-765cf5f623dbc2de8c8791bce9a29fcc3492436c.tar.bz2 |
Use bfd_get_filename throughout bfd
* aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use
bfd_get_filename rather than accessing bfd->filename directly.
* aout-target.h (MY (object_p)): Likewise.
* aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise.
* archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag),
(_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr),
(_bfd_archive_bsd44_construct_extended_name_table),
(_bfd_write_archive_contents, _bfd_compute_and_write_armap),
(_bfd_bsd_write_armap): Likewise.
* bfd.c (bfd_errmsg, _bfd_doprnt): Likewise.
* cache.c (bfd_open_file): Likewise.
* ecoff.c (_bfd_ecoff_write_armap): Likewise.
* ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise.
* elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
* elf32-frv.c (elf32_frv_relocate_section): Likewise.
* elf32-hppa.c (elf32_hppa_final_link): Likewise.
* elf32-nds32.c (nds32_elf_output_symbol_hook),
(patch_tls_desc_to_ie): Likewise.
* elf32-spu.c (sort_bfds, print_one_overlay_section),
(spu_elf_auto_overlay): Likewise.
* elf64-hppa.c (elf_hppa_final_link): Likewise.
* elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise.
* elfcore.h (elf_core_file_matches_executable_p): Likewise.
* elflink.c (bfd_elf_size_dynamic_sections),
(elf_link_input_bfd): Likewise.
* linker.c (_bfd_generic_link_output_symbols): Likewise.
* mach-o.c (bfd_mach_o_follow_dsym),
(bfd_mach_o_close_and_cleanup): Likewise.
* opncls.c (_bfd_delete_bfd, _maybe_make_executable),
(find_separate_debug_file, get_build_id_name): Likewise.
* pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise.
* plugin.c (bfd_plugin_open_input): Likewise.
* rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise.
* som.c (som_write_armap): Likewise.
* srec.c (srec_write_record, srec_write_symbols): Likewise.
* vms-lib.c (_bfd_vms_lib_get_imagelib_file),
(_bfd_vms_lib_write_archive_contents): Likewise.
* xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
Diffstat (limited to 'bfd/elf32-spu.c')
-rw-r--r-- | bfd/elf32-spu.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index 9839890..193438c 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -4103,7 +4103,7 @@ sort_bfds (const void *a, const void *b) bfd *const *abfd1 = a; bfd *const *abfd2 = b; - return filename_cmp ((*abfd1)->filename, (*abfd2)->filename); + return filename_cmp (bfd_get_filename (*abfd1), bfd_get_filename (*abfd2)); } static unsigned int @@ -4123,9 +4123,9 @@ print_one_overlay_section (FILE *script, if (fprintf (script, " %s%c%s (%s)\n", (sec->owner->my_archive != NULL - ? sec->owner->my_archive->filename : ""), + ? bfd_get_filename (sec->owner->my_archive) : ""), info->path_separator, - sec->owner->filename, + bfd_get_filename (sec->owner), sec->name) <= 0) return -1; if (sec->segment_mark) @@ -4137,9 +4137,9 @@ print_one_overlay_section (FILE *script, sec = call_fun->sec; if (fprintf (script, " %s%c%s (%s)\n", (sec->owner->my_archive != NULL - ? sec->owner->my_archive->filename : ""), + ? bfd_get_filename (sec->owner->my_archive) : ""), info->path_separator, - sec->owner->filename, + bfd_get_filename (sec->owner), sec->name) <= 0) return -1; for (call = call_fun->call_list; call; call = call->next) @@ -4155,9 +4155,9 @@ print_one_overlay_section (FILE *script, if (sec != NULL && fprintf (script, " %s%c%s (%s)\n", (sec->owner->my_archive != NULL - ? sec->owner->my_archive->filename : ""), + ? bfd_get_filename (sec->owner->my_archive) : ""), info->path_separator, - sec->owner->filename, + bfd_get_filename (sec->owner), sec->name) <= 0) return -1; @@ -4172,9 +4172,9 @@ print_one_overlay_section (FILE *script, if (sec != NULL && fprintf (script, " %s%c%s (%s)\n", (sec->owner->my_archive != NULL - ? sec->owner->my_archive->filename : ""), + ? bfd_get_filename (sec->owner->my_archive) : ""), info->path_separator, - sec->owner->filename, + bfd_get_filename (sec->owner), sec->name) <= 0) return -1; for (call = call_fun->call_list; call; call = call->next) @@ -4335,18 +4335,19 @@ spu_elf_auto_overlay (struct bfd_link_info *info) qsort (bfd_arr, bfd_count, sizeof (*bfd_arr), sort_bfds); for (i = 1; i < bfd_count; ++i) - if (filename_cmp (bfd_arr[i - 1]->filename, bfd_arr[i]->filename) == 0) + if (filename_cmp (bfd_get_filename (bfd_arr[i - 1]), + bfd_get_filename (bfd_arr[i])) == 0) { if (bfd_arr[i - 1]->my_archive == bfd_arr[i]->my_archive) { if (bfd_arr[i - 1]->my_archive && bfd_arr[i]->my_archive) /* xgettext:c-format */ info->callbacks->einfo (_("%s duplicated in %s\n"), - bfd_arr[i]->filename, - bfd_arr[i]->my_archive->filename); + bfd_get_filename (bfd_arr[i]), + bfd_get_filename (bfd_arr[i]->my_archive)); else info->callbacks->einfo (_("%s duplicated\n"), - bfd_arr[i]->filename); + bfd_get_filename (bfd_arr[i])); ok = FALSE; } } |