Index: uspace/lib/c/arch/ia32/Makefile.inc
===================================================================
--- uspace/lib/c/arch/ia32/Makefile.inc	(revision ae7bbfd0bcf872d80ac6f3f37faf7fa216782613)
+++ uspace/lib/c/arch/ia32/Makefile.inc	(revision 8844e7075a44097c359d1ef79350efa377c39ec5)
@@ -29,6 +29,6 @@
 ARCH_SOURCES = \
 	arch/$(UARCH)/src/entry.S \
-	arch/$(UARCH)/src/entryjmp.s \
-	arch/$(UARCH)/src/thread_entry.s \
+	arch/$(UARCH)/src/entryjmp.S \
+	arch/$(UARCH)/src/thread_entry.S \
 	arch/$(UARCH)/src/syscall.S \
 	arch/$(UARCH)/src/fibril.S \
Index: uspace/lib/c/arch/ia32/src/entry.S
===================================================================
--- uspace/lib/c/arch/ia32/src/entry.S	(revision ae7bbfd0bcf872d80ac6f3f37faf7fa216782613)
+++ uspace/lib/c/arch/ia32/src/entry.S	(revision 8844e7075a44097c359d1ef79350efa377c39ec5)
@@ -27,4 +27,6 @@
 #
 
+#include <abi/asmtool.h>
+
 INTEL_CPUID_STANDARD = 1
 INTEL_SEP = 11
@@ -34,11 +36,9 @@
 .org 0
 
-.globl __entry
-
 ## User-space task entry point
 #
 # %edi contains the PCB pointer
 #
-__entry:
+SYMBOL(__entry)
 	mov %ss, %ax
 	mov %ax, %ds
Index: uspace/lib/c/arch/ia32/src/entryjmp.S
===================================================================
--- uspace/lib/c/arch/ia32/src/entryjmp.S	(revision 8844e7075a44097c359d1ef79350efa377c39ec5)
+++ uspace/lib/c/arch/ia32/src/entryjmp.S	(revision 8844e7075a44097c359d1ef79350efa377c39ec5)
@@ -0,0 +1,49 @@
+#
+# 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);
+#
+# Jump to program entry point
+SYMBOL(entry_point_jmp)
+	# Use standard ia32 prologue not to confuse anybody
+	push %ebp
+	movl %esp, %ebp
+	
+	# %eax := entry_point
+	movl 0x8(%ebp), %eax
+	
+	# %edi := pcb
+	# pcb is passed to the entry point in %edi
+	mov 0xc(%ebp), %edi
+	
+	# Save a tiny bit of stack space
+	pop %ebp
+	
+	jmp *%eax
Index: uspace/lib/c/arch/ia32/src/entryjmp.s
===================================================================
--- uspace/lib/c/arch/ia32/src/entryjmp.s	(revision ae7bbfd0bcf872d80ac6f3f37faf7fa216782613)
+++ 	(revision )
@@ -1,49 +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);
-#
-# Jump to program entry point
-entry_point_jmp:
-	# Use standard ia32 prologue not to confuse anybody
-	push %ebp
-	movl %esp, %ebp
-	
-	# %eax := entry_point
-	movl 0x8(%ebp), %eax
-	
-	# %edi := pcb
-	# pcb is passed to the entry point in %edi
-	mov 0xc(%ebp), %edi
-	
-	# Save a tiny bit of stack space
-	pop %ebp
-	
-	jmp *%eax
Index: uspace/lib/c/arch/ia32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/ia32/src/stacktrace_asm.S	(revision ae7bbfd0bcf872d80ac6f3f37faf7fa216782613)
+++ uspace/lib/c/arch/ia32/src/stacktrace_asm.S	(revision 8844e7075a44097c359d1ef79350efa377c39ec5)
@@ -27,18 +27,19 @@
 #
 
+#include <abi/asmtool.h>
+
 .text
 
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
+FUNCTION_BEGIN(stacktrace_prepare)
+	ret
+FUNCTION_END(stacktrace_prepare)
 
