This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, davem/sparc, updated. glibc-2.11-219-g34a407d
- From: davem at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 20 Feb 2010 21:47:50 -0000
- Subject: GNU C Library master sources branch, davem/sparc, updated. glibc-2.11-219-g34a407d
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, davem/sparc has been updated
via 34a407de9661ff8e938d152445b750becb247f7c (commit)
via 2daff75bab89a597b2a29bc6f3c7f88e12352355 (commit)
via 5c866a8b9be0bd8dff97dd8143e55dd228617c23 (commit)
via 1d204bf2945617be272f88ee233adbceeffd5315 (commit)
from 199428c19774c12b3c4b6e6486ea9d4a021288af (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=34a407de9661ff8e938d152445b750becb247f7c
commit 34a407de9661ff8e938d152445b750becb247f7c
Author: David S. Miller <davem@davemloft.net>
Date: Sat Feb 20 13:43:09 2010 -0800
sparc: Fix 32-bit makecontext arg passing.
test-makecontext3 fails because we fill in the argument
stack slots past the 5th using the wrong index.
diff --git a/ChangeLog b/ChangeLog
index 8b91c5f..ac36832 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,10 @@
* sysdeps/sparc/sparc64/memchr.S: Use unsigned branch on greater to
test end of buffer.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c
+ (__makecontext): Adjust arg counter properly when copying arg
+ stack slots.
+
2009-02-20 Joseph Myers <joseph@codesourcery.com>
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_runtime_setup):
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c b/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c
index 9b48dad..bcf63db 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/makecontext.c
@@ -77,7 +77,7 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
if (i < 6)
ucp->uc_mcontext.gregs[REG_O0 + i] = arg;
else
- sp[i + 23] = arg;
+ sp[i + 23 - 6] = arg;
}
va_end (ap);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2daff75bab89a597b2a29bc6f3c7f88e12352355
commit 2daff75bab89a597b2a29bc6f3c7f88e12352355
Author: David S. Miller <davem@davemloft.net>
Date: Sat Feb 20 13:42:07 2010 -0800
sparc: Fix v9 memchr with long buffer lengths.
test-memchr fails on 32-bit sparc with v9 optimized memchr because
it uses signed branch comparisons on the buffer pointers.
diff --git a/ChangeLog b/ChangeLog
index cd1be57..8b91c5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup):
Adjust rela->r_offset by l->l_addr when rewriting PLT.
+ * sysdeps/sparc/sparc64/memchr.S: Use unsigned branch on greater to
+ test end of buffer.
+
2009-02-20 Joseph Myers <joseph@codesourcery.com>
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_runtime_setup):
diff --git a/sysdeps/sparc/sparc64/memchr.S b/sysdeps/sparc/sparc64/memchr.S
index 4f13cb5..ab1666b 100644
--- a/sysdeps/sparc/sparc64/memchr.S
+++ b/sysdeps/sparc/sparc64/memchr.S
@@ -96,7 +96,7 @@ ENTRY(__memchr)
* %o4 = value XOR c */
2: cmp %o0, %o2 /* IEU1 Group */
- bg,pn %XCC, 11f /* CTI */
+ bgu,pn %XCC, 11f /* CTI */
ldxa [%o0] ASI_PNF, %o3 /* Load */
sub %o4, %g1, %o5 /* IEU0 Group */
add %o0, 8, %o0 /* IEU1 */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c866a8b9be0bd8dff97dd8143e55dd228617c23
commit 5c866a8b9be0bd8dff97dd8143e55dd228617c23
Author: David S. Miller <davem@davemloft.net>
Date: Sat Feb 20 13:40:59 2010 -0800
Fix PLT rewrite when prelinking fails on 32-bit sparc.
When prelinking fails we have to rewrite the PLT, but the code
doing so forgets to adjust all rela->r_offset addresses by the
location of where the object was actually mapped.
diff --git a/ChangeLog b/ChangeLog
index 8532732..cd1be57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-20 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup):
+ Adjust rela->r_offset by l->l_addr when rewriting PLT.
+
2009-02-20 Joseph Myers <joseph@codesourcery.com>
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_runtime_setup):
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index e1385f7..5325710 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -166,15 +166,19 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
in .rela.plt. */
while (rela < relaend)
{
- *(unsigned int *) rela->r_offset
- = OPCODE_SETHI_G1 | (rela->r_offset - (Elf32_Addr) plt);
- *(unsigned int *) (rela->r_offset + 4)
+ *(unsigned int *) (rela->r_offset + l->l_addr)
+ = OPCODE_SETHI_G1 | (rela->r_offset + l->l_addr
+ - (Elf32_Addr) plt);
+ *(unsigned int *) (rela->r_offset + l->l_addr + 4)
= OPCODE_BA | ((((Elf32_Addr) plt
- - rela->r_offset - 4) >> 2) & 0x3fffff);
+ - rela->r_offset - l->l_addr - 4) >> 2)
+ & 0x3fffff);
if (do_flush)
{
- __asm __volatile ("flush %0" : : "r"(rela->r_offset));
- __asm __volatile ("flush %0+4" : : "r"(rela->r_offset));
+ __asm __volatile ("flush %0" : : "r" (rela->r_offset
+ + l->l_addr));
+ __asm __volatile ("flush %0+4" : : "r" (rela->r_offset
+ + l->l_addr));
}
++rela;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d204bf2945617be272f88ee233adbceeffd5315
commit 1d204bf2945617be272f88ee233adbceeffd5315
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat Feb 20 13:39:58 2010 -0800
Fix PLT rewrite when prelinking fails on 64-bit sparc.
When prelinking fails we have to rewrite the PLT, but the code
doing so forgets to adjust all rela->r_offset addresses by the
location of where the object was actually mapped.
diff --git a/ChangeLog b/ChangeLog
index 1044b4d..8532732 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_runtime_setup):
+ Adjust rela->r_offset by l->l_addr when rewriting PLT.
+
2010-02-19 Carl Fredrik Hammar <hammy.lite@gmail.com>
* hurd/hurdioctl.c (tiocsctty): Call `do_tiocsctty' instead of
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index b4f43e9..4c915eb 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent ELF dynamic relocation inline functions. Sparc64 version.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2010 Free Software Foundation, Inc.
+ 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -227,7 +227,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
if (__builtin_expect (rela->r_addend, 0) != 0)
{
- Elf64_Addr slot = ((rela->r_offset + 0x400
+ Elf64_Addr slot = ((rela->r_offset + l->l_addr + 0x400
- (Elf64_Addr) plt)
/ 0x1400) * 0x1400
+ (Elf64_Addr) plt - 0x400;
@@ -235,20 +235,23 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
unsigned int first_ldx = *(unsigned int *)(slot + 12);
Elf64_Addr ptr = slot + (first_ldx & 0xfff) + 4;
- *(Elf64_Addr *) rela->r_offset
+ *(Elf64_Addr *) (rela->r_offset + l->l_addr)
= (Elf64_Addr) plt
- - (slot + ((rela->r_offset - ptr) / 8) * 24 + 4);
+ - (slot + ((rela->r_offset + l->l_addr - ptr) / 8) * 24
+ + 4);
++rela;
continue;
}
- *(unsigned int *) rela->r_offset
- = 0x03000000 | (rela->r_offset - (Elf64_Addr) plt);
- *(unsigned int *) (rela->r_offset + 4)
- = 0x30680000 | ((((Elf64_Addr) plt + 32
- - rela->r_offset - 4) >> 2) & 0x7ffff);
- __asm __volatile ("flush %0" : : "r" (rela->r_offset));
- __asm __volatile ("flush %0+4" : : "r" (rela->r_offset));
+ *(unsigned int *) (rela->r_offset + l->l_addr)
+ = 0x03000000 | (rela->r_offset + l->l_addr - (Elf64_Addr) plt);
+ *(unsigned int *) (rela->r_offset + l->l_addr + 4)
+ = 0x30680000 | ((((Elf64_Addr) plt + 32 - rela->r_offset
+ - l->l_addr - 4) >> 2) & 0x7ffff);
+ __asm __volatile ("flush %0" : : "r" (rela->r_offset
+ + l->l_addr));
+ __asm __volatile ("flush %0+4" : : "r" (rela->r_offset
+ + l->l_addr));
++rela;
}
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 17 +++++++++++++
sysdeps/sparc/sparc32/dl-machine.h | 16 ++++++++----
sysdeps/sparc/sparc64/dl-machine.h | 25 +++++++++++--------
sysdeps/sparc/sparc64/memchr.S | 2 +-
.../unix/sysv/linux/sparc/sparc32/makecontext.c | 2 +-
5 files changed, 43 insertions(+), 19 deletions(-)
hooks/post-receive
--
GNU C Library master sources