Skip to content

Fix MIPS NON_MATCHING symbols when undefined symbol shadows ignored name - #425

Open
tclamb wants to merge 1 commit into
encounter:mainfrom
tclamb:main
Open

tclamb wants to merge 1 commit into
encounter:mainfrom
tclamb:main

Conversation

@tclamb

@tclamb tclamb commented Oct 19, 2026 •

Copy link
Copy Markdown

When a base object contains an undefined symbol with the same name as a .NON_MATCHING function, object.symbol_by_name could return that undefined symbol instead of the defined function. This left the placeholder unignored and erroneously reported as matched.

Generated test ELF using mwccpsp & mwccgap from the following sources:

foo.cpp:

#include "common.h"
extern "C" void foo();
extern "C" void bar(){ foo(); }
INCLUDE_ASM("foo", foo);

foo.s:

.include "macro.inc"
.set noat
.set noreorder
nonmatching foo, 0x8
glabel foo
    nop
    nop
endlabel foo

Added test fails without patch.

Verified that my repo's report.json no longer over-reports these as matches.

@tclamb tclamb changed the title Fix MIPS symbols when undefined symbol shadows name Fix ignored MIPS symbols when undefined symbol shadows name Oct 19, 2026
@tclamb tclamb changed the title Fix ignored MIPS symbols when undefined symbol shadows name Fix MIPS symbols when undefined symbol shadows ignored name Oct 19, 2026
When a base object contains an undefined symbol with the same name as a
NON_MATCHING-marked function, object.symbol_by_name could return that
undefined symbol instead of the defined function. This left the placeholder
unignored and erroneously reported as matched.
@tclamb tclamb changed the title Fix MIPS symbols when undefined symbol shadows ignored name Fix MIPS NON_MATCHING symbols when undefined symbol shadows ignored name Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant