about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-06-20 15:59:03 +0000
committerJakub Jelinek <jakub@redhat.com>2005-06-20 15:59:03 +0000
commit27424b29289a49958e62450203f33a57dc1465e2 (patch)
tree7045409bd7d383127ecac0f78325a2a035b3f754 /sysdeps/i386
parent841d8c3466e6472c9cd16ee5bff701ba0380998a (diff)
downloadglibc-27424b29289a49958e62450203f33a57dc1465e2.tar.gz
glibc-27424b29289a49958e62450203f33a57dc1465e2.tar.xz
glibc-27424b29289a49958e62450203f33a57dc1465e2.zip
Updated to fedora-glibc-20050620T1530
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/backtrace.c3
-rw-r--r--sysdeps/i386/i386-mcount.S2
-rw-r--r--sysdeps/i386/sysdep.h27
3 files changed, 30 insertions, 2 deletions
diff --git a/sysdeps/i386/backtrace.c b/sysdeps/i386/backtrace.c
index cb7530396b..8b61913dde 100644
--- a/sysdeps/i386/backtrace.c
+++ b/sysdeps/i386/backtrace.c
@@ -1,5 +1,5 @@
 /* Return backtrace of current program state.
-   Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -141,3 +141,4 @@ __backtrace (array, size)
   return arg.cnt != -1 ? arg.cnt : 0;
 }
 weak_alias (__backtrace, backtrace)
+libc_hidden_def (__backtrace)
diff --git a/sysdeps/i386/i386-mcount.S b/sysdeps/i386/i386-mcount.S
index 727d7a0ab8..8b11adb2e3 100644
--- a/sysdeps/i386/i386-mcount.S
+++ b/sysdeps/i386/i386-mcount.S
@@ -52,4 +52,4 @@ C_LABEL(_mcount)
 	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(_mcount))
 
 #undef mcount
-weak_alias(_mcount, mcount)
+weak_alias (_mcount, mcount)
diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
index 56ba304328..2739cb00b3 100644
--- a/sysdeps/i386/sysdep.h
+++ b/sysdeps/i386/sysdep.h
@@ -131,6 +131,33 @@ lose: SYSCALL_PIC_SETUP							      \
 0:  popl %ebx;								      \
     cfi_adjust_cfa_offset (-4);						      \
     addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx;
+
+# ifndef HAVE_HIDDEN
+#  define SETUP_PIC_REG(reg) \
+  call 1f;								      \
+  .subsection 1;							      \
+1:movl (%esp), %e##reg;							      \
+  ret;									      \
+  .previous
+# else
+#  define SETUP_PIC_REG(reg) \
+  .ifndef __i686.get_pc_thunk.reg;					      \
+  .section .gnu.linkonce.t.__i686.get_pc_thunk.reg,"ax",@progbits;	      \
+  .globl __i686.get_pc_thunk.reg;					      \
+  .hidden __i686.get_pc_thunk.reg;					      \
+  .type __i686.get_pc_thunk.reg,@function;				      \
+__i686.get_pc_thunk.reg:						      \
+  movl (%esp), %e##reg;							      \
+  ret;									      \
+  .size __i686.get_pc_thunk.reg, . - __i686.get_pc_thunk.reg;		      \
+  .previous;								      \
+  .endif;								      \
+  call __i686.get_pc_thunk.reg
+# endif
+
+# define LOAD_PIC_REG(reg) \
+  SETUP_PIC_REG(reg); addl $_GLOBAL_OFFSET_TABLE_, %e##reg
+
 #else
 #define JUMPTARGET(name)	name
 #define SYSCALL_PIC_SETUP	/* Nothing.  */