diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-04-28 21:11:47 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-04-28 21:11:47 +0000 |
commit | 62d01985e9bd245ec382d2bfbe340ae7067b6be3 (patch) | |
tree | 87799661e9069fc68879da807be88dd50479f300 /sysdeps/unix | |
parent | b1ecbed20b3cf932d6df4de492508deeff2adc0c (diff) | |
download | glibc-62d01985e9bd245ec382d2bfbe340ae7067b6be3.tar.gz glibc-62d01985e9bd245ec382d2bfbe340ae7067b6be3.tar.xz glibc-62d01985e9bd245ec382d2bfbe340ae7067b6be3.zip |
* sysdeps/i386/sysdep.h: Add cfi instrumentation to asm fragments.
* sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/i386/socket.S: Remove now duplicate cfi_startproc and cfi_endproc.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/socket.S | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 30 |
2 files changed, 23 insertions, 11 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/socket.S b/sysdeps/unix/sysv/linux/i386/socket.S index e403899cc6..7c8ac29b86 100644 --- a/sysdeps/unix/sysv/linux/i386/socket.S +++ b/sysdeps/unix/sysv/linux/i386/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-1998,2002,2003,2005 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 @@ -41,7 +41,6 @@ #endif .globl __socket - cfi_startproc ENTRY (__socket) #if defined NEED_CANCELLATION && defined CENABLE SINGLE_THREAD_P @@ -118,7 +117,6 @@ L(pseudo_end): /* Successful; return the syscall's value. */ ret #endif - cfi_endproc PSEUDO_END (__socket) #ifndef NO_WEAK_ALIAS diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 6bea9d2044..d64d0a3a5c 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -168,16 +168,22 @@ __i686.get_pc_thunk.reg: \ # else # define SYSCALL_ERROR_HANDLER \ 0:pushl %ebx; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (ebx, 0); \ SETUP_PIC_REG (bx); \ addl $_GLOBAL_OFFSET_TABLE_, %ebx; \ xorl %edx, %edx; \ subl %eax, %edx; \ pushl %edx; \ + cfi_adjust_cfa_offset (4); \ PUSH_ERRNO_LOCATION_RETURN; \ call BP_SYM (__errno_location)@PLT; \ POP_ERRNO_LOCATION_RETURN; \ popl %ecx; \ + cfi_adjust_cfa_offset (-4); \ popl %ebx; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (ebx); \ movl %ecx, (%eax); \ orl $-1, %eax; \ jmp L(pseudo_end); @@ -273,9 +279,11 @@ __i686.get_pc_thunk.reg: \ #define PUSHARGS_1 movl %ebx, %edx; L(SAVEBX1): PUSHARGS_0 #define DOARGS_1 _DOARGS_1 (4) #define POPARGS_1 POPARGS_0; movl %edx, %ebx; L(RESTBX1): -#define _PUSHARGS_1 pushl %ebx; L(PUSHBX1): _PUSHARGS_0 +#define _PUSHARGS_1 pushl %ebx; cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (ebx, 0); L(PUSHBX1): _PUSHARGS_0 #define _DOARGS_1(n) movl n(%esp), %ebx; _DOARGS_0(n-4) -#define _POPARGS_1 _POPARGS_0; popl %ebx; L(POPBX1): +#define _POPARGS_1 _POPARGS_0; popl %ebx; cfi_adjust_cfa_offset (-4); \ + cfi_restore (ebx); L(POPBX1): #define PUSHARGS_2 PUSHARGS_1 #define DOARGS_2 _DOARGS_2 (8) @@ -294,23 +302,29 @@ __i686.get_pc_thunk.reg: \ #define PUSHARGS_4 _PUSHARGS_4 #define DOARGS_4 _DOARGS_4 (24) #define POPARGS_4 _POPARGS_4 -#define _PUSHARGS_4 pushl %esi; L(PUSHSI1): _PUSHARGS_3 +#define _PUSHARGS_4 pushl %esi; cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (esi, 0); L(PUSHSI1): _PUSHARGS_3 #define _DOARGS_4(n) movl n(%esp), %esi; _DOARGS_3 (n-4) -#define _POPARGS_4 _POPARGS_3; popl %esi; L(POPSI1): +#define _POPARGS_4 _POPARGS_3; popl %esi; cfi_adjust_cfa_offset (-4); \ + cfi_restore (esi); L(POPSI1): #define PUSHARGS_5 _PUSHARGS_5 #define DOARGS_5 _DOARGS_5 (32) #define POPARGS_5 _POPARGS_5 -#define _PUSHARGS_5 pushl %edi; L(PUSHDI1): _PUSHARGS_4 +#define _PUSHARGS_5 pushl %edi; cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (edi, 0); L(PUSHDI1): _PUSHARGS_4 #define _DOARGS_5(n) movl n(%esp), %edi; _DOARGS_4 (n-4) -#define _POPARGS_5 _POPARGS_4; popl %edi; L(POPDI1): +#define _POPARGS_5 _POPARGS_4; popl %edi; cfi_adjust_cfa_offset (-4); \ + cfi_restore (edi); L(POPDI1): #define PUSHARGS_6 _PUSHARGS_6 #define DOARGS_6 _DOARGS_6 (36) #define POPARGS_6 _POPARGS_6 -#define _PUSHARGS_6 pushl %ebp; L(PUSHBP1): _PUSHARGS_5 +#define _PUSHARGS_6 pushl %ebp; cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (ebp, 0); L(PUSHBP1): _PUSHARGS_5 #define _DOARGS_6(n) movl n(%esp), %ebp; _DOARGS_5 (n-4) -#define _POPARGS_6 _POPARGS_5; popl %ebp; L(POPBP1): +#define _POPARGS_6 _POPARGS_5; popl %ebp; cfi_adjust_cfa_offset (-4); \ + cfi_restore (ebp); L(POPBP1): #else /* !__ASSEMBLER__ */ |