diff options
author | Jude Taylor <me@jude.bio> | 2016-08-16 12:52:49 -0700 |
---|---|---|
committer | Jude Taylor <me@jude.bio> | 2016-08-16 12:52:49 -0700 |
commit | cfb77d6e5ba03f40743ba17eef20266909ac5640 (patch) | |
tree | e362f2ccd90f53519dc60466808cc2933bf33160 /src/resolve-system-dependencies | |
parent | 90516c5a7be5457813313d89ecf8ae9d3c0d1708 (diff) |
account for unknown magic numbers
Diffstat (limited to 'src/resolve-system-dependencies')
-rw-r--r-- | src/resolve-system-dependencies/resolve-system-dependencies.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc index 216be1210..7aad8e1c5 100644 --- a/src/resolve-system-dependencies/resolve-system-dependencies.cc +++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc @@ -68,6 +68,9 @@ std::set<std::string> runResolver(const Path & filename) { } } else if (magic == MH_MAGIC_64 || magic == MH_CIGAM_64) { mach64_offset = 0; + } else { + printMsg(lvlError, format("Object file has unknown magic number ‘%1%’, skipping it...") % magic); + return std::set<string>(); } struct mach_header_64 *m_header = (struct mach_header_64 *)((ptrdiff_t)obj + mach64_offset); |