fix(loader): account for nm/ld fix on newer powerpc linux toolchains#5284
Merged
WillLillis merged 2 commits intotree-sitter:release-0.26from Feb 1, 2026
Merged
fix(loader): account for nm/ld fix on newer powerpc linux toolchains#5284WillLillis merged 2 commits intotree-sitter:release-0.26from
WillLillis merged 2 commits intotree-sitter:release-0.26from
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Manual backport of #5268