在 2026-5-30 23:43, Pali Rohár 写道:
If there is a def file "lib1.def" with line "func1" and gendef was called on lib2.dll which contains func2 symbol defined as PE forward to lib1.func1 then gendef produces "lib2.def" file with line "func2@0 = lib1.func1" even when gendef was not called with -a option.This behavior is wrong because func1 in lib1.def is not defined as stdcall therefore gendef should not add stdcall decoration for func2. This change fixes this issue, changes the way how gendef reads and parse input def files. --- mingw-w64-tools/gendef/src/gendef.c | 5 ++++- mingw-w64-tools/gendef/src/gendef_def.c | 22 ++++++++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/mingw-w64-tools/gendef/src/gendef_def.c
b/mingw-w64-tools/gendef/src/gendef_def.c
index 3dc33b805ee4..fdecf3b3582d 100644
--- a/mingw-w64-tools/gendef/src/gendef_def.c
+++ b/mingw-w64-tools/gendef/src/gendef_def.c
@@ -99,10 +99,18 @@ gendef_getsymbol_info (const char *dllname, const char
*symbolname, int *isData,
t++;
if (t && strncmp (t, symbolname, symlen) == 0)
{
- if ((t[symlen] > 0 && t[symlen] <= 0x20) || t[symlen] == '@')
+ if ((t[symlen] >= 0 && t[symlen] <= 0x20) || t[symlen] == '@')
{
- t += symlen + 1;
- *at = get_uint32_by_str (t);
+ *at = -1;
+ t += symlen;
+ if (t[symlen] == '@')
Looks like this should be `if (*t == '@')`? -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
