https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78340
Bug ID: 78340 Summary: DLLTool Put Wrong Hint Value In Lib Archieve (Idata6 Section) Product: gcc Version: 6.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: jacky.chouchou at yandex dot ru Target Milestone: --- I just want to report that DLLTool put wrong hint value in lib archieve (IDATA6 section). In "make_one_lib_file" function, I see the hint value grab from "{struct}export->hint", instead it should grab from "{struct}export->ordinal". Don't worry about the value in "{struct}export->ordinal", "fill_ordinals" function take good care of it. And "{struct}export->hint" should be erase since no function used that value anywhere in "dlltool.c" except for "make_one_lib_file" function. The generate object file name in lib archive already take care by "gen_lib_file" function. so it should change like this in "dlltool.c" for "make_one_lib_file" function (case IDATA6): [-] Original: LINE 2781: int idx = exp->hint; [+] Patch : LINE 2781: int idx = exp->ordinal; The patch for "dlltool.c" to remove "{struct}export->hint": [-] typedef struct export: LINE 785: REMOVE THIS -> int hint; [-] "gen_lib_file" function: LINE 3265: REMOVE THIS -> alias_exp.hint = exp->hint; [-] "mangle_defs" function: LINE 3931: REMOVE THIS -> int hint = 0; [-] "mangle_defs" function: LINE 3961-3964: REMOVE ALL OF THIS -> for (i = 0; i < d_nfuncs; i++) if (!d_exports_lexically[i]->noname || show_allnames) d_exports_lexically[i]->hint = hint++; Thanks.