What is required for a Mach-O executable to load?

前端 未结 2 1986
误落风尘
误落风尘 2020-12-30 08:18

I am attempting to hand-write a Mach-O executable. There are three load commands:

  • LC_SEGMENT_64 loading __PAGEZERO
  • LC_
2条回答
  •  佛祖请我去吃肉
    2020-12-30 08:30

    Not 100% sure but you will need LC_LOAD_DYLINKER load command to run dyld before your executable, I am pretty certain OSX does not automatically maps to /usr/lib/dyld if that load command is not available.

    Do you need /usr/lib/libSystem.B.dylib with LC_LOAD_DYLIB load command? I don't think so but that's a good to have either and does not cost much.

提交回复
热议问题