diff options
author | Martin Storsj? <martin@martin.st> | 2022-01-22 14:31:22 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2022-01-22 14:31:22 +0000 |
commit | 58de646be2108bbe30facd7a294fc45df7b46065 (patch) | |
tree | 825726c0453de13a09cf6462dd497fbf20125f68 | |
parent | cc5e40736d994e53df7d550b7d705f6dcc15169d (diff) | |
download | gdb-58de646be2108bbe30facd7a294fc45df7b46065.zip gdb-58de646be2108bbe30facd7a294fc45df7b46065.tar.gz gdb-58de646be2108bbe30facd7a294fc45df7b46065.tar.bz2 |
Allow inferring tmp_prefix from the dll name from a def file.
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/dlltool.c | 34 |
2 files changed, 22 insertions, 17 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d8f370d..09f3920 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2022-01-22 Martin Storsjö <martin@martin.st> + + * dlltool.c (main): Allow inferring tmp_prefix from the dll name + from a def file. + 2022-01-22 Nick Clifton <nickc@redhat.com> * configure: Regenerate. diff --git a/binutils/dlltool.c b/binutils/dlltool.c index a1e2b48..d95bf3f 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -3930,23 +3930,6 @@ main (int ac, char **av) } } - if (tmp_prefix == NULL) - { - /* If possible use a deterministic prefix. */ - if (dll_name) - { - tmp_prefix = xmalloc (strlen (dll_name) + 2); - sprintf (tmp_prefix, "%s_", dll_name); - for (i = 0; tmp_prefix[i]; i++) - if (!ISALNUM (tmp_prefix[i])) - tmp_prefix[i] = '_'; - } - else - { - tmp_prefix = prefix_encode ("d", getpid ()); - } - } - for (i = 0; mtable[i].type; i++) if (strcmp (mtable[i].type, mname) == 0) break; @@ -4006,6 +3989,23 @@ main (int ac, char **av) optind++; } + if (tmp_prefix == NULL) + { + /* If possible use a deterministic prefix. */ + if (dll_name) + { + tmp_prefix = xmalloc (strlen (dll_name) + 2); + sprintf (tmp_prefix, "%s_", dll_name); + for (i = 0; tmp_prefix[i]; i++) + if (!ISALNUM (tmp_prefix[i])) + tmp_prefix[i] = '_'; + } + else + { + tmp_prefix = prefix_encode ("d", getpid ()); + } + } + mangle_defs (); if (exp_name) |