This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Here's a patch for sysdep.h to add the unwind info.
What do you think? Is this the right way to add the eh frame info to
the syscalls?
Andreas
============================================================
Index: sysdeps/unix/sysv/linux/x86_64/sysdep.h
--- sysdeps/unix/sysv/linux/x86_64/sysdep.h 5 May 2003 08:45:16 -0000 1.17
+++ sysdeps/unix/sysv/linux/x86_64/sysdep.h 8 May 2003 07:37:57 -0000
@@ -77,26 +77,57 @@
#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
.text; \
- ENTRY (name) \
- DO_CALL (syscall_name, args); \
+ .LF25: ENTRY (name) \
+ DO_CALL (syscall_name, args); \
cmpq $-4095, %rax; \
jae SYSCALL_ERROR_LABEL; \
+ DWARF_INFO (name) \
L(pseudo_end):
+#define DWARF_INFO(name) \
+ .section .eh_frame,"a",@progbits; \
+.Lframe1: \
+ .long .LECIE1-.LSCIE1; /* Length of Common Information Entry */ \
+.LSCIE1: \
+ .long 0x0; /* CIE Identifier Tag */ \
+ .byte 0x1; /* CIE Version */ \
+ .ascii "zR\0"; /* CIE Augmentation */ \
+ .uleb128 0x1; /* CIE Code Alignment Factor */ \
+ .sleb128 -8; /* CIE Data Alignment Factor */ \
+ .byte 0x10; /* CIE RA Column */ \
+ .uleb128 0x1; /* Augmentation size */ \
+ .byte 0x1b; /* FDE Encoding (pcrel sdata4) */ \
+ .byte 0xc; /* DW_CFA_def_cfa */ \
+ .uleb128 0x7; \
+ .uleb128 0x8; \
+ .byte 0x90; /* DW_CFA_offset, column 0x10 */ \
+ .uleb128 0x1; \
+ .align 8; \
+.LECIE1: \
+.LSFDE1: \
+ .long .LEFDE1-.LASFDE1; /* FDE Length */ \
+.LASFDE1: \
+ .long .LASFDE1-.Lframe1; /* FDE CIE offset */ \
+ .long .LF25-.; /* FDE initial location */ \
+ .long .LFE1-.LF25; /* FDE address range */ \
+ .uleb128 0x0; /* Augmentation size */ \
+ .align 8; \
+.LEFDE1: .text;
+
#undef PSEUDO_END
#define PSEUDO_END(name) \
SYSCALL_ERROR_HANDLER \
- END (name)
+ .LFE1: END (name) \
#undef PSEUDO_NOERRNO
#define PSEUDO_NOERRNO(name, syscall_name, args) \
.text; \
- ENTRY (name) \
+ .LF25: ENTRY (name) \
DO_CALL (syscall_name, args)
#undef PSEUDO_END_NOERRNO
-#define PSEUDO_END_NOERRNO(name) \
- END (name)
+#define PSEUDO_END_NOERRNO(name) \
+ .LFE1: END (name) \
#define ret_NOERRNO ret
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |