mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
Generate correct hint value for IDATA6.
PR binutils/20814 * dlltool.c (struct export): Remove hint field. (make_one_lib_file): Store the ordinal value for IDATA6 not the hint. (gen_lib_file): Delete reference to hint field. (mangle_defs): Delete computation of hint field.
This commit is contained in:
parent
db58b3735f
commit
35fd2ddeb1
@ -1,3 +1,12 @@
|
||||
2016-11-14 Rudy <jacky.chouchou@yandex.ru>
|
||||
|
||||
PR binutils/20814
|
||||
* dlltool.c (struct export): Remove hint field.
|
||||
(make_one_lib_file): Store the ordinal value for IDATA6 not the
|
||||
hint.
|
||||
(gen_lib_file): Delete reference to hint field.
|
||||
(mangle_defs): Delete computation of hint field.
|
||||
|
||||
2016-11-11 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/20751
|
||||
|
@ -780,10 +780,9 @@ typedef struct export
|
||||
int ordinal;
|
||||
int constant;
|
||||
int noname; /* Don't put name in image file. */
|
||||
int private; /* Don't put reference in import lib. */
|
||||
int private; /* Don't put reference in import lib. */
|
||||
int data;
|
||||
int hint;
|
||||
int forward; /* Number of forward label, 0 means no forward. */
|
||||
int forward; /* Number of forward label, 0 means no forward. */
|
||||
struct export *next;
|
||||
}
|
||||
export_type;
|
||||
@ -2776,10 +2775,8 @@ make_one_lib_file (export_type *exp, int i, int delay)
|
||||
case IDATA6:
|
||||
if (!exp->noname)
|
||||
{
|
||||
/* This used to add 1 to exp->hint. I don't know
|
||||
why it did that, and it does not match what I see
|
||||
in programs compiled with the MS tools. */
|
||||
int idx = exp->hint;
|
||||
int idx = exp->ordinal;
|
||||
|
||||
if (exp->its_name)
|
||||
si->size = strlen (exp->its_name) + 3;
|
||||
else
|
||||
@ -3263,7 +3260,6 @@ gen_lib_file (int delay)
|
||||
alias_exp.noname = exp->noname;
|
||||
alias_exp.private = exp->private;
|
||||
alias_exp.data = exp->data;
|
||||
alias_exp.hint = exp->hint;
|
||||
alias_exp.forward = exp->forward;
|
||||
alias_exp.next = exp->next;
|
||||
n = make_one_lib_file (&alias_exp, i + PREFIX_ALIAS_BASE, delay);
|
||||
@ -3927,10 +3923,8 @@ mangle_defs (void)
|
||||
{
|
||||
/* First work out the minimum ordinal chosen. */
|
||||
export_type *exp;
|
||||
|
||||
int i;
|
||||
int hint = 0;
|
||||
export_type **d_export_vec = xmalloc (sizeof (export_type *) * d_nfuncs);
|
||||
int i;
|
||||
|
||||
inform (_("Processing definitions"));
|
||||
|
||||
@ -3959,11 +3953,6 @@ mangle_defs (void)
|
||||
|
||||
qsort (d_exports_lexically, i, sizeof (export_type *), nfunc);
|
||||
|
||||
/* Fill exp entries with their hint values. */
|
||||
for (i = 0; i < d_nfuncs; i++)
|
||||
if (!d_exports_lexically[i]->noname || show_allnames)
|
||||
d_exports_lexically[i]->hint = hint++;
|
||||
|
||||
inform (_("Processed definitions"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user