Index: uspace/lib/c/arch/arm32/Makefile.inc
===================================================================
--- uspace/lib/c/arch/arm32/Makefile.inc	(revision 3b0f1b9a04083e5b48162443937d5e8d8303e4d0)
+++ uspace/lib/c/arch/arm32/Makefile.inc	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -29,7 +29,7 @@
 
 ARCH_SOURCES = \
-	arch/$(UARCH)/src/entry.s \
-	arch/$(UARCH)/src/entryjmp.s \
-	arch/$(UARCH)/src/thread_entry.s \
+	arch/$(UARCH)/src/entry.S \
+	arch/$(UARCH)/src/entryjmp.S \
+	arch/$(UARCH)/src/thread_entry.S \
 	arch/$(UARCH)/src/syscall.c \
 	arch/$(UARCH)/src/fibril.S \
Index: uspace/lib/c/arch/arm32/src/eabi.S
===================================================================
--- uspace/lib/c/arch/arm32/src/eabi.S	(revision 3b0f1b9a04083e5b48162443937d5e8d8303e4d0)
+++ uspace/lib/c/arch/arm32/src/eabi.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,34 +27,28 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
-.global __aeabi_read_tp
-
-.global __aeabi_idiv
-.global __aeabi_uidiv
-
-.global __aeabi_idivmod
-.global __aeabi_uidivmod
-
-.global __aeabi_ldivmod
-.global __aeabi_uldivmod
-
-__aeabi_read_tp:
+FUNCTION_BEGIN(__aeabi_read_tp)
 	mov r0, r9
 	mov pc, lr
+FUNCTION_END(__aeabi_read_tp)
 
-__aeabi_idiv:
+FUNCTION_BEGIN(__aeabi_idiv)
 	push {lr}
 	bl __divsi3
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_idiv)
 
-__aeabi_uidiv:
+FUNCTION_BEGIN(__aeabi_uidiv)
 	push {lr}
 	bl __udivsi3
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_uidiv)
 
-__aeabi_idivmod:
+FUNCTION_BEGIN(__aeabi_idivmod)
 	push {lr}
 	sub sp, sp, #12
@@ -65,6 +59,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_idivmod)
 
-__aeabi_uidivmod:
+FUNCTION_BEGIN(__aeabi_uidivmod)
 	push {lr}
 	sub sp, sp, #12
@@ -75,6 +70,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_uidivmod)
 
-__aeabi_ldivmod:
+FUNCTION_BEGIN(__aeabi_ldivmod)
 	push {lr}
 	sub sp, sp, #24
@@ -86,6 +82,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_ldivmod)
 
-__aeabi_uldivmod:
+FUNCTION_BEGIN(__aeabi_uldivmod)
 	push {lr}
 	sub sp, sp, #24
