Index: kernel/arch/ppc32/src/asm.S
===================================================================
--- kernel/arch/ppc32/src/asm.S	(revision 8c7d5adf6864144540bbcdd88ca84f925dab4e02)
+++ kernel/arch/ppc32/src/asm.S	(revision 1a5eca452dd19104f8673b755943e0707abc00e4)
@@ -27,4 +27,5 @@
  */
 
+#include <abi/asmtool.h>
 #include <arch/asm/regname.h>
 #include <arch/msr.h>
@@ -33,15 +34,5 @@
 .text
 
-.global userspace_asm
-.global iret
-.global iret_syscall
-.global memcpy_from_uspace
-.global memcpy_to_uspace
-.global memcpy_from_uspace_failover_address
-.global memcpy_to_uspace_failover_address
-.global early_putchar
-
-userspace_asm:
-	
+FUNCTION_BEGIN(userspace_asm)
 	/*
 	 * r3 = uspace_uarg
@@ -78,7 +69,7 @@
 	
 	rfi
-
-iret:
-	
+FUNCTION_END(userspace_asm)
+
+SYMBOL(iret)
 	/* Disable interrupts */
 	
@@ -142,6 +133,5 @@
 	rfi
 
-iret_syscall:
-	
+SYMBOL(iret_syscall)
 	/* Disable interrupts */
 	
@@ -204,7 +194,6 @@
 	rfi
 
-memcpy_from_uspace:
-memcpy_to_uspace:
-	
+FUNCTION_BEGIN(memcpy_from_uspace)
+FUNCTION_BEGIN(memcpy_to_uspace)
 	srwi. r7, r5, 3
 	addi r6, r3, -4
@@ -267,11 +256,14 @@
 		mtctr r7
 		b 1b
-
-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)
 	/* Return zero, failure */
 	xor r3, r3, r3
 	blr
 
-early_putchar:
+FUNCTION_BEGIN(early_putchar)
 	blr
+FUNCTION_END(early_putchar)
Index: kernel/arch/ppc32/src/boot/boot.S
===================================================================
--- kernel/arch/ppc32/src/boot/boot.S	(revision 8c7d5adf6864144540bbcdd88ca84f925dab4e02)
+++ kernel/arch/ppc32/src/boot/boot.S	(revision 1a5eca452dd19104f8673b755943e0707abc00e4)
@@ -27,4 +27,5 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/asm/regname.h>
 #include <config.h>
@@ -32,7 +33,5 @@
 .section K_TEXT_START, "ax"
 
-.global kernel_image_start
-kernel_image_start:
-	
+SYMBOL(kernel_image_start)
 	# load temporal kernel stack
 	
Index: kernel/arch/ppc32/src/context.S
===================================================================
--- kernel/arch/ppc32/src/context.S	(revision 8c7d5adf6864144540bbcdd88ca84f925dab4e02)
+++ kernel/arch/ppc32/src/context.S	(revision 1a5eca452dd19104f8673b755943e0707abc00e4)
@@ -27,4 +27,5 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/context_struct.h>
 #include <arch/asm/regname.h>
@@ -32,8 +33,5 @@
 .text
 
-.global context_save_arch
-.global context_restore_arch
-
-context_save_arch:
+FUNCTION_BEGIN(context_save_arch)
 	stw sp, CONTEXT_OFFSET_SP(r3)
 	stw r2, CONTEXT_OFFSET_R2(r3)
@@ -67,6 +65,7 @@
 	li r3, 1
 	blr
+FUNCTION_END(context_save_arch)
 
-context_restore_arch:
+FUNCTION_BEGIN(context_restore_arch)
 	lwz sp, CONTEXT_OFFSET_SP(r3)
 	lwz r2, CONTEXT_OFFSET_R2(r3)
@@ -100,2 +99,3 @@
 	li r3, 0
 	blr
