Skip to content

Commit

Permalink
Update bits-info.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Oct 7, 2024
1 parent 3ec96a0 commit 589c788
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/bits-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,15 @@ detect_bitness_of_single_file()
return 0
fi

1>&2 echo "---"
local _dbf_is_mach_o _dbf_is_fat_bin _dbf_arch_count _dbf_has64 _dbf_has32

if _header="$(extract_bytes "${_dbf_first_bytes}" '0' '4')"; then
_dbf_is_mach_o='true'
_dbf_is_fat_bin='false'
_dbf_do_bytes_swap='false'

1>&2 echo "HEADER: ${_header}"
case "${_header?}" in
'feedface') # MH_MAGIC
;;
Expand All @@ -327,6 +329,7 @@ detect_bitness_of_single_file()
else
_dbf_is_fat_bin='true'
fi
1>&2 echo "FAT: ${_dbf_is_fat_bin}"
;;
'bebafeca') # FAT_CIGAM
_dbf_is_fat_bin='true'
Expand All @@ -344,6 +347,7 @@ detect_bitness_of_single_file()
;;
esac

1>&2 echo "MACH-O: ${_dbf_is_mach_o}"
if test "${_dbf_is_mach_o:?}" = 'true'; then
if
test "${_dbf_is_fat_bin:?}" = 'true' && _dbf_arch_count="$(extract_bytes "${_dbf_first_bytes}" '4' '4')" &&
Expand Down

0 comments on commit 589c788

Please sign in to comment.