diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | sysdeps/i386/sysdep.h | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/socket.S | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 30 |
5 files changed, 38 insertions, 15 deletions
@@ -1,5 +1,10 @@ 2005-04-28 Ulrich Drepper <drepper@redhat.com> + * 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. + * configure.in: Remove ultrasparc names. * sysdeps/i386/i686/memcmp.S: Move misplaced END. @@ -1976,9 +1976,9 @@ sparcv8plus | sparcv8plusa | sparcv9) base_machine=sparc machine=sparc/sparc32/sparcv9 ;; sparcv8plusb | sparcv9b) base_machine=sparc machine=sparc/sparc32/sparcv9b ;; -sparc64 | ultrasparc) +sparc64) base_machine=sparc machine=sparc/sparc64 ;; -sparc64b | ultrasparc3) +sparc64b) base_machine=sparc machine=sparc/sparc64/sparcv9b ;; thumb*) base_machine=thumb machine=arm/thumb/$machine ;; *) base_machine=$machine ;; diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h index e955b43..6c1df24 100644 --- a/sysdeps/i386/sysdep.h +++ b/sysdeps/i386/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for i386. - Copyright (C) 1991,92,93,95,96,98,2002,2003 Free Software Foundation, Inc. + Copyright (C) 1991-93,95,96,98,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 @@ -57,10 +57,12 @@ .align ALIGNARG(4); \ STABS_FUN(name) \ C_LABEL(name) \ + cfi_startproc; \ CALL_MCOUNT #undef END #define END(name) \ + cfi_endproc; \ ASM_SIZE_DIRECTIVE(name) \ STABS_FUN_END(name) @@ -92,7 +94,9 @@ /* The mcount code relies on a normal frame pointer being on the stack to locate our caller, so push one just for its benefit. */ #define CALL_MCOUNT \ - pushl %ebp; movl %esp, %ebp; call JUMPTARGET(mcount); popl %ebp; + pushl %ebp; cfi_adjust_cfa_offset (4); \ movl %esp, %ebp; \ + cfi_def_cfa_register (ebp); call JUMPTARGET(mcount); \ + popl %ebp; cfi_def_cfa (esp, 4); #else #define CALL_MCOUNT /* Do nothing. */ #endif @@ -122,8 +126,10 @@ lose: SYSCALL_PIC_SETUP \ #define JUMPTARGET(name) name##@PLT #define SYSCALL_PIC_SETUP \ pushl %ebx; \ + cfi_adjust_cfa_offset (4); \ call 0f; \ 0: popl %ebx; \ + cfi_adjust_cfa_offset (-4); \ addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx; #else #define JUMPTARGET(name) name diff --git a/sysdeps/unix/sysv/linux/i386/socket.S b/sysdeps/unix/sysv/linux/i386/socket.S index e403899..7c8ac29 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 6bea9d2..d64d0a3 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__ */ |