aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-bpf
AgeCommit message (Collapse)AuthorFilesLines
2022-01-02Update year range in copyright notice of binutils filesAlan Modra1-1/+1
The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
2021-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2020-08-07bpf: add missing tests from previous commitsJose E. Marchesi2-0/+31
2020-08-07 David Faust <david.faust@oracle.com> * testsuite/ld-bpf/call-3.s: New file. * testsuite/ld-bpf/call-3.d: Likewise.
2020-08-06bpf: relocation fixes for eBPF ELF backendDavid Faust14-0/+189
The eBPF ELF backend was not properly recording relocation addends during installation, nor reading and applying them when performing the final relocation. This lead to various issues with incorrect relocations. These issues are fixed with a new howto special function to install the relocations, and updates to bpf_elf_relocate_section to read and use the addends as recorded in the input_bfd. bfd/ChangeLog 2020-08-05 David Faust <david.faust@oracle.com> * elf64-bpf.c (bpf_elf_generic_reloc): New function. (bpf_elf_howto_table): Use it here. (bpf_elf_relocate_section): Use addends recorded in input_bfd for instruction and data relocations. ld/ChangeLog 2020-08-05 David Faust <david.faust@oracle.com> * testsuite/ld-bpf/call-2.s: New file. * testsuite/ld-bpf/call-2.d: Likewise. * testsuite/ld-bpf/reloc-data-be.d: Likewise. * testsuite/ld-bpf/reloc-data-le.d: Likewise. * testsuite/ld-bpf/reloc-data.s: Likewise. * testsuite/ld-bpf/reloc-insn-external-be.d: Likewise. * testsuite/ld-bpf/reloc-insn-external-le.d: Likewise. * testsuite/ld-bpf/reloc-insn-external.s: Likewise. * testsuite/ld-bpf/reloc-insn32-be.d: Likewise. * testsuite/ld-bpf/reloc-insn32-le.d: Likewise. * testsuite/ld-bpf/reloc-insn32.s: Likewise. * testsuite/ld-bpf/reloc-insn64-be.d: Likewise. * testsuite/ld-bpf/reloc-insn64-le.d: Likewise. * testsuite/ld-bpf/reloc-insn64.s: Likewise.
2020-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2019-08-07ld: use a specific linker script in BPF targetsJose E. Marchesi2-2/+0
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-05-23ld: add support for eBPFJose E. Marchesi6-0/+90
This patch adds support to the linker for the Linux eBPF architecture. A minimal testsuite is included. ld/ChangeLog: 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com> * Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64bpf.c. * Makefile.in (prefix): Regenerate. * configure.tgt (targ_extra_ofiles): Add case for bpf-*-* targets. * emulparams/elf64bpf.sh: New file. * testsuite/lib/ld-lib.exp (check_gc_sections_available): Add bpf-*-* to the list of targets not supporting gc-sections. * testsuite/ld-bpf/bar.s: New file. * testsuite/ld-bpf/jump-1.d: Likewise. * testsuite/ld-bpf/foo.s: Likewise. * testsuite/ld-bpf/call-1.d: Likewise. * testsuite/ld-bpf/bpf.exp: Likewise. * testsuite/ld-bpf/baz.s: Likewise.