+FUNCTION_END(context_restore_arch)
Index: kernel/arch/ppc32/src/debug/stacktrace_asm.S
===================================================================
--- kernel/arch/ppc32/src/debug/stacktrace_asm.S	(revision 8c7d5adf6864144540bbcdd88ca84f925dab4e02)
+++ kernel/arch/ppc32/src/debug/stacktrace_asm.S	(revision 1a5eca452dd19104f8673b755943e0707abc00e4)
@@ -27,16 +27,16 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/asm/regname.h>
 
 .text
 
-.global frame_pointer_get
-.global program_counter_get
-
-frame_pointer_get:
+FUNCTION_BEGIN(frame_pointer_get)
 	mr r3, sp
 	blr
+FUNCTION_END(frame_pointer_get)
 
-program_counter_get:
+FUNCTION_BEGIN(program_counter_get)
 	mflr r3
 	blr
+FUNCTION_END(program_counter_get)
Index: kernel/arch/ppc32/src/dummy.S
===================================================================
--- kernel/arch/ppc32/src/dummy.S	(revision 1a5eca452dd19104f8673b755943e0707abc00e4)
+++ kernel/arch/ppc32/src/dummy.S	(revision 1a5eca452dd19104f8673b755943e0707abc00e4)
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2005 Jakub Jermar
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#include <abi/asmtool.h>
+
+.text
+
+FUNCTION_BEGIN(sys_tls_set)
+	b sys_tls_set
+FUNCTION_END(sys_tls_set)
+
+FUNCTION_BEGIN(asm_delay_loop)
+	blr
+FUNCTION_END(asm_delay_loop)
+
+FUNCTION_BEGIN(cpu_halt)
+	b cpu_halt
+FUNCTION_END(cpu_halt)
Index: kernel/arch/ppc32/src/dummy.s
===================================================================
--- kernel/arch/ppc32/src/dummy.s	(revision 8c7d5adf6864144540bbcdd88ca84f925dab4e02)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#
-# Copyright (c) 2005 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-.text
-
-.global asm_delay_loop
-.global sys_tls_set
-.global cpu_halt
-
-sys_tls_set:
-	b sys_tls_set
-
-asm_delay_loop:
-	blr
-
-cpu_halt:
-	b cpu_halt
Index: kernel/arch/ppc32/src/exception.S
===================================================================
--- kernel/arch/ppc32/src/exception.S	(revision 8c7d5adf6864144540bbcdd88ca84f925dab4e02)
+++ kernel/arch/ppc32/src/exception.S	(revision 1a5eca452dd19104f8673b755943e0707abc00e4)
@@ -27,4 +27,5 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/asm/regname.h>
 #include <arch/msr.h>
@@ -126,6 +127,5 @@
 
 .org 0x100
-.global exc_system_reset
-exc_system_reset:
+SYMBOL(exc_system_reset)
 	CONTEXT_STORE
 	
@@ -134,6 +134,5 @@
 
 .org 0x200
-.global exc_machine_check
-exc_machine_check:
+SYMBOL(exc_machine_check)
 	CONTEXT_STORE
 	
@@ -142,6 +141,5 @@
 
 .org 0x300
-.global exc_data_storage
-exc_data_storage:
+SYMBOL(exc_data_storage)
 	CONTEXT_STORE
 	
@@ -150,6 +148,5 @@
 
 .org 0x400
-.global exc_instruction_storage
-exc_instruction_storage:
+SYMBOL(exc_instruction_storage)
 	CONTEXT_STORE
 	
@@ -158,6 +155,5 @@
 
 .org 0x500
-.global exc_external
-exc_external:
+SYMBOL(exc_external)
 	CONTEXT_STORE
 	
@@ -166,6 +162,5 @@
 
 .org 0x600
-.global exc_alignment
-exc_alignment:
+SYMBOL(exc_alignment)
 	CONTEXT_STORE
 	
@@ -174,6 +169,5 @@
 
 .org 0x700
-.global exc_program
-exc_program:
+SYMBOL(exc_program)
 	CONTEXT_STORE
 	
@@ -182,6 +176,5 @@
 
 .org 0x800
