Skip to content

Mach-O: Add the ability to parse the chained fixups #598

@PaulDance

Description

@PaulDance

Mach-O objects can contain a data structure pointed to by the LC_DYLD_CHAINED_FIXUPS linkedit-type load command that, uh... does things. To be honest, I really don't know what its purpose truly is, but it seems to describe optional modifications to apply to import symbols upon loading.

In any case, having it supported in object would be nice as there are currently no implementation of it publicly available, at least I haven't found any. The start of it would be porting the fixup-chains.h definitions. Then, the parsing algorithm would need to be implemented as well if it is desirable to have it.

A few questions about the contribution then:

  • Does this even have its place in object?
  • What would go in macho vs. read::macho? There is a bunch of struct definitions similar to the rest of macho and also some non-trivial parsing logic.
  • Would it be desirable to add it to a higher-level API?
  • If so, should it be added directly onto MachOFile or to the Object trait and its implementation of it? Having it outside of the trait makes more sense to me because it would not be behavior common to all formats, but I'm just checking anyways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions