Index: boot/arch/arm32/src/asm.S
===================================================================
--- boot/arch/arm32/src/asm.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ boot/arch/arm32/src/asm.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,32 +27,28 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/arch.h>
 
 .section BOOTSTRAP
 
-.global start
-.global boot_pt
-.global boot_stack
-.global halt
-.global jump_to_kernel
-
-start:
+SYMBOL(start)
 	ldr sp, =boot_stack
 	b bootstrap
 
 .section BOOTPT
-boot_pt:
+SYMBOL(boot_pt)
 	.space PTL0_ENTRIES * PTL0_ENTRY_SIZE
 
 .section BOOTSTACK
 	.space 4096
-boot_stack:
+SYMBOL(boot_stack)
 
 .text
 
-halt:
+FUNCTION_BEGIN(halt)
 	b halt
+FUNCTION_END(halt)
 
-jump_to_kernel:
+FUNCTION_BEGIN(jump_to_kernel)
 	#
 	# Make sure that the I-cache, D-cache and memory are mutually coherent
@@ -108,2 +104,4 @@
 #endif
 	mov pc, r0
+FUNCTION_END(jump_to_kernel)
+
Index: boot/arch/arm32/src/eabi.S
===================================================================
--- boot/arch/arm32/src/eabi.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ boot/arch/arm32/src/eabi.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,28 +27,23 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
-.global __aeabi_idiv
-.global __aeabi_uidiv
-
-.global __aeabi_idivmod
-.global __aeabi_uidivmod
-
-.global __aeabi_ldivmod
-.global __aeabi_uldivmod
-
-__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
@@ -59,6 +54,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_idivmod)
 
-__aeabi_uidivmod:
+FUNCTION_BEGIN(__aeabi_uidivmod)
 	push {lr}
 	sub sp, sp, #12
@@ -69,6 +65,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_uidivmod)
 
-__aeabi_ldivmod:
+FUNCTION_BEGIN(__aeabi_ldivmod)
 	push {lr}
 	sub sp, sp, #24
@@ -80,6 +77,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_ldivmod)
 
-__aeabi_uldivmod:
+FUNCTION_BEGIN(__aeabi_uldivmod)
 	push {lr}
 	sub sp, sp, #24
@@ -91,2 +89,4 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_uldivmod)
+
Index: kernel/arch/arm32/Makefile.inc
===================================================================
--- kernel/arch/arm32/Makefile.inc	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ kernel/arch/arm32/Makefile.inc	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -33,5 +33,5 @@
 ATSIGN = %
 
-GCC_CFLAGS += -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR_ARCH)) -mno-unaligned-access
+GCC_CFLAGS += -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR_ARCH)) -mno-unaligned-access -mfpu=vfpv3
 
 ifeq ($(CONFIG_FPU),y)
@@ -70,5 +70,5 @@
 ifeq ($(CONFIG_FPU),y)
 	ARCH_SOURCES +=	arch/$(KARCH)/src/fpu_context.c
-	ARCH_SOURCES +=	arch/$(KARCH)/src/fpu.s
+	ARCH_SOURCES +=	arch/$(KARCH)/src/fpu.S
 endif
 
Index: kernel/arch/arm32/src/asm.S
===================================================================
--- kernel/arch/arm32/src/asm.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ kernel/arch/arm32/src/asm.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,14 +27,10 @@
  */
 
+#include <abi/asmtool.h>
+
 .text
 
-.global memcpy_from_uspace
-.global memcpy_to_uspace
-.global memcpy_from_uspace_failover_address
-.global memcpy_to_uspace_failover_address
-.global early_putchar
-
-memcpy_from_uspace:
-memcpy_to_uspace:
+FUNCTION_BEGIN(memcpy_from_uspace)
+FUNCTION_BEGIN(memcpy_to_uspace)
 	add r3, r1, #3
 	bic r3, r3, #3
@@ -94,10 +90,14 @@
 		bne 7b
 		b 3b
+FUNCTION_END(memcpy_from_uspace)
+FUNCTION_END(memcpy_to_uspace)
 
-memcpy_from_uspace_failover_address:
-memcpy_to_uspace_failover_address:
+SYMBOL(memcpy_from_uspace_failover_address)
+SYMBOL(memcpy_to_uspace_failover_address)
 	mov r0, #0
 	ldmia sp!, {r4, r5, pc}
 
-early_putchar:
+FUNCTION_BEGIN(early_putchar)
 	mov pc, lr
