about summary refs log tree commit diff
path: root/elf/tst-prelink.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-11-10 15:54:22 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-11-10 15:54:22 -0800
commitffcbf16cc1a666f4fadbc105399c6e55417d2435 (patch)
tree728a8e997bb67bfe08652cbc1605d982efec669f /elf/tst-prelink.c
parentfe534fe8980fa214c410e3661a4216e781073353 (diff)
downloadglibc-ffcbf16cc1a666f4fadbc105399c6e55417d2435.tar.gz
glibc-ffcbf16cc1a666f4fadbc105399c6e55417d2435.tar.xz
glibc-ffcbf16cc1a666f4fadbc105399c6e55417d2435.zip
Run tst-prelink test for GLOB_DAT reloc hjl/pr19178/master
Run tst-prelink test on targets with GLOB_DAT relocaton.

	* config.make.in (have-glob-dat-reloc): New.
	* configure.ac (libc_cv_has_glob_dat): New.  Set to yes if
	target supports GLOB_DAT relocaton. AC_SUBST.
	* configure: Regenerated.
	* elf/Makefile (tests): Add tst-prelink.
	(tests-special): Add $(objpfx)tst-prelink-cmp.out.
	(tst-prelink-ENV): New.
	($(objpfx)tst-prelink-conflict.out): Likewise.
	($(objpfx)tst-prelink-cmp.out): Likewise.
	* sysdeps/x86/tst-prelink.c: Moved to ...
	* elf/tst-prelink.c: Here.
	* sysdeps/x86/tst-prelink.exp: Moved to ...
	* elf/tst-prelink.exp: Here.
	* sysdeps/x86/Makefile (tests): Don't add tst-prelink.
	(tst-prelink-ENV): Removed.
	($(objpfx)tst-prelink-conflict.out): Likewise.
	($(objpfx)tst-prelink-cmp.out): Likewise.
	(tests-special): Don't add $(objpfx)tst-prelink-cmp.out.
Diffstat (limited to 'elf/tst-prelink.c')
-rw-r--r--elf/tst-prelink.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/elf/tst-prelink.c b/elf/tst-prelink.c
new file mode 100644
index 0000000000..ab61c4ef31
--- /dev/null
+++ b/elf/tst-prelink.c
@@ -0,0 +1,30 @@
+/* Test the output from the environment variable, LD_TRACE_PRELINKING,
+   for prelink.
+   Copyright (C) 2015 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  fprintf (stdout, "hello\n");
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"