-.global exc_fp_unavailable
-exc_fp_unavailable:
+SYMBOL(exc_fp_unavailable)
 	CONTEXT_STORE
 	
@@ -190,6 +183,5 @@
 
 .org 0x900
-.global exc_decrementer
-exc_decrementer:
+SYMBOL(exc_decrementer)
 	CONTEXT_STORE
 	
@@ -198,6 +190,5 @@
 
 .org 0xa00
-.global exc_reserved0
-exc_reserved0:
+SYMBOL(exc_reserved0)
 	CONTEXT_STORE
 	
@@ -206,6 +197,5 @@
 
 .org 0xb00
-.global exc_reserved1
-exc_reserved1:
+SYMBOL(exc_reserved1)
 	CONTEXT_STORE
 	
@@ -214,6 +204,5 @@
 
 .org 0xc00
-.global exc_syscall
-exc_syscall:
+SYMBOL(exc_syscall)
 	CONTEXT_STORE
 	
@@ -221,6 +210,5 @@
 
 .org 0xd00
-.global exc_trace
-exc_trace:
+SYMBOL(exc_trace)
 	CONTEXT_STORE
 	
@@ -229,6 +217,5 @@
 
 .org 0x1000
-.global exc_itlb_miss
-exc_itlb_miss:
+SYMBOL(exc_itlb_miss)
 	CONTEXT_STORE
 	
@@ -237,6 +224,5 @@
 
 .org 0x1100
-.global exc_dtlb_miss_load
-exc_dtlb_miss_load:
+SYMBOL(exc_dtlb_miss_load)
 	CONTEXT_STORE
 	
@@ -245,6 +231,5 @@
 
 .org 0x1200
-.global exc_dtlb_miss_store
-exc_dtlb_miss_store:
+SYMBOL(exc_dtlb_miss_store)
 	CONTEXT_STORE
 	
Index: kernel/arch/ppc32/src/fpu_context.S
===================================================================
--- kernel/arch/ppc32/src/fpu_context.S	(revision 8c7d5adf6864144540bbcdd88ca84f925dab4e02)
+++ kernel/arch/ppc32/src/fpu_context.S	(revision 1a5eca452dd19104f8673b755943e0707abc00e4)
@@ -27,4 +27,5 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/asm/regname.h>
 #include <arch/fpu_context_struct.h>
@@ -32,10 +33,4 @@
 
 .text
-
-.global fpu_context_save
-.global fpu_context_restore
-.global fpu_init
-.global fpu_enable
-.global fpu_disable
 
 .macro FPU_CONTEXT_STORE r
@@ -109,5 +104,5 @@
 .endm
 
-fpu_context_save:
+FUNCTION_BEGIN(fpu_context_save)
 	FPU_CONTEXT_STORE r3
 	
@@ -116,6 +111,7 @@
 	
 	blr
+FUNCTION_END(fpu_context_save)
 
-fpu_context_restore:
+FUNCTION_BEGIN(fpu_context_restore)
 	lfd fr0, FPU_CONTEXT_OFFSET_FPSCR(r3)
 	mtfsf 0xff, fr0
@@ -124,6 +120,7 @@
 	
 	blr
+FUNCTION_END(fpu_context_restore)
 
-fpu_init:
+FUNCTION_BEGIN(fpu_init)
 	mfmsr r0
 	ori r0, r0, MSR_FP
@@ -137,6 +134,7 @@
 	
 	blr
+FUNCTION_END(fpu_init)
 
-fpu_enable:
+FUNCTION_BEGIN(fpu_enable)
 	mfmsr r0
 	ori r0, r0, MSR_FP
@@ -144,6 +142,7 @@
 	isync
 	blr
+FUNCTION_END(fpu_enable)
 
-fpu_disable:
+FUNCTION_BEGIN(fpu_disable)
 	mfmsr r0
 	li r3, MSR_FP
@@ -152,2 +151,3 @@
 	isync
 	blr
+FUNCTION_END(fpu_disable)
