CHECKSYMS(1)

πŸ“¦ version 1010.6, in nixpkgs unstable

okay so bestie, we're in the General Commands Manual and this is CHECKSYMS(1) β€” buckle up, we're doing Mach-O convention checks ✨

🌸 NAME 🌸

checksyms β€” check a Mach-O production binary for proper conventions πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

Literally this, exactly:

checksyms [-r] [-d] [-t] [-b] [-v] [-] [-arch arch_flag] [-dylib_table
       filename] [-seg_addr_table filename] [-seg_addr_table_filename pathname]
       file [...]

πŸ’… DESCRIPTION πŸ’…

So checksyms performs checks on a Mach-O production binary to see if it follows the proper conventions. If the binary follows the conventions, or is not a binary at all, checksyms(1) exits with zero status. A non-zero exit status means the binary does not follow the conventions for a production binary, no cap 😭

The conventions include:

  • proper stripping of symbols for the file type (and whether it's using the dynamic linker)
  • if the file is a dynamic library, it checks for the preferred linked address
  • setting of compatibility and current versions
  • proper prebinding and objcunique if it uses the dynamic linker
  • proper code generation if it's a dynamic binary, so that there are no relocation entries in read-only sections

Some or all of the following options may be specified, bestie:

  • -r β€” the binary is expected to do runtime loading of bundles and is allowed to have static symbols. This helps debug bundles using the production binary so that back traces in the debugger show symbol names for static routines. This is the default for dynamic libraries but not the default for executables.
  • -d β€” print the detail of why the binary fails the checks.
  • -v β€” print a single string token for each of the checks the binary fails. This is used by the verification tools to allow exceptions to specific checks.
  • -t β€” allow all symbols except debugging symbols (those created by the compiler's -g option).
  • -b β€” check the binaries that use the dynamic linker to see that they do not have relocation entries in read-only sections, are prebound and had objcunique run on them. This is now the default.
  • - β€” all of the arguments following this flag are treated as filenames of binaries to check.
  • -arch arch_type β€” specifies the architecture, arch_type, in the file to check. More than one -arch arch_type can be specified. The default is -arch all which checks all architectures in the file. See arch(3) for the currently known arch_types.
  • -dylib_table filename β€” this option has been removed. In previous versions of checksyms it specifies the filename of the table of dynamic libraries and their addresses. If not specified the default is ~rc/Data/DylibTable. The format of the table is lines of a dynamic library name and an address in hex separated by spaces and/or tabs.
  • -seg_addr_table filename β€” this option has been removed. In previous versions of checksyms it specifies the filename of the segment address table of dynamic library install names and their addresses. The format of this table is lines of two forms. The entries in the table are lines containing either a single hex address and an install name or two hex addresses and an install name. In the first form the single hex address is used for "flat" libraries and is the -seg1addr. In the second form is used for "split" libraries and the first address is the -segs_read_only_addr address and the second address is the -segs_read_write_addr address. If the -seg_addr_table option is specified this is used instead of the table specified with the -dylib_table option. If the environment variable LD_SEG_ADDR_TABLE is set it is also used instead of the table specified with the -dylib_table option.
  • -seg_addr_table_filename pathname β€” this option has been removed. In previous versions it instructs checksyms to use pathname instead of the install name of the library for matching an entry in the segment address table.

mwah πŸ’‹ β€” Apple Computer, Inc., February 28, 2019, CHECKSYMS(1) 🫢

πŸ“¦ where this page comes from