Skip to content

Commit

Permalink
Add MH_DYLDLINK before attempting codesign_allocate.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed Apr 21, 2009
1 parent 6e83315 commit 82813bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ldid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ struct mach_header {
#define MH_MAGIC 0xfeedface
#define MH_CIGAM 0xcefaedfe

#define MH_DYLDLINK 0x4

#define MH_EXECUTE 0x2
#define MH_DYLIB 0x6
#define MH_BUNDLE 0x8
Expand Down Expand Up @@ -536,6 +538,8 @@ int main(int argc, const char *argv[]) {
size_t size = _not(size_t);
const char *arch; {
Framework framework(path);
framework->flags |= MH_DYLDLINK;

_foreach (load_command, framework.GetLoadCommands()) {
uint32_t cmd(framework.Swap((*load_command)->cmd));
if (cmd == LC_CODE_SIGNATURE) {
Expand Down

0 comments on commit 82813bd

Please sign in to comment.