-stacktrace_prepare:
-	ret
-
-stacktrace_fp_get:
+FUNCTION_BEGIN(stacktrace_fp_get)
 	movl %ebp, %eax
 	ret
+FUNCTION_END(stacktrace_fp_get)
 
-stacktrace_pc_get:
+FUNCTION_BEGIN(stacktrace_pc_get)
 	movl (%esp), %eax
 	ret
+FUNCTION_END(stacktrace_pc_get)
Index: uspace/lib/c/arch/ia32/src/syscall.S
===================================================================
--- uspace/lib/c/arch/ia32/src/syscall.S	(revision ae7bbfd0bcf872d80ac6f3f37faf7fa216782613)
+++ uspace/lib/c/arch/ia32/src/syscall.S	(revision 8844e7075a44097c359d1ef79350efa377c39ec5)
@@ -27,10 +27,11 @@
 #
 
+#include <abi/asmtool.h>
+
 .data
 
-.global __syscall_fast_func
-__syscall_fast_func:
+OBJECT_BEGIN(__syscall_fast_func)
 	.long __syscall_slow
-	.size __syscall_fast_func, . - __syscall_fast_func
+OBJECT_END(__syscall_fast_func)
 
 .text
@@ -42,6 +43,5 @@
  * could benefit from this and not save unused registers on the stack.
  */
-.global __syscall_slow
-__syscall_slow:
+FUNCTION_BEGIN(__syscall_slow)
 	pushl %ebx
 	pushl %esi
@@ -61,4 +61,5 @@
 	popl %ebx
 	ret
+FUNCTION_END(__syscall_slow)
 
 
@@ -71,8 +72,5 @@
  * segment, otherwise the SYSENTER wouldn't work in the first place).
  */
-.global __syscall_fast
-	.type __syscall_fast, @function
-
-__syscall_fast:
+FUNCTION_BEGIN(__syscall_fast)
 	pushl %ebx
 	pushl %esi
@@ -98,4 +96,3 @@
 	popl %ebx
 	ret
-
-	.size __syscall_fast, . - __syscall_fast
+FUNCTION_END(__syscall_fast)
Index: uspace/lib/c/arch/ia32/src/thread_entry.S
===================================================================
--- uspace/lib/c/arch/ia32/src/thread_entry.S	(revision 8844e7075a44097c359d1ef79350efa377c39ec5)
+++ uspace/lib/c/arch/ia32/src/thread_entry.S	(revision 8844e7075a44097c359d1ef79350efa377c39ec5)
@@ -0,0 +1,59 @@
+#
+# 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_BEGIN(__thread_entry)
+	mov %ss, %dx
+	mov %dx, %ds
+	mov %dx, %es
+	mov %dx, %fs
+	# Do not set %gs, it contains descriptor that can see TLS
+	
+	#
+	# Create the first stack frame.
+	#
+	pushl $0
+	pushl $0
+	mov %esp, %ebp
+	
+	#
+	# EAX contains address of uarg.
+	#
+	pushl %eax
+	call __thread_main
+	
+	#
+	# Not reached.
+	#
+SYMBOL_END(__thread_entry)
Index: uspace/lib/c/arch/ia32/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/ia32/src/thread_entry.s	(revision ae7bbfd0bcf872d80ac6f3f37faf7fa216782613)
+++ 	(revision )
@@ -1,60 +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
-
-.globl __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	mov %ss, %dx
-	mov %dx, %ds
-	mov %dx, %es
-	mov %dx, %fs
-	# Do not set %gs, it contains descriptor that can see TLS
-	
-	#
-	# Create the first stack frame.
-	#
-	pushl $0
-	pushl $0
-	mov %esp, %ebp
-	
-	#
-	# EAX contains address of uarg.
-	#
-	pushl %eax
-	call __thread_main
-	
-	#
-	# Not reached.
-	#
-	
-.end __thread_entry
