mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
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.
This commit is contained in:
parent
685312298f
commit
fe534fe898
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2015-11-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[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.
|
||||
|
||||
2015-11-10 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* math/auto-libm-test-in: Add another test of pow.
|
||||
|
@ -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
|
||||
|
30
sysdeps/x86/tst-prelink.c
Normal file
30
sysdeps/x86/tst-prelink.c
Normal file
@ -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"
|
1
sysdeps/x86/tst-prelink.exp
Normal file
1
sysdeps/x86/tst-prelink.exp
Normal file
@ -0,0 +1 @@
|
||||
/0 stdout
|
Loading…
Reference in New Issue
Block a user