<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- src/ld/HeaderAndLoadCommands.hpp
+++ src/ld/HeaderAndLoadCommands.hpp
@@ -1106,7 +1106,7 @@ uint8_t* HeaderAndLoadCommandsAtom&lt;x86&gt;::copyThreadsLoadCommand(uint8_t* p) cons
 template &lt;&gt;
 uint32_t HeaderAndLoadCommandsAtom&lt;x86_64&gt;::threadLoadCommandSize() const
 {
-	return this-&gt;alignedSize(16 + x86_THREAD_STATE64_COUNT * 4); 
+	return this-&gt;alignedSize(16 + 42*4);	// base size + x86_THREAD_STATE64_COUNT * 4
 }
 
 template &lt;&gt;
@@ -1117,8 +1117,8 @@ uint8_t* HeaderAndLoadCommandsAtom&lt;x86_64&gt;::copyThreadsLoadCommand(uint8_t* p) c
 	macho_thread_command&lt;P&gt;* cmd = (macho_thread_command&lt;P&gt;*)p;
 	cmd-&gt;set_cmd(LC_UNIXTHREAD);
 	cmd-&gt;set_cmdsize(threadLoadCommandSize());
-	cmd-&gt;set_flavor(x86_THREAD_STATE64);			
-	cmd-&gt;set_count(x86_THREAD_STATE64_COUNT);	
+	cmd-&gt;set_flavor(4);				// x86_THREAD_STATE64
+	cmd-&gt;set_count(42);				// x86_THREAD_STATE64_COUNT
 	cmd-&gt;set_thread_register(16, start);		// rip 
 	if ( _options.hasCustomStack() )
 		cmd-&gt;set_thread_register(7, _options.customStackAddr());	// r1
</pre></body></html>