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 hjl/pr19178/master created. glibc-2.22-517-g40d3a8a


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, hjl/pr19178/master has been created
        at  40d3a8ab0ba5a2bcb1563becaec712ed031d2ebf (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=40d3a8ab0ba5a2bcb1563becaec712ed031d2ebf

commit 40d3a8ab0ba5a2bcb1563becaec712ed031d2ebf
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Nov 7 06:35:09 2015 -0800

    Add a test for prelink output
    
    This test applies to i386 and x86_64 which set R_386_GLOB_DAT and
    R_X86_64_GLOB_DAT to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA.
    
    	[BZ #19178]
    	* sysdeps/x86/Makefile (tests): Add tst-prelink.
    	(tst-prelink-ENV): New.
    	($(objpfx)tst-prelink-conflict.out): Likewise.
    	($(objpfx)tst-prelink-cmp.out): Likewise.
    	(tests-special): Add $(objpfx)tst-prelink-cmp.out.
    	* sysdeps/x86/tst-prelink.c: New file.
    	* sysdeps/x86/tst-prelink.exp: Likewise.

diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
index 0de4f42..a2f4f8a 100644
--- a/sysdeps/x86/Makefile
+++ b/sysdeps/x86/Makefile
@@ -7,4 +7,19 @@ sysdep-dl-routines += dl-get-cpu-features
 
 tests += tst-get-cpu-features
 tests-static += tst-get-cpu-features-static
+
+tests += tst-prelink
+tst-prelink-ENV = LD_TRACE_PRELINKING=1
+
+$(objpfx)tst-prelink-conflict.out: $(objpfx)tst-prelink.out
+	grep stdout $< | grep conflict | $(AWK) '{ print $$10, $$11 }' > $@
+
+$(objpfx)tst-prelink-cmp.out: $(..)sysdeps/x86/tst-prelink.exp \
+			      $(objpfx)tst-prelink-conflict.out
+	cmp $^ > $@; \
+	$(evaluate-test)
+
+ifeq ($(run-built-tests),yes)
+tests-special += $(objpfx)tst-prelink-cmp.out
+endif
 endif
diff --git a/sysdeps/x86/tst-prelink.c b/sysdeps/x86/tst-prelink.c
new file mode 100644
index 0000000..482285c
--- /dev/null
+++ b/sysdeps/x86/tst-prelink.c
@@ -0,0 +1,14 @@
+/* Test the output from the environment variable, LD_TRACE_PRELINKING,
+   for prelink.  */
+
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  fprintf (stdout, "hello\n");
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/sysdeps/x86/tst-prelink.exp b/sysdeps/x86/tst-prelink.exp
new file mode 100644
index 0000000..b35b4c9
--- /dev/null
+++ b/sysdeps/x86/tst-prelink.exp
@@ -0,0 +1 @@
+/0 stdout

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


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]