Index: kernel/arch/mips32/src/asm.S
===================================================================
--- kernel/arch/mips32/src/asm.S	(revision 193d280c34f38846eccfa1ecce71975f9ad92398)
+++ kernel/arch/mips32/src/asm.S	(revision 0407636ceda67e68eb4456da50da5790c6a50911)
@@ -27,4 +27,5 @@
  */
 
+#include <abi/asmtool.h>
 #include <arch/asm/regname.h>
 #include <arch/fpu_context_struct.h>
@@ -48,20 +49,16 @@
 .set nomacro
 
-.global asm_delay_loop
-asm_delay_loop:
+FUNCTION_BEGIN(asm_delay_loop)
 	j $31
 	nop
-
-.global cpu_halt
-cpu_halt:
+FUNCTION_END(asm_delay_loop)
+
+FUNCTION_BEGIN(cpu_halt)
 	j cpu_halt
 	nop
-
-.global memcpy_from_uspace
-.global memcpy_to_uspace
-.global memcpy_from_uspace_failover_address
-.global memcpy_to_uspace_failover_address
-memcpy_from_uspace:
-memcpy_to_uspace:
+FUNCTION_END(cpu_halt)
+
+FUNCTION_BEGIN(memcpy_from_uspace)
+FUNCTION_BEGIN(memcpy_to_uspace)
 	move $t2, $a0  /* save dst */
 	
@@ -129,7 +126,9 @@
 		jr $ra
 		move $v0, $t2
-
-memcpy_from_uspace_failover_address:
-memcpy_to_uspace_failover_address:
+FUNCTION_END(memcpy_from_uspace)
+FUNCTION_END(memcpy_to_uspace)
+
+SYMBOL(memcpy_from_uspace_failover_address)
+SYMBOL(memcpy_to_uspace_failover_address)
 	jr $ra
 	move $v0, $zero
@@ -155,6 +154,5 @@
 .endm
 
-.global fpu_context_save
-fpu_context_save:
+FUNCTION_BEGIN(fpu_context_save)
 #ifdef CONFIG_FPU
 	fpu_gp_save 0, $a0
@@ -225,7 +223,7 @@
 	j $ra
 	nop
-
-.global fpu_context_restore
-fpu_context_restore:
+FUNCTION_END(fpu_context_save)
+
+FUNCTION_BEGIN(fpu_context_restore)
 #ifdef CONFIG_FPU
 	fpu_gp_restore 0, $a0
@@ -296,7 +294,8 @@
 	j $ra
 	nop
-
-.global early_putchar
-early_putchar:
+FUNCTION_END(fpu_context_restore)
+
+FUNCTION_BEGIN(early_putchar)
 	j $ra
 	nop
+FUNCTION_END(early_putchar)
Index: kernel/arch/mips32/src/context.S
===================================================================
--- kernel/arch/mips32/src/context.S	(revision 193d280c34f38846eccfa1ecce71975f9ad92398)
+++ kernel/arch/mips32/src/context.S	(revision 0407636ceda67e68eb4456da50da5790c6a50911)
@@ -27,4 +27,5 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/context_struct.h>
 
@@ -35,8 +36,5 @@
 .set nomacro
 
-.global context_save_arch
-.global context_restore_arch
-
-context_save_arch:
+FUNCTION_BEGIN(context_save_arch)
 	sw $s0, CONTEXT_OFFSET_S0($a0)
 	sw $s1, CONTEXT_OFFSET_S1($a0)
@@ -56,6 +54,7 @@
 	j $31
 	li $2, 1
+FUNCTION_END(context_save_arch)
 
-context_restore_arch:
+FUNCTION_BEGIN(context_restore_arch)
 	lw $s0, CONTEXT_OFFSET_S0($a0)
 	lw $s1, CONTEXT_OFFSET_S1($a0)
@@ -75,2 +74,3 @@
 	j $31
 	xor $2, $2
+FUNCTION_END(context_restore_arch)
Index: kernel/arch/mips32/src/debug/stacktrace_asm.S
===================================================================
--- kernel/arch/mips32/src/debug/stacktrace_asm.S	(revision 193d280c34f38846eccfa1ecce71975f9ad92398)
+++ kernel/arch/mips32/src/debug/stacktrace_asm.S	(revision 0407636ceda67e68eb4456da50da5790c6a50911)
@@ -27,4 +27,6 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
@@ -32,12 +34,11 @@
 .set noreorder
 
-.global frame_pointer_get
-.global program_counter_get
-
-frame_pointer_get:
+FUNCTION_BEGIN(frame_pointer_get)
 	j $ra
 	move $v0, $sp
+FUNCTION_END(frame_pointer_get)
 
-program_counter_get:
+FUNCTION_BEGIN(program_counter_get)
 	j $ra
 	move $v0, $ra
+FUNCTION_END(program_counter_get)
Index: kernel/arch/mips32/src/start.S
===================================================================
--- kernel/arch/mips32/src/start.S	(revision 193d280c34f38846eccfa1ecce71975f9ad92398)
+++ kernel/arch/mips32/src/start.S	(revision 0407636ceda67e68eb4456da50da5790c6a50911)
@@ -27,4 +27,5 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/asm/regname.h>
 #include <arch/mm/page.h>
@@ -38,10 +39,4 @@
 .set noreorder
 .set nomacro
-
-.global kernel_image_start
-.global tlb_refill_entry
-.global cache_error_entry
-.global exception_entry
-.global userspace_asm
 
 /*
@@ -192,5 +187,5 @@
 
 .org 0x0
-kernel_image_start:
+SYMBOL(kernel_image_start)
 	/* load temporary stack */
 	lui $sp, %hi(end_stack)
@@ -210,13 +205,13 @@
 end_stack:
 
-tlb_refill_entry:
+SYMBOL(tlb_refill_entry)
 	j tlb_refill_handler
 	nop
 
-cache_error_entry:
+SYMBOL(cache_error_entry)
 	j cache_error_handler
 	nop
 
-exception_entry:
+SYMBOL(exception_entry)
 	j exception_handler
 	nop
@@ -345,5 +340,5 @@
 	eret
 
-userspace_asm:
+FUNCTION_BEGIN(userspace_asm)
 	move $sp, $a0
 	move $v0, $a1
@@ -352,2 +347,3 @@
 	                   /* set it to 0 */
 	eret
+FUNCTION_END(userspace_asm)
