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 google/grte/v5-2.27/master updated. glibc-2.27-79-g2a5d5a4


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, google/grte/v5-2.27/master has been updated
       via  2a5d5a4953b4fed35ce884261f5f31776c26a6ef (commit)
       via  bc386ac6d8c953c2cb5e7194f5ef94bf0ce340b8 (commit)
       via  c0342bb26e0251dc2d7ca00a884ea831705e32b4 (commit)
       via  3c96f7985f0c0eb5dce4b2927df895880bdb0cf4 (commit)
      from  7f30d0cc343da69d4be79f338615baaca5c94b9e (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2a5d5a4953b4fed35ce884261f5f31776c26a6ef

commit 2a5d5a4953b4fed35ce884261f5f31776c26a6ef
Author: Stan Shebs <stanshebs@google.com>
Date:   Thu Mar 29 11:50:34 2018 -0700

    Remove a newline

diff --git a/elf/Makefile b/elf/Makefile
index 52042c6..8f16690 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -1466,4 +1466,3 @@ $(objpfx)tst-dlopen-offset-comb.so: $(objpfx)tst-dlopen-offset-mod1.so $(objpfx)
 	dd if=$(objpfx)tst-dlopen-offset-mod1.so of=$(objpfx)tst-dlopen-offset-comb.so bs=1024 seek=64
 	dd if=$(objpfx)tst-dlopen-offset-mod2.so of=$(objpfx)tst-dlopen-offset-comb.so bs=1024 seek=128
 	dd if=$(objpfx)tst-dlopen-offset-mod3.so of=$(objpfx)tst-dlopen-offset-comb.so bs=1024 seek=192
-

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc386ac6d8c953c2cb5e7194f5ef94bf0ce340b8

commit bc386ac6d8c953c2cb5e7194f5ef94bf0ce340b8
Author: Stan Shebs <stanshebs@google.com>
Date:   Thu Mar 29 11:48:37 2018 -0700

    Add basic testsuite for dlopen_with_offset

diff --git a/elf/Makefile b/elf/Makefile
index f1fda1d..52042c6 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -180,6 +180,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \
 	 tst-tls16 tst-tls17 tst-tls18 tst-tls19 tst-tls-dlinfo \
 	 tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
 	 tst-dlmodcount tst-dlopenrpath tst-deep1 \
+	 tst-dlopen-offset \
 	 tst-dlmopen1 tst-dlmopen3 \
 	 unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
 	 tst-audit1 tst-audit2 tst-audit8 tst-audit9 \
@@ -277,6 +278,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 		tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12 \
 		tst-latepthreadmod $(tst-tls-many-dynamic-modules) \
 		tst-nodelete-dlclose-dso tst-nodelete-dlclose-plugin \
+		tst-dlopen-offset-mod1 tst-dlopen-offset-mod2 tst-dlopen-offset-mod3 \
 		tst-main1mod tst-libc_dlvsym-dso
 ifeq (yes,$(have-mtls-dialect-gnu2))
 tests += tst-gnu2-tls1
@@ -1457,3 +1459,11 @@ $(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a
 tst-libc_dlvsym-static-ENV = \
   LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
 $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
+
+$(objpfx)tst-dlopen-offset: $(libdl)
+$(objpfx)tst-dlopen-offset.out: $(objpfx)tst-dlopen-offset-comb.so
+$(objpfx)tst-dlopen-offset-comb.so: $(objpfx)tst-dlopen-offset-mod1.so $(objpfx)tst-dlopen-offset-mod2.so $(objpfx)tst-dlopen-offset-mod3.so
+	dd if=$(objpfx)tst-dlopen-offset-mod1.so of=$(objpfx)tst-dlopen-offset-comb.so bs=1024 seek=64
+	dd if=$(objpfx)tst-dlopen-offset-mod2.so of=$(objpfx)tst-dlopen-offset-comb.so bs=1024 seek=128
+	dd if=$(objpfx)tst-dlopen-offset-mod3.so of=$(objpfx)tst-dlopen-offset-comb.so bs=1024 seek=192
+
diff --git a/elf/tst-dlopen-offset-mod1.c b/elf/tst-dlopen-offset-mod1.c
new file mode 100644
index 0000000..e46ced8
--- /dev/null
+++ b/elf/tst-dlopen-offset-mod1.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+int
+foo (void)
+{
+  printf ("In %s:%s\n", __FILE__, __func__);
+  return 1;
+}
+
+int
+foosub (void)
+{
+  printf ("In %s:%s\n", __FILE__, __func__);
+  return 20;
+}
diff --git a/elf/tst-dlopen-offset-mod2.c b/elf/tst-dlopen-offset-mod2.c
new file mode 100644
index 0000000..d126ae2
--- /dev/null
+++ b/elf/tst-dlopen-offset-mod2.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int
+bar (void)
+{
+  printf ("In %s:%s\n", __FILE__, __func__);
+  return 123;
+}
diff --git a/elf/tst-dlopen-offset-mod3.c b/elf/tst-dlopen-offset-mod3.c
new file mode 100644
index 0000000..9916dc8
--- /dev/null
+++ b/elf/tst-dlopen-offset-mod3.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int
+xyzzy (void)
+{
+  printf ("In %s:%s\n", __FILE__, __func__);
+  return 21;
+}
diff --git a/elf/tst-dlopen-offset.c b/elf/tst-dlopen-offset.c
new file mode 100644
index 0000000..78dd7ca
--- /dev/null
+++ b/elf/tst-dlopen-offset.c
@@ -0,0 +1,144 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+/* These numbers need to be coordinated with the offsets passed to make the combined .so.  */
+int offa = 64;
+int offb = 128;
+int offc = 192;
+
+int
+do_test (void)
+{
+  void *p1 = __google_dlopen_with_offset ("$ORIGIN/tst-dlopen-offset-comb.so", offa * 1024, RTLD_LAZY);
+
+  if (!p1)
+    {
+      puts (dlerror ());
+      return 1;
+    }
+
+  int (*f) (void) = dlsym (p1, "foo");
+  if (f)
+    {
+      (*f)();
+    }
+  else
+    {
+      puts (dlerror ());
+      return 1;
+    }
+
+  void *p2 = __google_dlopen_with_offset ("$ORIGIN/tst-dlopen-offset-comb.so", offb * 1024, RTLD_LAZY);
+
+  int (*bar) (void) = dlsym (p2, "bar");
+  if (bar)
+    {
+      (*bar)();
+    }
+  else
+    {
+      puts (dlerror ());
+      return 1;
+    }
+
+  void *p3 = __google_dlopen_with_offset ("$ORIGIN/tst-dlopen-offset-comb.so", offc * 1024, RTLD_LAZY);
+
+  int (*xyzzy) (void) = dlsym (p3, "xyzzy");
+  if (xyzzy)
+    {
+      (*xyzzy)();
+    }
+  else
+    {
+      puts (dlerror ());
+      return 1;
+    }
+
+  if (p1)
+    dlclose (p1);
+
+  p1 = __google_dlopen_with_offset ("$ORIGIN/tst-dlopen-offset-comb.so", offa * 1024, RTLD_LAZY);
+
+  f = dlsym (p1, "someothersym");
+  if (!f)
+    {
+      puts (dlerror ());
+      puts (" (expected)");
+    }
+  else
+    {
+      puts ("Symbol found unexpectedly");
+      return 1;
+    }
+
+  f = dlsym (p1, "xyzzy");
+  if (!f)
+    {
+      puts (dlerror ());
+      puts (" (expected)");
+    }
+  else
+    {
+      puts ("Symbol found unexpectedly");
+      return 1;
+    }
+
+  p1 = __google_dlopen_with_offset ("$ORIGIN/tst-dlopen-offset-comb.so", offa * 1024, RTLD_LAZY);
+
+  f = dlsym (p1, "foo");
+  if (f)
+    {
+      (*f)();
+    }
+  else
+    {
+      puts (dlerror ());
+      return 1;
+    }
+
+  void *px = __google_dlopen_with_offset ("$ORIGIN/tst-dlopen-offset-comb.so", 0, RTLD_LAZY);
+
+  if (!px)
+    {
+      puts (dlerror ());
+      puts (" (expected)");
+    }
+  else
+    {
+      puts ("dlopen_with_offset succeeded unexpectedly");
+      return 1;
+    }
+
+  px = __google_dlopen_with_offset ("$ORIGIN/tst-dlopen-offset-mod1.so", 0, RTLD_LAZY);
+
+  f = dlsym (px, "foo");
+  if (f)
+    {
+      (*f)();
+    }
+  else
+    {
+      puts (dlerror ());
+      return 1;
+    }
+
+  px = __google_dlopen_with_offset ("$ORIGIN/nonexistent.so", 0, RTLD_LAZY);
+
+  if (!px)
+    {
+      puts (dlerror ());
+      puts (" (expected)");
+    }
+  else
+    {
+      puts ("dlopen_with_offset succeeded unexpectedly");
+      return 1;
+    }
+
+  return 0;
+}
+
+#define TIMEOUT 100
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0342bb26e0251dc2d7ca00a884ea831705e32b4

commit c0342bb26e0251dc2d7ca00a884ea831705e32b4
Author: Stan Shebs <stanshebs@google.com>
Date:   Wed Mar 28 20:31:52 2018 -0700

    Add a hunk lost in merge

diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
index c35a9eb..faf7a48 100644
--- a/dlfcn/dlopen.c
+++ b/dlfcn/dlopen.c
@@ -96,6 +96,14 @@ __dlopen_with_offset (const char *file, off_t offset, int mode DL_CALLER_DECL)
 {
   if (!rtld_active ())
     return _dlfcn_hook->dlopen_with_offset (file, offset, mode, DL_CALLER);
+
+  struct dlopen_args oargs;
+  oargs.file = file;
+  oargs.offset = offset;
+  oargs.mode = mode;
+  oargs.caller = DL_CALLER;
+
+  return __dlopen_common (&oargs);
 }
 strong_alias (__dlopen_with_offset, __google_dlopen_with_offset)
 # endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c96f7985f0c0eb5dce4b2927df895880bdb0cf4

commit 3c96f7985f0c0eb5dce4b2927df895880bdb0cf4
Author: Stan Shebs <stanshebs@google.com>
Date:   Wed Mar 28 19:31:45 2018 -0700

    Fix GCC compilation issues in cherrypicks

diff --git a/elf/dl-dst.h b/elf/dl-dst.h
index f00c8e2..e4448c1 100644
--- a/elf/dl-dst.h
+++ b/elf/dl-dst.h
@@ -66,7 +66,7 @@
 	  dst_len = (l)->l_origin == (char *) -1			      \
 	    ? 0 : strlen ((l)->l_origin);				      \
                                                                               \
-	char *exec_origin = GLRO(google_exec_origin_dir);		      \
+	const char *exec_origin = GLRO(google_exec_origin_dir);		      \
 	size_t exec_origin_len =					      \
 	  (exec_origin == NULL) ? 0 : strlen (exec_origin);		      \
 									      \
diff --git a/nss/nss_borg/borg-pwd.c b/nss/nss_borg/borg-pwd.c
index 3bbe6ef..1f685ee 100644
--- a/nss/nss_borg/borg-pwd.c
+++ b/nss/nss_borg/borg-pwd.c
@@ -70,7 +70,7 @@ static enum nss_status _nss_borg_endpwent_locked(void) {
 // _nss_borg_endpwent()
 // Called by NSS to close the passwd file
 
-enum nss_status _nss_borg_endpwent() {
+enum nss_status _nss_borg_endpwent(void) {
   enum nss_status ret;
   NSSBORG_LOCK;
   ret = _nss_borg_endpwent_locked();
diff --git a/sysdeps/unix/sysv/linux/x86/time.c b/sysdeps/unix/sysv/linux/x86/time.c
index 124bd96..8992656 100644
--- a/sysdeps/unix/sysv/linux/x86/time.c
+++ b/sysdeps/unix/sysv/linux/x86/time.c
@@ -59,4 +59,6 @@ time (time_t *t)
 
 #endif
 
+#if defined(__clang__)
 libc_hidden_weak (time)
+#endif

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

Summary of changes:
 dlfcn/dlopen.c                     |    8 ++
 elf/Makefile                       |    9 ++
 elf/dl-dst.h                       |    2 +-
 elf/tst-dlopen-offset-mod1.c       |   15 ++++
 elf/tst-dlopen-offset-mod2.c       |    8 ++
 elf/tst-dlopen-offset-mod3.c       |    8 ++
 elf/tst-dlopen-offset.c            |  144 ++++++++++++++++++++++++++++++++++++
 nss/nss_borg/borg-pwd.c            |    2 +-
 sysdeps/unix/sysv/linux/x86/time.c |    2 +
 9 files changed, 196 insertions(+), 2 deletions(-)
 create mode 100644 elf/tst-dlopen-offset-mod1.c
 create mode 100644 elf/tst-dlopen-offset-mod2.c
 create mode 100644 elf/tst-dlopen-offset-mod3.c
 create mode 100644 elf/tst-dlopen-offset.c


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]