if (elf_section_data (isec)->relocs != internal_relocs)
free (internal_relocs);
error_ret_free_local:
- if (local_syms != NULL
- && (symtab_hdr->contents
- != (unsigned char *) local_syms))
+ if (symtab_hdr->contents != (unsigned char *) local_syms)
free (local_syms);
return FALSE;
}
continue;
}
- if (symtab_hdr->contents != NULL)
- {
- /* Don't use cached symbols since the generic ELF linker
- code only reads local symbols, and we need globals too. */
- free (symtab_hdr->contents);
- symtab_hdr->contents = NULL;
- }
+ /* Don't use cached symbols since the generic ELF linker
+ code only reads local symbols, and we need globals too. */
+ free (symtab_hdr->contents);
+ symtab_hdr->contents = NULL;
syms = bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, 0,
NULL, NULL, NULL);
symtab_hdr->contents = (void *) syms;
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
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)
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)
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;
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)
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;
}
}