binutils-gdb/ld/testsuite/ld-undefined
Jose E. Marchesi fca8e23c31 ld: use a specific linker script in BPF targets
This patch makes the elf64bpf emulation to use it's own linker script,
based on elf.sc.  At the moment, the only change is that the BPF
executable doesn't define an entry symbol (BPF programs feature
several entry points scattered in several sections.)

This is a step towards the goal of generating proper ELF executables
that would be loaded by the kernel's libbpf.  We are not there yet:
BPF "programs" should still be linked with -r.

This change removes a warning while linking executables, decreases the
number of unsupported tests in the target from 47 to 29, and increases
the number of expected passes from 104 to 145.

Regtested in x86_64 for all targets.
No regressions.

ld/ChangeLog:

2019-08-07  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* scripttempl/elf64bpf.sc: Adapted from elf.sc.
	* emulparams/elf64bpf.sh (SCRIPT_NAME): Use elf64bpf.
	(EMBEDDED): Define.
	* testsuite/ld-bpf/call-1.d: Do not expect a warning regarding an
	undefined entry symbol.
	* testsuite/ld-bpf/jump-1.d: Likewise.
	* testsuite/ld-undefined/undefined.exp: Do not pass '-e entry' to
	ld in BPF targets, and do not expect line number information.
	* testsuite/ld-srec/srec.exp (run_srec_test): xfail s-record tests
	in BPF targets.
2019-08-07 13:57:30 +02:00
..
dummy.s ld/ 2009-03-18 12:11:38 +00:00
entry-1.d ld/ 2009-03-18 12:11:38 +00:00
entry-2.d ld/ 2009-03-18 12:11:38 +00:00
entry-3.d [ARM] FDPIC: Update testsuite so that many tests pass with arm*-uclinuxfdpiceabi. 2018-04-25 21:13:14 +00:00
entry-4.d [ARM] FDPIC: Update testsuite so that many tests pass with arm*-uclinuxfdpiceabi. 2018-04-25 21:13:14 +00:00
entry-5.d ld/ 2009-03-18 12:11:38 +00:00
entry-6.d ld/ 2009-03-18 12:11:38 +00:00
entry-7.d 2009-09-14 H.J. Lu <hongjiu.lu@intel.com> 2009-09-14 14:07:26 +00:00
entry.exp Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
entry.s ld/ 2009-03-18 12:11:38 +00:00
fundef.s Test undefined symbols in shared libraries 2017-08-24 16:43:39 +09:30
require-defined-1.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-2.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-3.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-4.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-5.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined.exp ns32k testsuite tidy 2019-04-16 19:59:55 +09:30
require-defined.s ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
undefined.c 19990502 sourceware import 1999-05-03 07:29:11 +00:00
undefined.exp ld: use a specific linker script in BPF targets 2019-08-07 13:57:30 +02:00
weak-fundef.s Add undefined weak function tests 2016-08-12 14:34:49 +09:30
weak-undef.exp PicoJava weak undefined symbols 2019-05-06 11:41:28 +09:30
weak-undef.s gas/testsuite/ 2005-03-22 14:20:38 +00:00
weak-undef.t Add undefined weak function tests 2016-08-12 14:34:49 +09:30