Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2014 22:44:50 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264481 - head/libexec/rtld-elf/amd64
Message-ID:  <201404142244.s3EMios9079788@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Apr 14 22:44:50 2014
New Revision: 264481
URL: http://svnweb.freebsd.org/changeset/base/264481

Log:
  Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers
  to unwind around the calls from PLT to binder.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/libexec/rtld-elf/amd64/rtld_start.S

Modified: head/libexec/rtld-elf/amd64/rtld_start.S
==============================================================================
--- head/libexec/rtld-elf/amd64/rtld_start.S	Mon Apr 14 22:01:49 2014	(r264480)
+++ head/libexec/rtld-elf/amd64/rtld_start.S	Mon Apr 14 22:44:50 2014	(r264481)
@@ -79,17 +79,39 @@
 	.globl	_rtld_bind_start
 	.type	_rtld_bind_start,@function
 _rtld_bind_start:
+	.cfi_startproc
+	.cfi_adjust_cfa_offset	16
 	subq	$8,%rsp
+	.cfi_adjust_cfa_offset	8
 	pushfq				# Save rflags
+	.cfi_adjust_cfa_offset	8
 	pushq	%rax			# Save %rax
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%rax,-32
 	pushq	%rdx			# Save %rdx
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%rdx,-40
 	pushq	%rcx			# Save %rcx
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%rcx,-48
 	pushq	%rsi			# Save %rsi
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%rsi,-56
 	pushq	%rdi			# Save %rdi
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%rdi,-64
 	pushq	%r8			# Save %r8
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%r8,-72
 	pushq	%r9			# Save %r9
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%r9,-80
 	pushq	%r10			# Save %r10
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%r10,-88
 	pushq	%r11			# Save %r11
+	.cfi_adjust_cfa_offset 8
+	.cfi_offset	%r11,-96
 
 	movq	0x58(%rsp),%rdi		# Fetch obj argument
 	movq	0x60(%rsp),%rsi		# Fetch reloff argument
@@ -101,16 +123,37 @@ _rtld_bind_start:
 
 	movq	%rax,0x60(%rsp)		# Store target over reloff argument
 	popq	%r11			# Restore %r11
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %r11
 	popq	%r10			# Restore %r10
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %r10
 	popq	%r9			# Restore %r9
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %r9
 	popq	%r8			# Restore %r8
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %r8
 	popq	%rdi			# Restore %rdi
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %rdi
 	popq	%rsi			# Restore %rsi
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %rsi
 	popq	%rcx			# Restore %rcx
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %rcx
 	popq	%rdx			# Restore %rdx
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %rdx
 	popq	%rax			# Restore %rax
+	.cfi_adjust_cfa_offset -8
+	.cfi_restore %rax
 	popfq				# Restore rflags
+	.cfi_adjust_cfa_offset -8
 	leaq	16(%rsp),%rsp		# Discard spare, obj, do not change rflags
 	ret				# "Return" to target address
+	.cfi_endproc
+	.size	_rtld_bind_start, . - _rtld_bind_start
 
 	.section .note.GNU-stack,"",%progbits



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404142244.s3EMios9079788>