Berildocs GitHub

Memory cards

Mach-O and dyld define what loads before main

confidence: mediumupdated: 2026-11-25status: activebinarymacosmacho

Claim#

Load commands, LC_LOAD_DYLIB, rpaths and entitlements decide which code runs and what it may do.

Test#

List load commands, libraries and rpaths. Check the signature and entitlements. Try a dylib hijack in a lab.

Proof#

A loaded library or entitlement that changes behavior.

Failure modes#

Hardened runtime and library validation block some hijacks. A signed app is not automatically safe.