@@ -97,2 +94,4 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_uldivmod)
+
Index: uspace/lib/c/arch/arm32/src/entry.S
===================================================================
--- uspace/lib/c/arch/arm32/src/entry.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
+++ uspace/lib/c/arch/arm32/src/entry.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -0,0 +1,60 @@
+#
+# Copyright (c) 2007 Michal Kebrt, Pavel Jancik
+# 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
+#
+# r1 contains the PCB pointer
+# r2 contains the RAS page address
+#
+SYMBOL(__entry)
+	# Store the RAS page address into the ras_page variable
+	ldr r0, =ras_page
+	str r2, [r0]
+	
+	#
+	# Create the first stack frame.
+	#
+	mov fp, #0
+	mov ip, sp
+	push {fp, ip, lr, pc}
+	sub fp, ip, #4
+	
+	# Pass pcb_ptr to __main as the first argument (in r0)
+	mov r0, r1
+	bl __main
+
+.data
+
+SYMBOL(ras_page)
+	.long 0
Index: uspace/lib/c/arch/arm32/src/entry.s
===================================================================
--- uspace/lib/c/arch/arm32/src/entry.s	(revision 3b0f1b9a04083e5b48162443937d5e8d8303e4d0)
+++ 	(revision )
@@ -1,61 +1,0 @@
-#
-# Copyright (c) 2007 Michal Kebrt, Pavel Jancik
-# 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
-
-.global __entry
-
-## User-space task entry point
-#
-# r1 contains the PCB pointer
-# r2 contains the RAS page address
-#
-__entry:
-	# Store the RAS page address into the ras_page variable
-	ldr r0, =ras_page
-	str r2, [r0]
-	
-	#
-	# Create the first stack frame.
-	#
-	mov fp, #0
-	mov ip, sp
-	push {fp, ip, lr, pc}
-	sub fp, ip, #4
-	
-	# Pass pcb_ptr to __main as the first argument (in r0)
-	mov r0, r1
-	bl __main
-
-.data
-
-.global ras_page
-ras_page:
-	.long 0
Index: uspace/lib/c/arch/arm32/src/entryjmp.S
===================================================================
--- uspace/lib/c/arch/arm32/src/entryjmp.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
+++ uspace/lib/c/arch/arm32/src/entryjmp.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -0,0 +1,42 @@
+#
+# 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);
+#
+# r0	contains entry_point
+# r1	contains pcb
+#
+# Jump to program entry point
+SYMBOL(entry_point_jmp)
+	# load ras_page address to r2
+	ldr r2, =ras_page
+	ldr r2, [r2]
+	# pcb is passed to the entry point in r1 (where it already is)
+	mov r15, r0
Index: uspace/lib/c/arch/arm32/src/entryjmp.s
===================================================================
--- uspace/lib/c/arch/arm32/src/entryjmp.s	(revision 3b0f1b9a04083e5b48162443937d5e8d8303e4d0)
+++ 	(revision )
@@ -1,42 +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);
-#
-# r0	contains entry_point
-# r1	contains pcb
-#
-# Jump to program entry point
-entry_point_jmp:
-	# load ras_page address to r2
-	ldr r2, =ras_page
-	ldr r2, [r2]
-	# pcb is passed to the entry point in r1 (where it already is)
-	mov r15, r0
Index: uspace/lib/c/arch/arm32/src/fibril.S
===================================================================
--- uspace/lib/c/arch/arm32/src/fibril.S	(revision 3b0f1b9a04083e5b48162443937d5e8d8303e4d0)
+++ uspace/lib/c/arch/arm32/src/fibril.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,10 +27,9 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
-.global context_save
-.global context_restore
-
-context_save:
+FUNCTION_BEGIN(context_save)
 	stmia r0!, {sp, lr}
 	stmia r0!, {r4-r11}
@@ -39,6 +38,7 @@
 	mov r0, #1
 	mov pc, lr
+FUNCTION_END(context_save)
 
-context_restore:
+FUNCTION_BEGIN(context_restore)
 	ldmia r0!, {sp, lr}
 	ldmia r0!, {r4-r11}
@@ -47,3 +47,4 @@
 	mov r0, #0
 	mov pc, lr
+FUNCTION_END(context_restore)
 
Index: uspace/lib/c/arch/arm32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/arm32/src/stacktrace_asm.S	(revision 3b0f1b9a04083e5b48162443937d5e8d8303e4d0)
+++ uspace/lib/c/arch/arm32/src/stacktrace_asm.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,18 +27,20 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
+FUNCTION_BEGIN(stacktrace_prepare)
+	mov pc, lr
+FUNCTION_END(stacktrace_prepare)
 
-stacktrace_prepare:
-	mov pc, lr
-
-stacktrace_fp_get:
+FUNCTION_BEGIN(stacktrace_fp_get)
 	mov r0, fp
 	mov pc, lr
+FUNCTION_END(stacktrace_fp_get)
 
-stacktrace_pc_get:
+FUNCTION_BEGIN(stacktrace_pc_get)
 	mov r0, lr
 	mov pc, lr
+FUNCTION_END(stacktrace_pc_get)
+
Index: uspace/lib/c/arch/arm32/src/thread_entry.S
===================================================================
--- uspace/lib/c/arch/arm32/src/thread_entry.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
+++ uspace/lib/c/arch/arm32/src/thread_entry.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2006 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
+
+## User-space thread entry point for all but the first threads.
+#
+#
+SYMBOL(__thread_entry)
+	#
+	# Create the first stack frame.
+	#
+	mov fp, #0
+	mov ip, sp
+	push {fp, ip, lr, pc}
+	sub fp, ip, #4
+	
+	b __thread_main
Index: uspace/lib/c/arch/arm32/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/arm32/src/thread_entry.s	(revision 3b0f1b9a04083e5b48162443937d5e8d8303e4d0)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#
-# Copyright (c) 2006 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 __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	#
-	# Create the first stack frame.
-	#
-	mov fp, #0
-	mov ip, sp
-	push {fp, ip, lr, pc}
-	sub fp, ip, #4
-	
-	b __thread_main
