-
-template <>
-uint32_t HeaderAndLoadCommandsAtom<ppc>::threadLoadCommandSize() const
-{
- return this->alignedSize(16 + 40*4); // base size + PPC_THREAD_STATE_COUNT * 4
-}
-
-
-template <>
-uint8_t* HeaderAndLoadCommandsAtom<ppc>::copyThreadsLoadCommand(uint8_t* p) const
-{
- assert(_state.entryPoint != NULL);
- pint_t start = _state.entryPoint->finalAddress();
- macho_thread_command<ppc::P>* cmd = (macho_thread_command<ppc::P>*)p;
- cmd->set_cmd(LC_UNIXTHREAD);
- cmd->set_cmdsize(threadLoadCommandSize());
- cmd->set_flavor(1); // PPC_THREAD_STATE
- cmd->set_count(40); // PPC_THREAD_STATE_COUNT;
- cmd->set_thread_register(0, start);
- if ( _options.hasCustomStack() )
- cmd->set_thread_register(3, _options.customStackAddr()); // r1
- return p + threadLoadCommandSize();
-}
-
-template <>
-uint32_t HeaderAndLoadCommandsAtom<ppc64>::threadLoadCommandSize() const