[PATCH] dlltool: Fix the comparison of explicit export names in nfunc
Zhongteng Gui
dragon-archer@outlook.com
Wed Nov 25 08:22:31 GMT 2026
nfunc compares the export table names of two exports, using its_name
when an export has one. The right-hand its_name was assigned to the
left-hand name, so exports were sorted by the wrong name and given the
wrong hints when the second export had an explicit name.
binutils/
* dlltool.c (nfunc): Use the right-hand its_name for BN.
Signed-off-by: Zhongteng Gui <dragon-archer@outlook.com>
---
binutils/dlltool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 67839632a43..d8937f2344f 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -3532,7 +3532,7 @@ nfunc (const void *a, const void *b)
if (ap->its_name)
an = ap->its_name;
if (bp->its_name)
- an = bp->its_name;
+ bn = bp->its_name;
if (killat)
{
an = (an[0] == '@') ? an + 1 : an;
--
2.56.1.windows.1
More information about the Binutils
mailing list