Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macho/load_commands: support LC_ATOM_INFO #612

Merged
merged 2 commits into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/macho/load_commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module LoadCommands
(LC_REQ_DYLD | 0x33) => :LC_DYLD_EXPORTS_TRIE,
(LC_REQ_DYLD | 0x34) => :LC_DYLD_CHAINED_FIXUPS,
(LC_REQ_DYLD | 0x35) => :LC_FILESET_ENTRY,
0x36 => :LC_ATOM_INFO,
}.freeze

# association of symbol representations to load command constants
Expand Down Expand Up @@ -153,6 +154,7 @@ module LoadCommands
:LC_DYLD_EXPORTS_TRIE => "LinkeditDataCommand",
:LC_DYLD_CHAINED_FIXUPS => "LinkeditDataCommand",
:LC_FILESET_ENTRY => "FilesetEntryCommand",
:LC_ATOM_INFO => "LinkeditDataCommand",
}.freeze

# association of segment name symbols to names
Expand Down Expand Up @@ -958,7 +960,7 @@ def to_h
# the __LINKEDIT segment. Corresponds to LC_CODE_SIGNATURE,
# LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE,
# LC_DYLIB_CODE_SIGN_DRS, LC_LINKER_OPTIMIZATION_HINT, LC_DYLD_EXPORTS_TRIE,
# or LC_DYLD_CHAINED_FIXUPS.
# LC_DYLD_CHAINED_FIXUPS, or LC_ATOM_INFO.
class LinkeditDataCommand < LoadCommand
# @return [Integer] offset to the data in the __LINKEDIT segment
field :dataoff, :uint32
Expand Down