Skip to content

[AUTOMATED] Give the weak-relocation warnings a kind in the JSON record - #1609

Merged
mahaloz merged 1 commit into
mainfrom
fix/weak-relocation-warning-kind
Nov 16, 2026
Merged

mahaloz merged 1 commit into
mainfrom
fix/weak-relocation-warning-kind

Conversation

@mahaloz

@mahaloz mahaloz commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

A relocatable object's unmodeled weak reference prints a warning, and the function's JSON record lists it with the catch-all kind:

$ kuna decompile tests/fixtures/nullable-relocations/weak-x86-64-pic.elf guard --json | grep -o '"kind": "[^"]*", "message": "Nullable[^"]*"'
"kind": "other", "message": "Nullable weak relocation operand could not be modeled; address guards may be incomplete"

With this change the kind is weak-relocation, for both warnings the weak-relocation pass prints ("…code relocation could not be modeled" and "…relocation operand could not be modeled"). The message, line and address are unchanged, and no C output changes.

The warnings come from #1599 and the warnings list from #1601; the kind table in kuna_functionwarnings was written before the warnings existed.

Tests: a unit case for each message in kuna_functionwarnings, and nullable_relocations::unmatched_weak_operands_report_the_missing_model now checks the JSON kind. docs/cli.md lists the new kind.

🤖 Generated with Claude Code

https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h

The two warnings a relocatable object's unmodeled weak reference prints
("Nullable weak code relocation could not be modeled", "Nullable weak
relocation operand could not be modeled") reached a function's JSON
`warnings` list as kind `other`. They are now `weak-relocation`.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
@mahaloz
mahaloz merged commit 121464c into main Nov 16, 2026
8 checks passed
@mahaloz
mahaloz deleted the fix/weak-relocation-warning-kind branch November 16, 2026 22:11
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