From 62d01985e9bd245ec382d2bfbe340ae7067b6be3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 28 Apr 2005 21:11:47 +0000 Subject: * 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. --- sysdeps/i386/sysdep.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sysdeps/i386/sysdep.h') 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 -- cgit v1.1