Skip to content

feat(mach): expose section reserved fields on Section (fixes #380)#537

Closed
wyf027 wants to merge 1 commit into
m4b:masterfrom
wyf027:feat/mach-section-reserved-fields-380
Closed

feat(mach): expose section reserved fields on Section (fixes #380)#537
wyf027 wants to merge 1 commit into
m4b:masterfrom
wyf027:feat/mach-section-reserved-fields-380

Conversation

@wyf027

@wyf027 wyf027 commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add reserved1, reserved2, and reserved3 to the unified mach::segment::Section type.
  • Preserve these fields when converting to/from Section32 / Section64.
  • Include them in Debug output.

Fixes #380.

These fields carry meaning for some section types (e.g. indirect symbol table metadata for S_SYMBOL_STUBS) and were previously only available on the raw load-command structs.

Test plan

  • cargo test mach::segment
  • cargo test --lib

Surface reserved1-3 from Mach-O section headers on the unified
Section type so callers can read indirect symbol table metadata
without parsing load commands manually (fixes #380).

Co-authored-by: Cursor <[email protected]>
@wyf027 wyf027 closed this by deleting the head repository Jun 23, 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.

Mach-O parser does not expose reserved section fields

1 participant