binutils-gdb/ld/testsuite/ld-elf/pr25749-2.c
Alan Modra 84df1f9dcb Fix x86 ld testsuite fails with glibc < 2.28
* testsuite/ld-elf/linux-x86.exp: Build tests when non-native.
	(check_pr25749b): Add optional args.  Set expected pass file
	from args.  Run -1b and -2a tests with passall.out.
	* testsuite/ld-elf/passall.out: New file.
	* testsuite/ld-elf/pr25749-1.c: Adjust to pass with older glibc.
	* testsuite/ld-elf/pr25749-2.c: Likewise.
	* testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use
	regexp_diff to compare expected output from running binary.
2020-06-10 22:19:07 +09:30

19 lines
293 B
C

#include <stdio.h>
#include <bfd_stdint.h>
extern intptr_t size;
int
main ()
{
if (size == 293 /* size of this file */)
printf ("PASS\n");
#ifdef __GLIBC_PREREQ
# if !__GLIBC_PREREQ (2, 28)
else
printf ("PASS (incorrect result due to glibc bug)\n");
# endif
#endif
return 0;
}