Skip to contentSkip to conversation

Add nop block to workaround a bug in Apple's AS

PATCH In review Vladimir 'phcoder' Serbinenko 1 participant 1 message May 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 18/18 Add nop block to workaround a bug in Apple's AS

Signature · 2 lines
Regards
Vladimir 'phcoder' Serbinenko
kern/i386/pc/startup.S +10 -0
index 6cdc79a..0a2a174 100644
@@ -1120,6 +1120,16 @@ FUNCTION(grub_get_mmap_entry)
 xnosmap:
 	xorl	%ecx, %ecx
 
+/* Apple's cc jumps few bytes before the correct label in this context. Hence nops */
+#ifdef APPLE_CC
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+#endif
+
 xsmap:
 	DATA32	call	real_to_prot
 	.code32