binutils-gdb/ld/testsuite
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
..
config Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-aarch64 Add R_AARCH64_P32_MOVW_PREL_* ELF32 relocs 2019-06-14 12:02:19 +01:00
ld-alpha Fix alpha testsuite regression 2019-06-14 10:23:20 +09:30
ld-arc [ARC] Add linker relaxation. 2019-07-24 16:33:29 +03:00
ld-arm Fixes the linker testcase "Secure gateway veneers:cmse functions debug information missing" which was failing due to output regular expression mismatch on arm-none-linux-gnueabihf targets. 2019-07-22 14:46:11 +01:00
ld-auto-import Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-avr Fix PR 24571 - Relaxation does not shorten jmp or call to target at pc-relative range boundary 2019-05-21 12:48:06 +05:30
ld-bootstrap Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-bpf ld: use a specific linker script in BPF targets 2019-08-07 13:57:30 +02:00
ld-cdtest Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-checks Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-cris Dynamic TLS section symbols 2019-07-13 09:57:50 +09:30
ld-crx Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-csky Add support for the C_SKY series of processors. 2018-07-30 12:24:14 +01:00
ld-cygwin Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-d10v Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-discard Support tcl procedure calls in run_dump_test xfail 2019-05-30 00:52:08 +09:30
ld-elf Move ld-scripts size tests 2019-07-23 18:22:01 +09:30
ld-elfcomm Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-elfvers Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-elfvsb Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-elfweak Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-fastcall Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-frv Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-gc Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-h8300 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-i386 Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-ia64 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-ifunc Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-libs Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-linkonce Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-m68hc11 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-m68k run_dump_test source in build directory 2019-01-08 18:50:54 +10:30
ld-mep Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-metag Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-mips-elf Dynamic TLS section symbols 2019-07-13 09:57:50 +09:30
ld-misc Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-mmix Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-mn10300 Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-msp430-elf MSP430 Linker: Define __crt0_init_bss/__crt0_movedata symbols when .lower or .either prefixed sections are present. 2019-04-17 15:05:08 +01:00
ld-nds32 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-nios2 Run more ld tests when not native 2017-01-02 23:48:08 +10:30
ld-or1k Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-pe Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-pie Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-plugin Ajdust lto-3r and lto-5r tests for powerpc64 2019-07-26 10:02:34 +09:30
ld-powerpc PowerPC tlsie test fix 2019-08-02 12:41:05 +09:30
ld-pru Fix binary compatibility between GCC and the TI compiler for the PRU target. 2018-05-09 11:39:32 +01:00
ld-riscv-elf Fix spelling mistakes in BFD library. 2019-01-21 12:39:24 +00:00
ld-s12z Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-s390 Dynamic TLS section symbols 2019-07-13 09:57:50 +09:30
ld-scripts Move ld-scripts size tests 2019-07-23 18:22:01 +09:30
ld-selective Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-sh Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-shared Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-size Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-sparc Dynamic TLS section symbols 2019-07-13 09:57:50 +09:30
ld-spu Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-srec ld: use a specific linker script in BPF targets 2019-08-07 13:57:30 +02:00
ld-tic6x Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-tilegx Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-tilepro Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-undefined ld: use a specific linker script in BPF targets 2019-08-07 13:57:30 +02:00
ld-unique Use better test for usable compiler in ld testsuite. 2019-04-24 12:14:56 -07:00
ld-v850 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-vax-elf Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-visium Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-vxworks Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-x86-64 elf: Remove the property after reporting its removal 2019-06-24 11:08:57 -07:00
ld-xc16x Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-xstormy16 Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ld-xtensa bfd: xtensa: fix shrink_dynamic_reloc_sections for export-dynamic 2019-03-29 10:02:10 -07:00
ld-z8k Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
lib s12z genelf.em 2019-05-30 01:01:42 +09:30
ChangeLog-2004 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2005 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2006 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2007 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2008 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2009 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2010 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2011 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2012 Rotate binutils ChangeLog for 2013 2013-01-02 17:06:32 +00:00
ChangeLog-2013 New Year - binutils ChangeLog rotation 2014-01-08 05:32:12 -08:00
ChangeLog-2014 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ChangeLog-2015 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-9303 Add copyright notices 2012-12-10 12:48:03 +00:00