This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
Community source repository for glibc add-on ports branch, master, updated. glibc-2.11-35-g54b7103
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 29 Jan 2010 01:55:33 -0000
- Subject: Community source repository for glibc add-on ports branch, master, updated. glibc-2.11-35-g54b7103
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 "Community source repository for glibc add-on ports".
The branch, master has been updated
via 54b7103af4a93369e99a5df80d05dd6f70f17c0b (commit)
from fdefc0e1f176327cabedf4011673b3272321093e (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-ports.git;a=commitdiff;h=54b7103af4a93369e99a5df80d05dd6f70f17c0b
commit 54b7103af4a93369e99a5df80d05dd6f70f17c0b
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Jan 29 01:54:52 2010 +0000
Fix microMIPS glibc by avoiding hardcoded instruction length assumptions.
microMIPS is a variable-length encoding of the MIPS32 instruction set
(plus some extra instructions). As it supports almost all of MIPS32,
assembly sources in glibc do not generally need changes to work with
microMIPS, but dl-trampoline.c contains some code with a hardcoded
assumption that three instructions occupy twelve bytes. This patch
fixes this code for microMIPS by using the difference between two
labels to let the assembler calculate the relevant length.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 5795926..6d47986 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2010-01-28 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/dl-trampoline.c (_dl_runtime_resolve,
+ _dl_runtime_pltresolve): Calculate offset from start of function
+ to .cpload instead of hardcoding instruction size.
+
2010-01-11 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/stat.h: Fix double-inclusion
diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c
index ff58b0d..2c94140 100644
--- a/sysdeps/mips/dl-trampoline.c
+++ b/sysdeps/mips/dl-trampoline.c
@@ -278,13 +278,13 @@ _dl_runtime_resolve:\n\
.frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n\
.set noreorder\n\
# Save GP.\n\
- move $3, $28\n\
+1: move $3, $28\n\
# Save arguments and sp value in stack.\n\
" STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\
# Modify t9 ($25) so as to point .cpload instruction.\n\
- " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\
+ " IFABIO32(STRINGXP(PTR_ADDIU) " $25, (2f-1b)\n") "\
# Compute GP.\n\
- " STRINGXP(SETUP_GP) "\n\
+2: " STRINGXP(SETUP_GP) "\n\
" STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n\
.set reorder\n\
# Save slot call pc.\n\
@@ -334,13 +334,13 @@ _dl_runtime_pltresolve:\n\
.frame $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) ", $31\n\
.set noreorder\n\
# Save arguments and sp value in stack.\n\
- " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\
+1: " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\
" IFABIO32(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($28)") "\n\
" IFNEWABI(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($14)") "\n\
# Modify t9 ($25) so as to point .cpload instruction.\n\
- " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\
+ " IFABIO32(STRINGXP(PTR_ADDIU) " $25, (2f-1b)\n") "\
# Compute GP.\n\
- " STRINGXP(SETUP_GP) "\n\
+2: " STRINGXP(SETUP_GP) "\n\
" STRINGXV(SETUP_GP64 (0, _dl_runtime_pltresolve)) "\n\
.set reorder\n\
" IFABIO32(STRINGXP(CPRESTORE(32))) "\n\
-----------------------------------------------------------------------
Summary of changes:
ChangeLog.mips | 6 ++++++
sysdeps/mips/dl-trampoline.c | 12 ++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
hooks/post-receive
--
Community source repository for glibc add-on ports