mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
Do not assume that either bfd is an archive
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2004-08-27 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* emultempl/pe.em (after_open): Do not assume that either bfd is
|
||||||
|
an archive.
|
||||||
|
|
||||||
2004-08-26 Alan Modra <amodra@bigpond.net.au>
|
2004-08-26 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* ldlang.c (lang_init): Don't compare with TRUE.
|
* ldlang.c (lang_init): Don't compare with TRUE.
|
||||||
|
@ -1096,17 +1096,19 @@ gld_${EMULATION_NAME}_after_open (void)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
other_bfd = blhe->u.def.section->owner;
|
other_bfd = blhe->u.def.section->owner;
|
||||||
|
#define bfd_filename(bfd) ((bfd)->my_archive ? bfd_get_filename ((bfd)->my_archive) : bfd_get_filename (bfd))
|
||||||
|
|
||||||
if (strcmp (is->the_bfd->my_archive->filename,
|
if (strcmp (bfd_filename (is->the_bfd),
|
||||||
other_bfd->my_archive->filename) == 0)
|
bfd_filename (other_bfd)) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Rename this implib to match the other. */
|
/* Rename this implib to match the other one. */
|
||||||
n = (char *) xmalloc (strlen (other_bfd->my_archive->filename) + 1);
|
n = xmalloc (strlen (bfd_filename (other_bfd)) + 1);
|
||||||
|
|
||||||
strcpy (n, other_bfd->my_archive->filename);
|
strcpy (n, bfd_filename (other_bfd));
|
||||||
|
|
||||||
is->the_bfd->my_archive->filename = n;
|
bfd_filename (is->the_bfd) = n;
|
||||||
|
#undef bfd_filename
|
||||||
}
|
}
|
||||||
|
|
||||||
free (relocs);
|
free (relocs);
|
||||||
|
Reference in New Issue
Block a user