Repository navigation
Fixed module_converter_elf32 parsing on 64 bit hosts - #840
Open
bhargavaa-g wants to merge 9 commits into
Open
bhargavaa-g wants to merge 9 commits into
bhargavaa-g wants to merge 9 commits into
Conversation
Issue-specific tags described the task rather than the code. Removed those tags while keeping the comments focused on behavior. Assisted-by: Codex (GPT-6) <noreply@openai.com>
CTest passed the unexpanded TARGET_FILE expressions to the Python test driver. Updated the test registration to use NAME and COMMAND. The focused CMake harness passed 16 tests; the optional readelf check was skipped because readelf was unavailable. Assisted-by: Codex (GPT-6) <noreply@openai.com>
Added short descriptions and release identifiers to the modified converter functions and ELF decoding helpers. git diff --check passed; no tests were rerun because these are comment-only changes. Assisted-by: Codex (GPT-6) <noreply@openai.com>
This branch has not been deployed
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.
Summary
Fixes ELF32 parsing in the ThreadX module conversion utilities on 64-bit hosts.
Problem
The module conversion utilities read ELF metadata by copying file bytes directly into C structures. Some ELF32 fields were represented with host-dependent types such as unsigned long. On LP64 systems, these types can be wider than the corresponding ELF32 fields, so the in-memory structure no longer matches the file’s layout. As a result, the converters can read fields from incorrect offsets and fail to process ELF32 input correctly.
Changes
Scope and limitations
The converters support ELF32 little-endian input. The e_machine field is decoded, but the implementation does not currently reject files based on target-machine value. The change does not modify ThreadX runtime or scheduler behavior.
VERIFICATION
scripts/test_tx.sh: [0 failed].trace_buildconfiguration.readelfcomparison: [passed].PR checklist
The converters are host-side tools, so real-hardware validation is not applicable. They were tested with a host toolchain.
Related issue
Fixes #585