+FUNCTION_END(early_putchar)
+
Index: kernel/arch/arm32/src/context.S
===================================================================
--- kernel/arch/arm32/src/context.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ kernel/arch/arm32/src/context.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,10 +27,9 @@
 #
 
+#include <abi/asmtool.h>
+
 .text   
 
-.global context_save_arch
-.global context_restore_arch
-
-context_save_arch:
+FUNCTION_BEGIN(context_save_arch)
 	stmfd sp!, {r1}
 	mrs r1, cpsr
@@ -44,7 +43,7 @@
 	mov r0, #1
 	mov pc, lr
+FUNCTION_END(context_save_arch)
 
-
-context_restore_arch:
+FUNCTION_BEGIN(context_restore_arch)
 	ldmia r0!, {r4}
 	mrs r5, cpsr
@@ -58,2 +57,4 @@
 	mov r0, #0
 	mov pc, lr
+FUNCTION_END(context_restore_arch)
+
Index: kernel/arch/arm32/src/debug/stacktrace_asm.S
===================================================================
--- kernel/arch/arm32/src/debug/stacktrace_asm.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ kernel/arch/arm32/src/debug/stacktrace_asm.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,14 +27,16 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
-.global frame_pointer_get
-.global program_counter_get
-
-frame_pointer_get:
+FUNCTION_BEGIN(frame_pointer_get)
 	mov r0, fp
 	mov pc, lr
+FUNCTION_END(frame_pointer_get)
 
-program_counter_get:
+FUNCTION_BEGIN(program_counter_get)
 	mov r0, lr
 	mov pc, lr
+FUNCTION_END(program_counter_get)
+
Index: kernel/arch/arm32/src/dummy.S
===================================================================
--- kernel/arch/arm32/src/dummy.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ kernel/arch/arm32/src/dummy.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,21 +27,21 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
-.global calibrate_delay_loop
-.global asm_delay_loop
+FUNCTION_BEGIN(calibrate_delay_loop)
+	mov	pc, lr
+FUNCTION_END(calibrate_delay_loop)
 
-.global sys_tls_set
-.global dummy
-
-calibrate_delay_loop:
+FUNCTION_BEGIN(asm_delay_loop)
 	mov	pc, lr
-
-asm_delay_loop:
-	mov	pc, lr
+FUNCTION_END(asm_delay_loop)
 
 # not used on ARM
-sys_tls_set:
+FUNCTION_BEGIN(sys_tls_set)
+FUNCTION_BEGIN(dummy)
+	mov pc, lr
+FUNCTION_END(dummy)
+FUNCTION_END(sys_tls_set)
 
-dummy:
-	mov pc, lr
Index: kernel/arch/arm32/src/eabi.S
===================================================================
--- kernel/arch/arm32/src/eabi.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ kernel/arch/arm32/src/eabi.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,28 +27,23 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
-.global __aeabi_idiv
-.global __aeabi_uidiv
-
-.global __aeabi_idivmod
-.global __aeabi_uidivmod
-
-.global __aeabi_ldivmod
-.global __aeabi_uldivmod
-
-__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
@@ -59,6 +54,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_idivmod)
 
-__aeabi_uidivmod:
+FUNCTION_BEGIN(__aeabi_uidivmod)
 	push {lr}
 	sub sp, sp, #12
@@ -69,6 +65,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_uidivmod)
 
-__aeabi_ldivmod:
+FUNCTION_BEGIN(__aeabi_ldivmod)
 	push {lr}
 	sub sp, sp, #24
@@ -80,6 +77,7 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_ldivmod)
 
-__aeabi_uldivmod:
+FUNCTION_BEGIN(__aeabi_uldivmod)
 	push {lr}
 	sub sp, sp, #24
@@ -91,2 +89,4 @@
 	pop {lr}
 	mov pc, lr
+FUNCTION_END(__aeabi_uldivmod)
+
Index: kernel/arch/arm32/src/exc_handler.S
===================================================================
--- kernel/arch/arm32/src/exc_handler.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ kernel/arch/arm32/src/exc_handler.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,14 +27,7 @@
 #
 
+#include <abi/asmtool.h>
+
 .text   
-
-.global irq_exception_entry
-.global fiq_exception_entry
-.global data_abort_exception_entry
-.global prefetch_abort_exception_entry
-.global undef_instr_exception_entry
-.global swi_exception_entry
-.global reset_exception_entry
-
 
 # Switches to kernel stack and saves all registers there.
@@ -156,5 +149,5 @@
 .endm
 
