aboutsummaryrefslogtreecommitdiff
path: root/binutils/dlltool.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-09-02 15:55:36 +0000
committerNick Clifton <nickc@redhat.com>2004-09-02 15:55:36 +0000
commit5885be89393164a4835048ca9f18bcb7258d9580 (patch)
tree0732cf5ecb9247bb057cfb6a893d97a2d59924dc /binutils/dlltool.c
parent5010d38b081f5273569baffbfc32d2dd67a6d073 (diff)
downloadgdb-5885be89393164a4835048ca9f18bcb7258d9580.zip
gdb-5885be89393164a4835048ca9f18bcb7258d9580.tar.gz
gdb-5885be89393164a4835048ca9f18bcb7258d9580.tar.bz2
(make_one_lib_file): For IDATA6 take the name from exp->internal_name if it
is present.
Diffstat (limited to 'binutils/dlltool.c')
-rw-r--r--binutils/dlltool.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 2f82928..7688c8b 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -2517,16 +2517,19 @@ make_one_lib_file (export_type *exp, int i)
why it did that, and it does not match what I see
in programs compiled with the MS tools. */
int idx = exp->hint;
- si->size = strlen (xlate (exp->name)) + 3;
+ char const * internal_name =
+ exp->internal_name ? exp->internal_name : xlate (exp->name);
+
+ si->size = strlen (internal_name) + 3;
si->data = xmalloc (si->size);
si->data[0] = idx & 0xff;
si->data[1] = idx >> 8;
- strcpy (si->data + 2, xlate (exp->name));
+ strcpy (si->data + 2, internal_name);
}
break;
case IDATA7:
si->size = 4;
- si->data =xmalloc (4);
+ si->data = xmalloc (4);
memset (si->data, 0, si->size);
rel = xmalloc (sizeof (arelent));
rpp = xmalloc (sizeof (arelent *) * 2);