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.14-177-gc5305d8
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 17 Aug 2011 14:31:49 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.14-177-gc5305d8
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 c5305d88c7dc519edfaf55eed8d026a9038d7978 (commit)
from 2772459841f32f2d5866672145f533975ebec717 (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=c5305d88c7dc519edfaf55eed8d026a9038d7978
commit c5305d88c7dc519edfaf55eed8d026a9038d7978
Author: Ulrich Drepper <drepper@gmail.com>
Date: Wed Aug 17 10:31:15 2011 -0400
Fix some problem of 32-bit pldd on 64-bit platforms
diff --git a/ChangeLog b/ChangeLog
index ffb2ad3..6aa670d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-08-17 Ulrich Drepper <drepper@gmail.com>
+ * elf/pldd-xx.c (r_debug): Explicitly add padding when needed.
+ * elf/pldd.c (get_process_info): Use pread to re-read auxiliary vector
+ if buffer was too small.
+
* elf/pldd.c (main): Attach to all threads in the process.
Rewrite /proc handling to use *at functions.
diff --git a/elf/pldd-xx.c b/elf/pldd-xx.c
index 0e3fcb7..59419bc 100644
--- a/elf/pldd-xx.c
+++ b/elf/pldd-xx.c
@@ -64,6 +64,9 @@ static_assert (next, (offsetof (struct libname_list, next)
struct E(r_debug)
{
int r_version;
+#if CLASS == 64
+ int pad;
+#endif
EW(Addr) r_map;
};
#if CLASS == __ELF_NATIVE_CLASS
@@ -75,6 +78,7 @@ static_assert (r_map, (offsetof (struct r_debug, r_map)
static int
+
E(find_maps) (pid_t pid, EW(Ehdr) *ehdr, void *auxv, size_t auxv_size)
{
EW(Addr) phdr = 0;
@@ -97,6 +101,7 @@ E(find_maps) (pid_t pid, EW(Ehdr) *ehdr, void *auxv, size_t auxv_size)
default:
break;
}
+ printf("progam header at offset %lu\n", (unsigned long)phdr);
if (phdr == 0 || phnum == 0 || phent == 0)
error (EXIT_FAILURE, 0, gettext ("cannot find program header of process"));
diff --git a/elf/pldd.c b/elf/pldd.c
index ef3621c..29879f7 100644
--- a/elf/pldd.c
+++ b/elf/pldd.c
@@ -274,7 +274,7 @@ get_process_info (int dfd, long int pid)
auxv_size += 512;
auxv = xrealloc (auxv, auxv_size);
- ssize_t n = read (fd, auxv, auxv_size);
+ ssize_t n = pread (fd, auxv, auxv_size, 0);
if (n < 0)
goto no_info;
if (n < auxv_size)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
elf/pldd-xx.c | 5 +++++
elf/pldd.c | 2 +-
3 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources