mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +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:
@ -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>
|
2016-11-11 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR binutils/20751
|
PR binutils/20751
|
||||||
|
@ -780,10 +780,9 @@ typedef struct export
|
|||||||
int ordinal;
|
int ordinal;
|
||||||
int constant;
|
int constant;
|
||||||
int noname; /* Don't put name in image file. */
|
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 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;
|
struct export *next;
|
||||||
}
|
}
|
||||||
export_type;
|
export_type;
|
||||||
@ -2776,10 +2775,8 @@ make_one_lib_file (export_type *exp, int i, int delay)
|
|||||||
case IDATA6:
|
case IDATA6:
|
||||||
if (!exp->noname)
|
if (!exp->noname)
|
||||||
{
|
{
|
||||||
/* This used to add 1 to exp->hint. I don't know
|
int idx = exp->ordinal;
|
||||||
why it did that, and it does not match what I see
|
|
||||||
in programs compiled with the MS tools. */
|
|
||||||
int idx = exp->hint;
|
|
||||||
if (exp->its_name)
|
if (exp->its_name)
|
||||||
si->size = strlen (exp->its_name) + 3;
|
si->size = strlen (exp->its_name) + 3;
|
||||||
else
|
else
|
||||||
@ -3263,7 +3260,6 @@ gen_lib_file (int delay)
|
|||||||
alias_exp.noname = exp->noname;
|
alias_exp.noname = exp->noname;
|
||||||
alias_exp.private = exp->private;
|
alias_exp.private = exp->private;
|
||||||
alias_exp.data = exp->data;
|
alias_exp.data = exp->data;
|
||||||
alias_exp.hint = exp->hint;
|
|
||||||
alias_exp.forward = exp->forward;
|
alias_exp.forward = exp->forward;
|
||||||
alias_exp.next = exp->next;
|
alias_exp.next = exp->next;
|
||||||
n = make_one_lib_file (&alias_exp, i + PREFIX_ALIAS_BASE, delay);
|
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. */
|
/* First work out the minimum ordinal chosen. */
|
||||||
export_type *exp;
|
export_type *exp;
|
||||||
|
|
||||||
int i;
|
|
||||||
int hint = 0;
|
|
||||||
export_type **d_export_vec = xmalloc (sizeof (export_type *) * d_nfuncs);
|
export_type **d_export_vec = xmalloc (sizeof (export_type *) * d_nfuncs);
|
||||||
|
int i;
|
||||||
|
|
||||||
inform (_("Processing definitions"));
|
inform (_("Processing definitions"));
|
||||||
|
|
||||||
@ -3959,11 +3953,6 @@ mangle_defs (void)
|
|||||||
|
|
||||||
qsort (d_exports_lexically, i, sizeof (export_type *), nfunc);
|
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"));
|
inform (_("Processed definitions"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user