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-869-g6cdef1a
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 15 May 2012 00:50:59 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-869-g6cdef1a
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 6cdef1ab3666b1a0e9c5b3892970bd2fc8211bf8 (commit)
from 245a11d7bd3bc44cd2b9f8598516287393705f76 (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=6cdef1ab3666b1a0e9c5b3892970bd2fc8211bf8
commit 6cdef1ab3666b1a0e9c5b3892970bd2fc8211bf8
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon May 14 17:50:41 2012 -0700
Update sysdeps/x86_64/start.S for x32
diff --git a/ChangeLog b/ChangeLog
index 538c5b2..0d14592 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
+ * sysdeps/x86_64/start.S: Simulate popping 4-byte argument
+ count for x32. Use R*_LP and omit operand-size suffix.
+
+2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
+
* shlib-versions: Move x86_64-.*-linux.* entries to ...
* sysdeps/x86_64/64/shlib-versions: Here. New file.
* sysdeps/x86_64/x32/shlib-versions: New file.
diff --git a/sysdeps/x86_64/start.S b/sysdeps/x86_64/start.S
index 5e01d21..e603463 100644
--- a/sysdeps/x86_64/start.S
+++ b/sysdeps/x86_64/start.S
@@ -44,13 +44,13 @@
before this code runs.
%rsp The stack contains the arguments and environment:
- 0(%rsp) argc
- 8(%rsp) argv[0]
+ 0(%rsp) argc
+ LP_SIZE(%rsp) argv[0]
...
- (8*argc)(%rsp) NULL
- (8*(argc+1))(%rsp) envp[0]
+ (LP_SIZE*argc)(%rsp) NULL
+ (LP_SIZE*(argc+1))(%rsp) envp[0]
...
- NULL
+ NULL
*/
#include <sysdep.h>
@@ -81,14 +81,21 @@ _start:
rtld_fini: %r9
stack_end: stack. */
- movq %rdx, %r9 /* Address of the shared library termination
+ mov %RDX_LP, %R9_LP /* Address of the shared library termination
function. */
+#ifdef __ILP32__
+ mov (%rsp), %esi /* Simulate popping 4-byte argument count. */
+ add $4, %esp
+#else
popq %rsi /* Pop the argument count. */
- movq %rsp, %rdx /* argv starts just at the current stack top. */
+#endif
+ /* argv starts just at the current stack top. */
+ mov %RSP_LP, %RDX_LP
/* Align the stack to a 16 byte boundary to follow the ABI. */
- andq $~15, %rsp
+ and $~15, %RSP_LP
- pushq %rax /* Push garbage because we push 8 more bytes. */
+ /* Push garbage because we push 8 more bytes. */
+ pushq %rax
/* Provide the highest stack address to the user code (for stacks
which grow downwards). */
@@ -96,20 +103,20 @@ _start:
#ifdef SHARED
/* Pass address of our own entry points to .fini and .init. */
- movq __libc_csu_fini@GOTPCREL(%rip), %r8
- movq __libc_csu_init@GOTPCREL(%rip), %rcx
+ mov __libc_csu_fini@GOTPCREL(%rip), %R8_LP
+ mov __libc_csu_init@GOTPCREL(%rip), %RCX_LP
- movq BP_SYM (main)@GOTPCREL(%rip), %rdi
+ mov BP_SYM (main)@GOTPCREL(%rip), %RDI_LP
/* Call the user's main function, and exit with its value.
But let the libc call main. */
call BP_SYM (__libc_start_main)@PLT
#else
/* Pass address of our own entry points to .fini and .init. */
- movq $__libc_csu_fini, %r8
- movq $__libc_csu_init, %rcx
+ mov $__libc_csu_fini, %R8_LP
+ mov $__libc_csu_init, %RCX_LP
- movq $BP_SYM (main), %rdi
+ mov $BP_SYM (main), %RDI_LP
/* Call the user's main function, and exit with its value.
But let the libc call main. */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
sysdeps/x86_64/start.S | 37 ++++++++++++++++++++++---------------
2 files changed, 27 insertions(+), 15 deletions(-)
hooks/post-receive
--
GNU C Library master sources