Skip to content

Instantly share code, notes, and snippets.

@al3xtjames
Last active June 5, 2018 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save al3xtjames/ac4096fa2508af7024ba410fef67b9df to your computer and use it in GitHub Desktop.
Save al3xtjames/ac4096fa2508af7024ba410fef67b9df to your computer and use it in GitHub Desktop.
--- otool/main.c.orig
+++ otool/main.c
@@ -767,14 +767,17 @@ uint32_t narch_flags,
enum bool all_archs,
enum bool version)
{
- char *objdump;
+ char objdump[MAXPATHLEN];
struct stat stat_buf;
uint32_t i;
- objdump = cmd_with_prefix("objdump");
+ strncpy(objdump, "@@CLT_BINDIR@@/objdump", MAXPATHLEN - 1);
+#ifdef LTO_SUPPORT
if(stat(objdump, &stat_buf) == -1)
- objdump = cmd_with_prefix("llvm-objdump");
+ strncpy(objdump, "@@LLVM_BINDIR@@/llvm-objdump", MAXPATHLEN - 1);
+#endif /* LTO_SUPPORT */
+ objdump[MAXPATHLEN - 1] = '\0';
reset_execute_list();
add_execute_list(objdump);
add_execute_list("-macho");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment