diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2004-10-19 20:07:32 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2004-10-19 20:07:32 +0000 |
commit | 2a08daf3f55dd39f1d61fe09f56903faba4524d2 (patch) | |
tree | 28ba5a839f745cab5406fa01323af2c85176dc03 /ld | |
parent | f2cb65cafb4cb5b7a7f500d6a145c07d40f52335 (diff) | |
download | gdb-2a08daf3f55dd39f1d61fe09f56903faba4524d2.zip gdb-2a08daf3f55dd39f1d61fe09f56903faba4524d2.tar.gz gdb-2a08daf3f55dd39f1d61fe09f56903faba4524d2.tar.bz2 |
* emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify
comparison and replacement of filenames.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 21 |
2 files changed, 15 insertions, 11 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index ef7a274..6981738 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2004-10-19 Danny Smith <dannysmith@users.sourceforge.net> + + * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify + comparison and replacement of filenames. + 2004-10-19 H.J. Lu <hongjiu.lu@intel.com> PR 459 diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 8e52b7b..6451658 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1078,7 +1078,7 @@ gld_${EMULATION_NAME}_after_open (void) { struct bfd_symbol *s; struct bfd_link_hash_entry * blhe; - bfd *other_bfd; + char *other_bfd_filename; char *n; s = (relocs[i]->sym_ptr_ptr)[0]; @@ -1095,20 +1095,19 @@ gld_${EMULATION_NAME}_after_open (void) || blhe->type != bfd_link_hash_defined) continue; - other_bfd = blhe->u.def.section->owner; -#define bfd_filename(bfd) ((bfd)->my_archive ? bfd_get_filename ((bfd)->my_archive) : bfd_get_filename (bfd)) + other_bfd_filename + = blhe->u.def.section->owner->my_archive + ? bfd_get_filename (blhe->u.def.section->owner->my_archive) + : bfd_get_filename (blhe->u.def.section->owner); - if (strcmp (bfd_filename (is->the_bfd), - bfd_filename (other_bfd)) == 0) + if (strcmp (bfd_get_filename (is->the_bfd->my_archive), + other_bfd_filename) == 0) continue; /* Rename this implib to match the other one. */ - n = xmalloc (strlen (bfd_filename (other_bfd)) + 1); - - strcpy (n, bfd_filename (other_bfd)); - - bfd_filename (is->the_bfd) = n; -#undef bfd_filename + n = xmalloc (strlen (other_bfd_filename) + 1); + strcpy (n, other_bfd_filename); + is->the_bfd->my_archive->filename = n; } free (relocs); |