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

Handle Mach-O dyld info deeper and relocations #67

Closed
romainthomas opened this issue Jul 30, 2017 · 1 comment
Closed

Handle Mach-O dyld info deeper and relocations #67

romainthomas opened this issue Jul 30, 2017 · 1 comment

Comments

@romainthomas
Copy link
Member

Actually LIEF's dyld info parser is very basic (only offset and size)

Dyld info contains complex structures to rebase, bind and export symbols.

LIEF should be able to handle these structures deeper as well as modelize rebase and binding as relocation

@romainthomas
Copy link
Member Author

macho_reader --dyldinfo <binary>: (Binding and Exports info)

macho_dyldinfo

macho_reader -s <binary>: (Symbols)

macho_symbols

macho_reader -r <binary>: (Relocations)

macho_reloc

romainthomas added a commit that referenced this issue Jan 17, 2022
Binding and rebase bytes codes are now parsed as well as export info
trie. Through ``RelocationDyld`` we created kind of *virtual* relocation
to modeling relocation process performed by Dyld

API Changes (Python / C++)
  * MachO::RelocationDyld   - Added
  * MachO::RelocationObject - Added
  * MachO::Relocation       - Updated according to previous ones

  * MachO::ExportInfo       - Added
  * MachO::BindingInfo      - Added

  * MachO::DyldInfo::rebase_opcodes    - Added
  * MachO::DyldInfo::bindings          - Added
  * MachO::DyldInfo::bind_opcodes      - Added
  * MachO::DyldInfo::weak_bind_opcodes - Added
  * MachO::DyldInfo::lazy_bind_opcodes - Added
  * MachO::DyldInfo::exports           - Added
  * MachO::DyldInfo::export_trie       - Added

  * MachO::Symbol
    - Tied to MachO::BindingInfo (if any)
    - Tied to MachO::ExportInfo (if any)

  * MachO::Binary::relocations - Added
  * MachO::Binary::has_symbol  - Added
  * MachO::Binary::get_symbol  - Added

Resolve: #67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant