Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed May 22, 2018
1 parent 2e94976 commit b47a92c
Show file tree
Hide file tree
Showing 4 changed files with 1,426 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -11472,6 +11472,9 @@ pecoff) FORMAT_FILE="pecoff.lo"
xcoff*) FORMAT_FILE="xcoff.lo"
backtrace_supports_data=no
;;
macho*) FORMAT_FILE="macho.lo"
backtrace_supports_data=no
;;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine output file type" >&5
$as_echo "$as_me: WARNING: could not determine output file type" >&2;}
FORMAT_FILE="unknown.lo"
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ pecoff) FORMAT_FILE="pecoff.lo"
xcoff*) FORMAT_FILE="xcoff.lo"
backtrace_supports_data=no
;;
macho*) FORMAT_FILE="macho.lo"
backtrace_supports_data=no
;;
*) AC_MSG_WARN([could not determine output file type])
FORMAT_FILE="unknown.lo"
backtrace_supported=no
Expand Down
6 changes: 6 additions & 0 deletions filetype.awk
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
/\177ELF\002/ { if (NR == 1) { print "elf64"; exit } }
/\114\001/ { if (NR == 1) { print "pecoff"; exit } }
/\144\206/ { if (NR == 1) { print "pecoff"; exit } }
/\xFE\xED\xFA\xCE/ { if (NR == 1) { print "macho32"; exit } }
/\xCE\xFA\xED\xFE/ { if (NR == 1) { print "macho32"; exit } }
/\xFE\xED\xFA\xCF/ { if (NR == 1) { print "macho64"; exit } }
/\xCF\xFA\xED\xFE/ { if (NR == 1) { print "macho64"; exit } }
/\xCA\xFE\xBA\xBE/ { if (NR == 1) { print "macho-fat"; exit } }
/\xBE\xBA\xFE\xCA/ { if (NR == 1) { print "macho-fat"; exit } }
Loading

0 comments on commit b47a92c

Please sign in to comment.