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.21-562-gddd85a6
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 7 Jul 2015 12:35:35 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-562-gddd85a6
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 ddd85a65b6e3d6ec1e756c1f78559f99a2c943ca (commit)
from fa9fef1f9b683582892fe39c4d8cd7b164b3388d (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ddd85a65b6e3d6ec1e756c1f78559f99a2c943ca
commit ddd85a65b6e3d6ec1e756c1f78559f99a2c943ca
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 7 05:23:24 2015 -0700
Add and use sysdeps/i386/link-defines.sym
Define macros for fields in La_i86_regs and La_i86_retval and use them
in dl-trampoline.S, instead of hardcoded values.
* sysdeps/i386/Makefile (gen-as-const-headers)[elf]: Add
link-defines.sym.
* sysdeps/i386/dl-trampoline.S: Include <link-defines.h>.
(_dl_runtime_profile): Use LONG_DOUBLE_SIZE, LRV_SIZE,
LRV_EAX_OFFSET, LRV_EDX_OFFSET, LRV_ST0_OFFSET, LRV_ST1_OFFSET
and LR_SIZE.
* sysdeps/i386/link-defines.sym: New file.
diff --git a/ChangeLog b/ChangeLog
index 7348ef4..35347e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2015-07-07 H.J. Lu <hongjiu.lu@intel.com>
+ * sysdeps/i386/Makefile (gen-as-const-headers)[elf]: Add
+ link-defines.sym.
+ * sysdeps/i386/dl-trampoline.S: Include <link-defines.h>.
+ (_dl_runtime_profile): Use LONG_DOUBLE_SIZE, LRV_SIZE,
+ LRV_EAX_OFFSET, LRV_EDX_OFFSET, LRV_ST0_OFFSET, LRV_ST1_OFFSET
+ and LR_SIZE.
+ * sysdeps/i386/link-defines.sym: New file.
+
+2015-07-07 H.J. Lu <hongjiu.lu@intel.com>
+
* sysdeps/i386/Makefile (tests)[elf]: Add tst-audit3.
(modules-names): Add tst-auditmod3a tst-auditmod3b.
($(objpfx)tst-audit3): New rule.
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index 910edff..11f425d 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -33,6 +33,7 @@ sysdep-CFLAGS += -mpreferred-stack-boundary=4
else
ifeq ($(subdir),csu)
sysdep-CFLAGS += -mpreferred-stack-boundary=4
+gen-as-const-headers += link-defines.sym
else
# Likewise, any function which calls user callbacks
uses-callbacks += -mpreferred-stack-boundary=4
diff --git a/sysdeps/i386/dl-trampoline.S b/sysdeps/i386/dl-trampoline.S
index f11972c..7c72b03 100644
--- a/sysdeps/i386/dl-trampoline.S
+++ b/sysdeps/i386/dl-trampoline.S
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <link-defines.h>
.text
.globl _dl_runtime_resolve
@@ -161,24 +162,32 @@ _dl_runtime_profile:
+4 free
%esp free
*/
- subl $20, %esp
- cfi_adjust_cfa_offset (20)
- movl %eax, (%esp)
- movl %edx, 4(%esp)
- fstpt 8(%esp)
- fstpt 20(%esp)
+#if LONG_DOUBLE_SIZE != 12
+# error "long double size must be 12 bytes"
+#endif
+ # Allocate space for La_i86_retval and subtract 12 free bytes.
+ subl $(LRV_SIZE - 12), %esp
+ cfi_adjust_cfa_offset (LRV_SIZE - 12)
+ movl %eax, LRV_EAX_OFFSET(%esp)
+ movl %edx, LRV_EDX_OFFSET(%esp)
+ fstpt LRV_ST0_OFFSET(%esp)
+ fstpt LRV_ST1_OFFSET(%esp)
pushl %esp
cfi_adjust_cfa_offset (4)
- leal 36(%esp), %ecx
- movl 56(%esp), %eax
- movl 60(%esp), %edx
+ # Address of La_i86_regs area.
+ leal (LRV_SIZE + 4)(%esp), %ecx
+ # PLT2
+ movl (LRV_SIZE + 4 + LR_SIZE)(%esp), %eax
+ # PLT1
+ movl (LRV_SIZE + 4 + LR_SIZE + 4)(%esp), %edx
call _dl_call_pltexit
- movl (%esp), %eax
- movl 4(%esp), %edx
- fldt 20(%esp)
- fldt 8(%esp)
- addl $60, %esp
- cfi_adjust_cfa_offset (-60)
+ movl LRV_EAX_OFFSET(%esp), %eax
+ movl LRV_EDX_OFFSET(%esp), %edx
+ fldt LRV_ST1_OFFSET(%esp)
+ fldt LRV_ST0_OFFSET(%esp)
+ # Restore stack before return.
+ addl $(LRV_SIZE + 4 + LR_SIZE + 4), %esp
+ cfi_adjust_cfa_offset (-(LRV_SIZE + 4 + LR_SIZE + 4))
ret
cfi_endproc
.size _dl_runtime_profile, .-_dl_runtime_profile
diff --git a/sysdeps/i386/link-defines.sym b/sysdeps/i386/link-defines.sym
new file mode 100644
index 0000000..a63dcb9
--- /dev/null
+++ b/sysdeps/i386/link-defines.sym
@@ -0,0 +1,18 @@
+#include "link.h"
+#include <stddef.h>
+
+--
+LONG_DOUBLE_SIZE sizeof (long double)
+
+LR_SIZE sizeof (struct La_i86_regs)
+LR_EDX_OFFSET offsetof (struct La_i86_regs, lr_edx)
+LR_ECX_OFFSET offsetof (struct La_i86_regs, lr_ecx)
+LR_EAX_OFFSET offsetof (struct La_i86_regs, lr_eax)
+LR_EBP_OFFSET offsetof (struct La_i86_regs, lr_ebp)
+LR_ESP_OFFSET offsetof (struct La_i86_regs, lr_esp)
+
+LRV_SIZE sizeof (struct La_i86_retval)
+LRV_EAX_OFFSET offsetof (struct La_i86_retval, lrv_eax)
+LRV_EDX_OFFSET offsetof (struct La_i86_retval, lrv_edx)
+LRV_ST0_OFFSET offsetof (struct La_i86_retval, lrv_st0)
+LRV_ST1_OFFSET offsetof (struct La_i86_retval, lrv_st1)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
sysdeps/i386/Makefile | 1 +
sysdeps/i386/dl-trampoline.S | 39 ++++++++++++++++++++++++---------------
sysdeps/i386/link-defines.sym | 18 ++++++++++++++++++
4 files changed, 53 insertions(+), 15 deletions(-)
create mode 100644 sysdeps/i386/link-defines.sym
hooks/post-receive
--
GNU C Library master sources