Index: uspace/lib/c/arch/ppc32/src/entry.S
===================================================================
--- uspace/lib/c/arch/ppc32/src/entry.S	(revision 9182e86f8fac41203c8da4e3158cbf2b160dc738)
+++ uspace/lib/c/arch/ppc32/src/entry.S	(revision 9182e86f8fac41203c8da4e3158cbf2b160dc738)
@@ -0,0 +1,50 @@
+#
+# Copyright (c) 2006 Martin Decky
+# 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>
+
+.section .init, "ax"
+
+.org 0
+
+## User-space task entry point
+#
+# r6 contains the PCB pointer
+#
+SYMBOL(__entry)
+	#
+	# Create the first stack frame.
+	#
+	li %r3, 0
+	stw %r3, 0(%r1)
+	stwu %r1, -16(%r1)
+	
+	# Pass the PCB pointer to __main() as the first argument.
+	# The first argument is passed in r3.
+	mr %r3, %r6
+	bl __main
Index: uspace/lib/c/arch/ppc32/src/entry.s
===================================================================
--- uspace/lib/c/arch/ppc32/src/entry.s	(revision fe124d6347cc9a0f69d7f0f159b0793d0472406c)
+++ 	(revision )
@@ -1,50 +1,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# 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.
-#
-
-.section .init, "ax"
-
-.org 0
-
-.globl __entry
-
-## User-space task entry point
-#
-# r6 contains the PCB pointer
-#
-__entry:
-	#
-	# Create the first stack frame.
-	#
-	li %r3, 0
-	stw %r3, 0(%r1)
-	stwu %r1, -16(%r1)
-	
-	# Pass the PCB pointer to __main() as the first argument.
-	# The first argument is passed in r3.
-	mr %r3, %r6
-	bl __main
Index: uspace/lib/c/arch/ppc32/src/entryjmp.S
===================================================================
--- uspace/lib/c/arch/ppc32/src/entryjmp.S	(revision 9182e86f8fac41203c8da4e3158cbf2b160dc738)
+++ uspace/lib/c/arch/ppc32/src/entryjmp.S	(revision 9182e86f8fac41203c8da4e3158cbf2b160dc738)
@@ -0,0 +1,41 @@
+#
+# Copyright (c) 2008 Jiri Svoboda
+# 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>
+
+## void entry_point_jmp(void *entry_point, void *pcb);
+#
+# %r3	contains entry_point
+# %r4	contains pcb
+#
+# Jump to program entry point
+FUNCTION_BEGIN(entry_point_jmp)
+	mtctr %r3
+	mr %r6, %r4	# Pass pcb to the entry point in %r6
+	bctr
+FUNCTION_END(entry_point_jmp)
Index: uspace/lib/c/arch/ppc32/src/entryjmp.s
===================================================================
--- uspace/lib/c/arch/ppc32/src/entryjmp.s	(revision fe124d6347cc9a0f69d7f0f159b0793d0472406c)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#
-# Copyright (c) 2008 Jiri Svoboda
-# 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.
-#
-
-.globl entry_point_jmp
-
-## void entry_point_jmp(void *entry_point, void *pcb);
-#
-# %r3	contains entry_point
-# %r4	contains pcb
-#
-# Jump to program entry point
-entry_point_jmp:
-	mtctr %r3
-	mr %r6, %r4	# Pass pcb to the entry point in %r6
-	bctr
Index: uspace/lib/c/arch/ppc32/src/fibril.S
===================================================================
--- uspace/lib/c/arch/ppc32/src/fibril.S	(revision fe124d6347cc9a0f69d7f0f159b0793d0472406c)
+++ uspace/lib/c/arch/ppc32/src/fibril.S	(revision 9182e86f8fac41203c8da4e3158cbf2b160dc738)
@@ -29,11 +29,9 @@
 .text
 
-.global context_save
-.global context_restore
-
+#include <abi/asmtool.h>
 #include <libarch/regname.h>
 #include <libarch/fibril_context.h>
 
-context_save:
+FUNCTION_BEGIN(context_save)
 	stw sp, CONTEXT_OFFSET_SP(r3)
 	stw r2, CONTEXT_OFFSET_TLS(r3)
@@ -67,7 +65,7 @@
 	li r3, 1
 	blr
+FUNCTION_END(context_save)
 
-
-context_restore:
+FUNCTION_BEGIN(context_restore)
 	lwz sp, CONTEXT_OFFSET_SP(r3)
 	lwz r2, CONTEXT_OFFSET_TLS(r3)
@@ -101,2 +99,3 @@
 	li r3, 0
 	blr
+FUNCTION_END(context_restore)
Index: uspace/lib/c/arch/ppc32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/ppc32/src/stacktrace_asm.S	(revision fe124d6347cc9a0f69d7f0f159b0793d0472406c)
+++ uspace/lib/c/arch/ppc32/src/stacktrace_asm.S	(revision 9182e86f8fac41203c8da4e3158cbf2b160dc738)
@@ -29,18 +29,18 @@
 .text
 
+#include <abi/asmtool.h>
 #include <libarch/regname.h>
 
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
+FUNCTION_BEGIN(stacktrace_prepare)
+	blr
+FUNCTION_END(stacktrace_prepare)
 
-stacktrace_prepare:
-	blr
-
-stacktrace_fp_get:
+FUNCTION_BEGIN(stacktrace_fp_get)
 	mr r3, sp
 	blr
+FUNCTION_END(stacktrace_fp_get)
 
-stacktrace_pc_get:
+FUNCTION_BEGIN(stacktrace_pc_get)
 	mflr r3
 	blr
+FUNCTION_END(stacktrace_pc_get)
Index: uspace/lib/c/arch/ppc32/src/thread_entry.S
===================================================================
--- uspace/lib/c/arch/ppc32/src/thread_entry.S	(revision 9182e86f8fac41203c8da4e3158cbf2b160dc738)
+++ uspace/lib/c/arch/ppc32/src/thread_entry.S	(revision 9182e86f8fac41203c8da4e3158cbf2b160dc738)
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2006 Martin Decky
+# 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
+	
+## User-space thread entry point for all but the first threads.
+#
+#
+SYMBOL(__thread_entry)
+	#
+	# Create the first stack frame.
+	#
+	li %r4, 0
+	stw %r4, 0(%r1)
+	stwu %r1, -16(%r1)
+
+	b __thread_main
+
Index: uspace/lib/c/arch/ppc32/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/ppc32/src/thread_entry.s	(revision fe124d6347cc9a0f69d7f0f159b0793d0472406c)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# 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
-	
-.globl __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	#
-	# Create the first stack frame.
-	#
-	li %r4, 0
-	stw %r4, 0(%r1)
-	stwu %r1, -16(%r1)
-
-	b __thread_main
-
-.end __thread_entry
