binutils-gdb/ld/scripttempl
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
..
aix.sc
alpha.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
alphavms.sc
aout.sc
arclinux.sc
armbpabi.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
avr.sc
crisaout.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
dlx.sc
DWARF.sc
elf32cr16.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elf32cr16c.sc
elf32crx.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elf32msp430_3.sc
elf32msp430.sc
elf32xc16x.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elf32xc16xl.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elf32xc16xs.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elf64bpf.sc ld: use a specific linker script in BPF targets 2019-08-07 13:57:30 +02:00
elf64hppa.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elf_chaos.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elf.sc ld: Don't define __rel[a]_iplt_start/__rel[a]_iplt_end in PIE 2019-04-10 18:36:22 -07:00
elfarc.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elfarcv2.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elfd10v.sc
elfd30v.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elfm9s12z.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elfm68hc11.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elfm68hc12.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elfmicroblaze.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elfxgate.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
elfxtensa.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
epiphany_4x4.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
ft32.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
hppaelf.sc
i386beos.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
i386go32.sc
i386msdos.sc
ia64vms.sc
ip2k.sc
iq2000.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
mcorepe.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
mep.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
mips.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
mipsbsd.sc
mmo.sc
moxie.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
nds32elf.sc
pe.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
pep.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
pj.sc
ppcpe.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
pru.sc Use the correct names for the init and fini array start symbols in the default Pru linker script. 2019-05-09 10:26:11 +01:00
README
sh.sc
tic4xcoff.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
tic30aout.sc
tic30coff.sc
tic54xcoff.sc
tic80coff.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
v850_rh850.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
v850.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
vanilla.sc
visium.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
xstormy16.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
z80.sc
z8000.sc

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are linker script templates.
genscripts.sh sets some shell variables, then sources
EMULATION.sc, to generate EMULATION.{x,xr,xu,xn,xbn} -- the script
files for default, -r, -Ur, -n, -N.

Copyright (C) 2012-2019 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.