binutils Newspaper
NOVEMBER 30, 2026
dlltool — Proposed

dlltool: Fix the comparison of explicit export names in nfunc

Fixes incorrect sorting and hinting of exports in dlltool by ensuring the correct name is used for comparison.

This patch addresses an issue in dlltool’s nfunc where explicit export names were not being compared correctly, leading to incorrect sorting and hinting. The proposer confirmed the fix and intends to test it thoroughly before pushing.

In the Thread 3 participants
  1. Zhongteng Gui proposer

    Submitted a patch to fix an issue where exports were sorted by the wrong name and given wrong hints due to incorrect comparison of explicit export names in dlltool's nfunc.

    “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.”
  2. Jan Beulich reviewer

    Acknowledged the patch and stated intent to perform a full testing cycle before pushing it.

    “Thanks, but I don't have write access, could you push for me?”
  3. Jan Beulich proposer

    Confirmed that the patch is ready for further testing and will be pushed after a full testing cycle.

In Details

The nfunc function within dlltool is responsible for processing export entries. This patch corrects a bug where the its_name field, used for explicit export names, was not being utilized correctly during comparisons, leading to misordering and incorrect associated metadata for exports.

Filed Under: dlltoolpatchbugfix