]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use macros for x86 PIC thunk names.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 3 Feb 2012 23:24:19 +0000 (23:24 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 3 Feb 2012 23:24:19 +0000 (23:24 +0000)
ChangeLog
sysdeps/i386/sysdep.h
sysdeps/unix/sysv/linux/i386/sysdep.h

index a78f20931bdbf9dcc81696d3ec6b3c32f1b5650f..22d6682dbdccc423cfcc3ac4d78f739d9c6d1719 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-03  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/i386/sysdep.h (GET_PC_THUNK, GET_PC_THUNK_STR): Define.
+       (SETUP_PIC_REG): Use GET_PC_THUNK.
+       * sysdeps/unix/sysv/linux/i386/sysdep.h: Use GET_PC_THUNK_STR
+       macro.
+
 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/i386/sysdep.h (SETUP_PIC_REG, LOAD_PIC_REG): Define also
index 577cf8d28b01779c1a3295590e8c04ba59867f6c..a31f5e772669a8cbfeeec2bce06ad3cf940923d5 100644 (file)
 
 #include <sysdeps/generic/sysdep.h>
 
+#ifdef __ASSEMBLER__
+# define GET_PC_THUNK(reg) __i686.get_pc_thunk.reg
+#else
+# define GET_PC_THUNK_STR(reg) "__i686.get_pc_thunk." #reg
+#endif
+
 #ifdef __ASSEMBLER__
 
 /* Syntactic details of assembler.  */
@@ -110,19 +116,19 @@ lose: SYSCALL_PIC_SETUP                                                         \
   END (name)
 
 # 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;                                           \
+  .ifndef GET_PC_THUNK(reg);                                                 \
+  .section .gnu.linkonce.t.GET_PC_THUNK(reg),"ax",@progbits;                 \
+  .globl GET_PC_THUNK(reg);                                                  \
+  .hidden GET_PC_THUNK(reg);                                                 \
   .p2align 4;                                                                \
-  .type __i686.get_pc_thunk.reg,@function;                                   \
-__i686.get_pc_thunk.reg:                                                     \
+  .type GET_PC_THUNK(reg),@function;                                         \
+GET_PC_THUNK(reg):                                                           \
   movl (%esp), %e##reg;                                                              \
   ret;                                                                       \
-  .size __i686.get_pc_thunk.reg, . - __i686.get_pc_thunk.reg;                \
+  .size GET_PC_THUNK(reg), . - GET_PC_THUNK(reg);                            \
   .previous;                                                                 \
   .endif;                                                                    \
-  call __i686.get_pc_thunk.reg
+  call GET_PC_THUNK(reg)
 
 # define LOAD_PIC_REG(reg) \
   SETUP_PIC_REG(reg); addl $_GLOBAL_OFFSET_TABLE_, %e##reg
index 64ef4008bcbd417cac80000c5b0a2857dd55a224..90660fdde74fe50e39e6d34c34575df7c1806b65 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007,2011
+/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007,2011-2012
        Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
@@ -514,17 +514,17 @@ asm (".L__X'%ebx = 1\n\t"
 # define check_consistency()                                                 \
   ({ int __res;                                                                      \
      __asm__ __volatile__                                                    \
-       ("call __i686.get_pc_thunk.cx;"                                       \
+       ("call "GET_PC_THUNK_STR(cx)";"                                       \
        "addl $_GLOBAL_OFFSET_TABLE_, %%ecx;"                                 \
        "subl %%ebx, %%ecx;"                                                  \
        "je 1f;"                                                              \
        "ud2;"                                                                \
        "1:\n"                                                                \
-       ".section .gnu.linkonce.t.__i686.get_pc_thunk.cx,\"ax\",@progbits;"   \
-       ".globl __i686.get_pc_thunk.cx;"                                      \
-       ".hidden __i686.get_pc_thunk.cx;"                                     \
-       ".type __i686.get_pc_thunk.cx,@function;"                             \
-       "__i686.get_pc_thunk.cx:"                                             \
+       ".section .gnu.linkonce.t."GET_PC_THUNK_STR(cx)",\"ax\",@progbits;"   \
+       ".globl "GET_PC_THUNK_STR(cx)";"                                      \
+       ".hidden "GET_PC_THUNK_STR(cx)";"                                     \
+       ".type "GET_PC_THUNK_STR(cx)",@function;"                             \
+       GET_PC_THUNK_STR(cx)":"                                               \
        "movl (%%esp), %%ecx;"                                                \
        "ret;"                                                                \
        ".previous"                                                           \