This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-138-gd8e0ca5
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 5 Feb 2012 14:34:57 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-138-gd8e0ca5
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via d8e0ca509a83e832123f6ab508fce620159fb2dc (commit)
from b1da7dd99dcffe28d02a6515a9dc8cca3205a497 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d8e0ca509a83e832123f6ab508fce620159fb2dc
commit d8e0ca509a83e832123f6ab508fce620159fb2dc
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sun Feb 5 14:34:14 2012 +0000
Use macro for PIC setup in inline asm.
diff --git a/ChangeLog b/ChangeLog
index 22d6682..1925407 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-05 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/i386/sysdep.h (SETUP_PIC_REG_STR, LOAD_PIC_REG_STR):
+ Define.
+ * sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Use
+ LOAD_PIC_REG_STR.
+
2012-02-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/i386/sysdep.h (GET_PC_THUNK, GET_PC_THUNK_STR): Define.
diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
index a31f5e7..2c0aafa 100644
--- a/sysdeps/i386/sysdep.h
+++ b/sysdeps/i386/sysdep.h
@@ -156,4 +156,24 @@ GET_PC_THUNK(reg): \
#define atom_text_section .section ".text.atom", "ax"
+#else /* __ASSEMBLER__ */
+
+# define SETUP_PIC_REG_STR(reg) \
+ ".ifndef " GET_PC_THUNK_STR (reg) "\n" \
+ ".section .gnu.linkonce.t." GET_PC_THUNK_STR (reg) ",\"ax\",@progbits\n" \
+ ".globl " GET_PC_THUNK_STR (reg) "\n" \
+ ".hidden " GET_PC_THUNK_STR (reg) "\n" \
+ ".p2align 4\n" \
+ ".type " GET_PC_THUNK_STR (reg) ",@function\n" \
+GET_PC_THUNK_STR (reg) ":" \
+ "movl (%%esp), %%e" #reg "\n" \
+ "ret\n" \
+ ".size " GET_PC_THUNK_STR (reg) ", . - " GET_PC_THUNK_STR (reg) "\n" \
+ ".previous\n" \
+ ".endif\n" \
+ "call " GET_PC_THUNK_STR (reg)
+
+# define LOAD_PIC_REG_STR(reg) \
+ SETUP_PIC_REG_STR (reg) "\naddl $_GLOBAL_OFFSET_TABLE_, %%e" #reg
+
#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index 90660fd..1dded7a 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -514,20 +514,11 @@ asm (".L__X'%ebx = 1\n\t"
# define check_consistency() \
({ int __res; \
__asm__ __volatile__ \
- ("call "GET_PC_THUNK_STR(cx)";" \
- "addl $_GLOBAL_OFFSET_TABLE_, %%ecx;" \
+ (LOAD_PIC_REG_STR (cx) ";" \
"subl %%ebx, %%ecx;" \
"je 1f;" \
"ud2;" \
"1:\n" \
- ".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" \
: "=c" (__res)); \
__res; })
#endif
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
sysdeps/i386/sysdep.h | 20 ++++++++++++++++++++
sysdeps/unix/sysv/linux/i386/sysdep.h | 11 +----------
3 files changed, 28 insertions(+), 10 deletions(-)
hooks/post-receive
--
GNU C Library master sources