-reset_exception_entry:
+SYMBOL(reset_exception_entry)
 	SAVE_REGS_TO_STACK
 	mov r0, #0
@@ -163,5 +156,5 @@
 	LOAD_REGS_FROM_STACK
 
-irq_exception_entry:
+SYMBOL(irq_exception_entry)
 	sub lr, lr, #4
 	SAVE_REGS_TO_STACK
@@ -171,5 +164,5 @@
 	LOAD_REGS_FROM_STACK
 
-fiq_exception_entry:
+SYMBOL(fiq_exception_entry)
 	sub lr, lr, #4
 	SAVE_REGS_TO_STACK
@@ -179,5 +172,5 @@
 	LOAD_REGS_FROM_STACK
 
-undef_instr_exception_entry:
+SYMBOL(undef_instr_exception_entry)
 	SAVE_REGS_TO_STACK
 	mov r0, #1
@@ -186,5 +179,5 @@
 	LOAD_REGS_FROM_STACK
 
-prefetch_abort_exception_entry:
+SYMBOL(prefetch_abort_exception_entry)
 	sub lr, lr, #4
 	SAVE_REGS_TO_STACK
@@ -194,5 +187,5 @@
 	LOAD_REGS_FROM_STACK
 
-data_abort_exception_entry:
+SYMBOL(data_abort_exception_entry)
 	sub lr, lr, #8
 	SAVE_REGS_TO_STACK
@@ -202,5 +195,5 @@
 	LOAD_REGS_FROM_STACK
 
-swi_exception_entry:
+SYMBOL(swi_exception_entry)
 	ldr r13, =exc_stack
 	SAVE_REGS_TO_STACK
