Index: uspace/lib/libc/arch/amd64/src/entry.s
===================================================================
--- uspace/lib/libc/arch/amd64/src/entry.s	(revision 62e1e1d7be8247f41f632d147bf155f2520e4c12)
+++ uspace/lib/libc/arch/amd64/src/entry.s	(revision 72f8856e81575a387d28d1fb73a021883123e4bb)
@@ -39,7 +39,8 @@
 __entry:
 	#
-	# Stop stack traces in this function.
+	# Create the first stack frame.
 	#
-	xorq %rbp, %rbp
+	pushq $0
+	mov %rsp, %rbp
 	
 	# %rdi was deliberately chosen as the first argument is also in %rdi
Index: uspace/lib/libc/arch/amd64/src/stacktrace.S
===================================================================
--- uspace/lib/libc/arch/amd64/src/stacktrace.S	(revision 62e1e1d7be8247f41f632d147bf155f2520e4c12)
+++ uspace/lib/libc/arch/amd64/src/stacktrace.S	(revision 72f8856e81575a387d28d1fb73a021883123e4bb)
@@ -33,4 +33,5 @@
 .global frame_pointer_validate
 .global return_address_get
+.global program_counter_get
 
 frame_pointer_get:
@@ -49,2 +50,6 @@
 	movq 8(%rdi), %rax
 	ret
+
+program_counter_get:
+	movq (%rsp), %rax
+	ret
Index: uspace/lib/libc/arch/amd64/src/thread_entry.s
===================================================================
--- uspace/lib/libc/arch/amd64/src/thread_entry.s	(revision 62e1e1d7be8247f41f632d147bf155f2520e4c12)
+++ uspace/lib/libc/arch/amd64/src/thread_entry.s	(revision 72f8856e81575a387d28d1fb73a021883123e4bb)
@@ -36,7 +36,8 @@
 __thread_entry:
 	#
-	# Stop stack traces in this function.
+	# Create the first stack frame.
 	#
-	xorq %rbp, %rbp
+	pushq $0
+	movq %rsp, %rbp
 
 	#
