public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* syscall.S unwind info
@ 2003-05-07 18:43 Roland McGrath
  2003-05-07 19:14 ` Andreas Jaeger
  0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2003-05-07 18:43 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hackers

You should use the position-independent forms and not make .eh_frame writable.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: syscall.S unwind info
  2003-05-07 18:43 syscall.S unwind info Roland McGrath
@ 2003-05-07 19:14 ` Andreas Jaeger
  2003-05-08  7:38   ` Andreas Jaeger
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Jaeger @ 2003-05-07 19:14 UTC (permalink / raw)
  To: Roland McGrath; +Cc: GNU libc hackers

Roland McGrath <roland@redhat.com> writes:

> You should use the position-independent forms and not make .eh_frame writable.

Thanks, I'll try to do that tomorrow - together with a reversal of the
patch and addding the changes to sysdep.h.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: syscall.S unwind info
  2003-05-07 19:14 ` Andreas Jaeger
@ 2003-05-08  7:38   ` Andreas Jaeger
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Jaeger @ 2003-05-08  7:38 UTC (permalink / raw)
  To: Roland McGrath; +Cc: GNU libc hackers


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-08  7:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-07 18:43 syscall.S unwind info Roland McGrath
2003-05-07 19:14 ` Andreas Jaeger
2003-05-08  7:38   ` Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).