This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.14-232-g6585cb6


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  6585cb60ee7aafc3301c402dda12d6771dfb7fa3 (commit)
      from  6d18b67f4df2db7ceb315a264ad43a27d86ba697 (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=6585cb60ee7aafc3301c402dda12d6771dfb7fa3

commit 6585cb60ee7aafc3301c402dda12d6771dfb7fa3
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Sep 5 21:49:14 2011 -0400

    Remove unused parameter in pldd and simplify ELF handling

diff --git a/ChangeLog b/ChangeLog
index 299f86b..3f8a821 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-05  Ulrich Drepper  <drepper@gmail.com>
+
+	* elf/pldd.c (get_process_info): Don't read whole ELF header, just
+	e_ident.  Don't pass to find_mapsXX.
+	* elf/pldd-xx.c (find_mapsXX): Remove second parameter.
+
 2011-07-20  Liubov Dmitrieva  <liubov.dmitrieva@intel.com>
 
 	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
diff --git a/elf/pldd-xx.c b/elf/pldd-xx.c
index 59419bc..8ecd468 100644
--- a/elf/pldd-xx.c
+++ b/elf/pldd-xx.c
@@ -79,7 +79,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)
+E(find_maps) (pid_t pid, void *auxv, size_t auxv_size)
 {
   EW(Addr) phdr = 0;
   unsigned int phnum = 0;
diff --git a/elf/pldd.c b/elf/pldd.c
index 29879f7..e97d96a 100644
--- a/elf/pldd.c
+++ b/elf/pldd.c
@@ -247,17 +247,13 @@ get_process_info (int dfd, long int pid)
       return EXIT_FAILURE;
     }
 
-  union
-  {
-    Elf32_Ehdr ehdr32;
-    Elf64_Ehdr ehdr64;
-  } uehdr;
-  if (read (fd, &uehdr, sizeof (uehdr)) != sizeof (uehdr))
+  char e_ident[EI_NIDENT];
+  if (read (fd, e_ident, EI_NIDENT) != EI_NIDENT)
     goto no_info;
 
   close (fd);
 
-  if (memcmp (uehdr.ehdr32.e_ident, ELFMAG, SELFMAG) != 0)
+  if (memcmp (e_ident, ELFMAG, SELFMAG) != 0)
     {
       error (0, 0, gettext ("process %lu is no ELF program"), pid);
       return EXIT_FAILURE;
@@ -287,10 +283,10 @@ get_process_info (int dfd, long int pid)
   close (fd);
 
   int retval;
-  if (uehdr.ehdr32.e_ident[EI_CLASS] == ELFCLASS32)
-    retval = find_maps32 (pid, &uehdr.ehdr32, auxv, auxv_size);
+  if (e_ident[EI_CLASS] == ELFCLASS32)
+    retval = find_maps32 (pid, auxv, auxv_size);
   else
-    retval = find_maps64 (pid, &uehdr.ehdr64, auxv, auxv_size);
+    retval = find_maps64 (pid, auxv, auxv_size);
 
   free (auxv);
   close (memfd);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    6 ++++++
 elf/pldd-xx.c |    2 +-
 elf/pldd.c    |   16 ++++++----------
 3 files changed, 13 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]