diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-02-06 18:05:54 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-02-06 18:05:54 +0000 |
commit | 314054eaef2aec965d2f1bced7e86abca118463e (patch) | |
tree | c03cbc61bd1fa1c67fff971903fafca1088a3df3 /sysdeps | |
parent | d8e0ca509a83e832123f6ab508fce620159fb2dc (diff) | |
download | glibc-314054eaef2aec965d2f1bced7e86abca118463e.zip glibc-314054eaef2aec965d2f1bced7e86abca118463e.tar.gz glibc-314054eaef2aec965d2f1bced7e86abca118463e.tar.bz2 |
Match x86 PIC thunk names to compiler version.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/i386/sysdep.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h index 2c0aafa..1dbb8e1 100644 --- a/sysdeps/i386/sysdep.h +++ b/sysdeps/i386/sysdep.h @@ -20,10 +20,23 @@ #include <sysdeps/generic/sysdep.h> -#ifdef __ASSEMBLER__ -# define GET_PC_THUNK(reg) __i686.get_pc_thunk.reg +#include <features.h> /* For __GNUC_PREREQ. */ + +/* It is desirable that the names of PIC thunks match those used by + GCC so that multiple copies are eliminated by the linker. */ + +#ifdef __ASSEMBLER__ +# if __GNUC_PREREQ (4, 7) +# define GET_PC_THUNK(reg) __x86.get_pc_thunk.reg +# else +# define GET_PC_THUNK(reg) __i686.get_pc_thunk.reg +# endif #else -# define GET_PC_THUNK_STR(reg) "__i686.get_pc_thunk." #reg +# if __GNUC_PREREQ (4, 7) +# define GET_PC_THUNK_STR(reg) "__x86.get_pc_thunk." #reg +# else +# define GET_PC_THUNK_STR(reg) "__i686.get_pc_thunk." #reg +# endif #endif #ifdef __ASSEMBLER__ |