Skip to content

fix(loader): account for nm/ld fix on newer powerpc linux toolchains#5284

Merged
WillLillis merged 2 commits intotree-sitter:release-0.26from
WillLillis:nm_ppc64_patch
Feb 1, 2026
Merged

fix(loader): account for nm/ld fix on newer powerpc linux toolchains#5284
WillLillis merged 2 commits intotree-sitter:release-0.26from
WillLillis:nm_ppc64_patch

Conversation

@WillLillis
Copy link
Member

Manual backport of #5268

Previously a bug in linux powerpc linkers/nm caused function symbols to
be incorrectly reported in the data "D" section. Newer toolchains now
correctly report these symbols' sections as "T". Account for both to
maintain compatibility with older toolchains
Relying on a user's system's installation of `nm` has proven to be bug
prone and flaky. Instead, we can enforce that these symbols are defined
by requiring the linker to resolve them. This is already the default on
macos, but linux has looser requirements which defers the error to when
the library is opened. This check was not run on Windows (because
there's no `nm`), but the msvc linker is similiarly strict to macos's
w.r.t. resolving symbols at build time rather than runtime, so there's
no issue here.
@WillLillis WillLillis merged commit a423343 into tree-sitter:release-0.26 Feb 1, 2026
19 checks passed
@WillLillis WillLillis deleted the nm_ppc64_patch branch February 1, 2026 00:18
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