This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
[M68K/ColdFire patch 2/n] Add CFI information to dl-trampoline.S
- From: Maxim Kuvyrkov <maxim at codesourcery dot com>
- To: libc-ports at sourceware dot org
- Cc: Andreas Schwab <schwab at linux-m68k dot org>
- Date: Tue, 25 Aug 2009 16:38:57 +0400
- Subject: [M68K/ColdFire patch 2/n] Add CFI information to dl-trampoline.S
- References: <4A93D885.3060004@codesourcery.com>
This patch adds frame unwind information to _dl_runtime_resolve() to
make debugging of the resolver more pleasant.
Any comments? OK to commit?
Thanks,
--
Maxim Kuvyrkov
CodeSourcery
>From 6db3a545be78373ca431e982fd354c8315e2519a Mon Sep 17 00:00:00 2001
From: Maxim Kuvyrkov <maxim@codesourcery.com>
Date: Mon, 24 Aug 2009 12:29:56 +0400
Subject: [PATCH 2/5] Add frame unwind information to _dl_runtime_resolve.
* sysdeps/m68k/dl-trampoline.S: Add frame unwinding informarion.
This patch adds frame unwind information to _dl_runtime_resolve.
The initial CFA offset of 12 was determined by trial and error and
with debugger's assistance.
---
sysdeps/m68k/dl-trampoline.S | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S
index e324da1..1a46b1e 100644
--- a/sysdeps/m68k/dl-trampoline.S
+++ b/sysdeps/m68k/dl-trampoline.S
@@ -1,5 +1,5 @@
/* PLT trampolines. m68k version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,23 +23,32 @@
.globl _dl_runtime_resolve
.type _dl_runtime_resolve, @function
_dl_runtime_resolve:
+ cfi_startproc
+ cfi_def_cfa (%sp, 12)
| Save %a0 (struct return address) and %a1.
move.l %a0, -(%sp)
+ cfi_adjust_cfa_offset (4)
move.l %a1, -(%sp)
+ cfi_adjust_cfa_offset (4)
| Call the real address resolver.
jbsr _dl_fixup
| Restore register %a0 and %a1.
move.l (%sp)+, %a1
+ cfi_adjust_cfa_offset (-4)
move.l (%sp)+, %a0
+ cfi_adjust_cfa_offset (-4)
| Pop parameters
addq.l #8, %sp
+ cfi_adjust_cfa_offset (-8)
| Call real function.
#ifdef __mcoldfire__
move.l %d0,-(%sp)
+ cfi_adjust_cfa_offset (4)
rts
#else
jmp (%d0)
#endif
+ cfi_endproc
.size _dl_runtime_resolve, . - _dl_runtime_resolve
.text
--
1.6.4