Index: kernel/arch/arm32/src/fpu.S
===================================================================
--- kernel/arch/arm32/src/fpu.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
+++ kernel/arch/arm32/src/fpu.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2013 Jan Vesely
+ * 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(fpsid_read)
+	vmrs r0, fpsid
+	mov pc, lr
+FUNCTION_END(fpsid_read)
+
+FUNCTION_BEGIN(mvfr0_read)
+	vmrs r0, mvfr0
+	mov pc, lr
+FUNCTION_END(mvfr0_read)
+
+FUNCTION_BEGIN(fpscr_read)
+	vmrs r0, fpscr
+	mov pc, lr
+FUNCTION_END(fpscr_read)
+
+FUNCTION_BEGIN(fpscr_write)
+	vmsr fpscr, r0
+	mov pc, lr
+FUNCTION_END(fpscr_write)
+
+FUNCTION_BEGIN(fpexc_read)
+	vmrs r0, fpexc
+	mov pc, lr
+FUNCTION_END(fpexc_read)
+
+FUNCTION_BEGIN(fpexc_write)
+	vmsr fpexc, r0
+	mov pc, lr
+FUNCTION_END(fpexc_write)
+
+FUNCTION_BEGIN(fpu_context_save_s32)
+	vmrs r1, fpexc
+	vmrs r2, fpscr
+	stmia r0!, {r1, r2}
+	vstmia r0!, {s0-s31}
+	mov pc, lr
+FUNCTION_END(fpu_context_save_s32)
+
+FUNCTION_BEGIN(fpu_context_restore_s32)
+	ldmia r0!, {r1, r2}
+	vmsr fpexc, r1
+	vmsr fpscr, r2
+	vldmia r0!, {s0-s31}
+	mov pc, lr
+FUNCTION_END(fpu_context_restore_s32)
+
+FUNCTION_BEGIN(fpu_context_save_d16)
+	vmrs r1, fpexc
+	vmrs r2, fpscr
+	stmia r0!, {r1, r2}
+	vstmia r0!, {d0-d15}
+	mov pc, lr
+FUNCTION_END(fpu_context_save_d16)
+
+FUNCTION_BEGIN(fpu_context_restore_d16)
+	ldmia r0!, {r1, r2}
+	vmsr fpexc, r1
+	vmsr fpscr, r2
+	vldmia r0!, {d0-d15}
+	mov pc, lr
+FUNCTION_END(fpu_context_restore_d16)
+
+FUNCTION_BEGIN(fpu_context_save_d32)
+	vmrs r1, fpexc
+	stmia r0!, {r1}
+	vmrs r1, fpscr
+	stmia r0!, {r1}
+	vstmia r0!, {d0-d15}
+	vstmia r0!, {d16-d31}
+	mov pc, lr
+FUNCTION_END(fpu_context_save_d32)
+
+FUNCTION_BEGIN(fpu_context_restore_d32)
+	ldmia r0!, {r1, r2}
+	vmsr fpexc, r1
+	vmsr fpscr, r2
+	vldmia r0!, {d0-d15}
+	vldmia r0!, {d16-d31}
+	mov pc, lr
+FUNCTION_END(fpu_context_restore_d32)
+
Index: rnel/arch/arm32/src/fpu.s
===================================================================
--- kernel/arch/arm32/src/fpu.s	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/*
- * Copyright (c) 2013 Jan Vesely
- * 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 fpsid_read
-.global mvfr0_read
-.global fpscr_read
-.global fpscr_write
-.global fpexc_read
-.global fpexc_write
-
-.global fpu_context_save_s32
-.global fpu_context_restore_s32
-.global fpu_context_save_d16
-.global fpu_context_restore_d16
-.global fpu_context_save_d32
-.global fpu_context_restore_d32
-
-fpsid_read:
-	vmrs r0, fpsid
-	mov pc, lr
-
-mvfr0_read:
-	vmrs r0, mvfr0
-	mov pc, lr
-
-fpscr_read:
-	vmrs r0, fpscr
-	mov pc, lr
-
-fpscr_write:
-	vmsr fpscr, r0
-	mov pc, lr
-
-fpexc_read:
-	vmrs r0, fpexc
-	mov pc, lr
-
-fpexc_write:
-	vmsr fpexc, r0
-	mov pc, lr
-
-fpu_context_save_s32:
-	vmrs r1, fpexc
-	vmrs r2, fpscr
-	stmia r0!, {r1, r2}
-	vstmia r0!, {s0-s31}
-	mov pc, lr
-
-fpu_context_restore_s32:
-	ldmia r0!, {r1, r2}
-	vmsr fpexc, r1
-	vmsr fpscr, r2
-	vldmia r0!, {s0-s31}
-	mov pc, lr
-
-fpu_context_save_d16:
-	vmrs r1, fpexc
-	vmrs r2, fpscr
-	stmia r0!, {r1, r2}
-	vstmia r0!, {d0-d15}
-	mov pc, lr
-
-fpu_context_restore_d16:
-	ldmia r0!, {r1, r2}
-	vmsr fpexc, r1
-	vmsr fpscr, r2
-	vldmia r0!, {d0-d15}
-	mov pc, lr
-
-fpu_context_save_d32:
-	vmrs r1, fpexc
-	stmia r0!, {r1}
-	vmrs r1, fpscr
-	stmia r0!, {r1}
-	vstmia r0!, {d0-d15}
-	vstmia r0!, {d16-d31}
-	mov pc, lr
-
-fpu_context_restore_d32:
-	ldmia r0!, {r1, r2}
-	vmsr fpexc, r1
-	vmsr fpscr, r2
-	vldmia r0!, {d0-d15}
-	vldmia r0!, {d16-d31}
-	mov pc, lr
-
-
-
Index: kernel/arch/arm32/src/start.S
===================================================================
--- kernel/arch/arm32/src/start.S	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ kernel/arch/arm32/src/start.S	(revision 73b3ecde730c3b8a3a21834f6c65380d45bf9991)
@@ -27,14 +27,10 @@
 #
 
+#include <abi/asmtool.h>
 #include <arch/asm/boot.h>
 
 .text
 
-.global kernel_image_start
-.global exc_stack
-.global supervisor_sp
-
-kernel_image_start:
-
+SYMBOL(kernel_image_start)
 	# initialize Stack pointer for exception modes
 	mrs r4, cpsr
@@ -83,6 +79,6 @@
 
 	.space 1024
-exc_stack:
+SYMBOL(exc_stack)
 
-supervisor_sp:
+SYMBOL(supervisor_sp)
 	.space 4
Index: uspace/lib/c/arch/arm32/Makefile.inc
===================================================================
--- uspace/lib/c/arch/arm32/Makefile.inc	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ 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 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ 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: pace/lib/c/arch/arm32/src/entry.s
===================================================================
--- uspace/lib/c/arch/arm32/src/entry.s	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ 	(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: pace/lib/c/arch/arm32/src/entryjmp.s
===================================================================
--- uspace/lib/c/arch/arm32/src/entryjmp.s	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ 	(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 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ 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 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ 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: pace/lib/c/arch/arm32/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/arm32/src/thread_entry.s	(revision 96521f2f62397b11b7b23251e5a66693fb739e47)
+++ 	(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
