Index: arch/ia32/Makefile.inc.cross
===================================================================
--- arch/ia32/Makefile.inc.cross	(revision 52604787ea75c84cfd3dae97dc009b2f0b6c3d8e)
+++ arch/ia32/Makefile.inc.cross	(revision dd80fc6d8c31926f48fc9739b91f2003f67e2f35)
@@ -7,4 +7,8 @@
 AS=$(IA-32_BINUTILS_DIR)/$(IA-32_TARGET)-as
 LD=$(IA-32_BINUTILS_DIR)/$(IA-32_TARGET)-ld
+OBJCOPY=$(IA-32_BINUTILS_DIR)/$(IA-32_TARGET)-objcopy
+
+BFD_NAME=elf32-i386
+BFD_ARCH=i386
 
 DEFS:=-DARCH=$(ARCH)
Index: arch/ia32/include/pm.h
===================================================================
--- arch/ia32/include/pm.h	(revision 52604787ea75c84cfd3dae97dc009b2f0b6c3d8e)
+++ arch/ia32/include/pm.h	(revision dd80fc6d8c31926f48fc9739b91f2003f67e2f35)
@@ -130,6 +130,6 @@
 
 extern struct ptr_16_32 gdtr;
-extern struct ptr_16_32 bsp_bootstrap_gdtr;
-extern struct ptr_16_32 ap_bootstrap_gdtr;
+extern struct ptr_16_32 real_bootstrap_gdtr;
+extern struct ptr_16_32 protected_bootstrap_gdtr;
 extern struct tss *tss_p;
 
Index: arch/ia32/src/boot/boot.S
===================================================================
--- arch/ia32/src/boot/boot.S	(revision 52604787ea75c84cfd3dae97dc009b2f0b6c3d8e)
+++ arch/ia32/src/boot/boot.S	(revision dd80fc6d8c31926f48fc9739b91f2003f67e2f35)
@@ -53,5 +53,5 @@
 	call memmap_arch_init
 	
-	lgdt bsp_bootstrap_gdtr					# initialize Global Descriptor Table register
+	lgdt real_bootstrap_gdtr				# initialize Global Descriptor Table register
 	
 	movl %cr0, %eax
@@ -94,10 +94,13 @@
 	rep movsb
 	
-	jmp protected
+	call main_bsp			# never returns
+
+	cli
+	hlt
 	
 multiboot_image_start:
-	movl BOOTSTRAP_OFFSET - 0x400, %esp		# initialize stack pointer
+	movl $BOOTSTRAP_OFFSET - 0x400, %esp			# initialize stack pointer
 	
-	lgdt gdtr								# initialize Global Descriptor Table register
+	lgdt protected_bootstrap_gdtr - 0x80000000		# initialize Global Descriptor Table register
 
 	movw $KDATA, %ax
@@ -105,14 +108,13 @@
 	movw %ax, %gs
 	movw %ax, %fs
-	movw %ax, %ds							# kernel data + stack
+	movw %ax, %ds									# kernel data + stack
 	movw %ax, %ss
 	
-	jmpl $KTEXT, $multiboot_meeting_point
+	jmpl $KTEXT, $multiboot_meeting_point + BOOT_OFFSET
 	multiboot_meeting_point:
 	
-	call map_kernel							# map kernel and turn paging on
+	call map_kernel									# map kernel and turn paging on
 	
-protected:
-	call main_bsp		# never returns
+	call main_bsp - BOOT_OFFSET						# never returns
 
 	cli
Index: arch/ia32/src/pm.c
===================================================================
--- arch/ia32/src/pm.c	(revision 52604787ea75c84cfd3dae97dc009b2f0b6c3d8e)
+++ arch/ia32/src/pm.c	(revision dd80fc6d8c31926f48fc9739b91f2003f67e2f35)
@@ -71,6 +71,6 @@
 
 /* gdtr is changed by kmp before next CPU is initialized */
-struct ptr_16_32 bsp_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) };
-struct ptr_16_32 ap_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };
+struct ptr_16_32 real_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) };
+struct ptr_16_32 protected_bootstrap_gdtr = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };
 struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = (__address) gdt };
 
Index: arch/ia32/src/smp/ap.S
===================================================================
--- arch/ia32/src/smp/ap.S	(revision 52604787ea75c84cfd3dae97dc009b2f0b6c3d8e)
+++ arch/ia32/src/smp/ap.S	(revision dd80fc6d8c31926f48fc9739b91f2003f67e2f35)
@@ -51,9 +51,9 @@
 	movw %ax, %ds
 
-	lgdt ap_bootstrap_gdtr	# initialize Global Descriptor Table register
+	lgdt real_bootstrap_gdtr	# initialize Global Descriptor Table register
 	
 	movl %cr0, %eax
 	orl $1, %eax
-	movl %eax, %cr0			# switch to protected mode
+	movl %eax, %cr0				# switch to protected mode
 	jmpl $KTEXT, $jump_to_kernel
 	
Index: arch/ia32/src/smp/smp.c
===================================================================
--- arch/ia32/src/smp/smp.c	(revision 52604787ea75c84cfd3dae97dc009b2f0b6c3d8e)
+++ arch/ia32/src/smp/smp.c	(revision dd80fc6d8c31926f48fc9739b91f2003f67e2f35)
@@ -145,5 +145,5 @@
 		memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor));
 		memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
-		ap_bootstrap_gdtr.base = KA2PA((__address) gdt_new);
+		real_bootstrap_gdtr.base = KA2PA((__address) gdt_new);
 		gdtr.base = (__address) gdt_new;
 
