aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2019-05-23 19:05:42 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2019-05-23 19:34:15 +0200
commit8376927b2cc8b80cd5aa1e48aabafc85c0ad4f3e (patch)
treeea438d902286e53cdacd4ff6a5bd29ebf9bd5fea /ld/emulparams
parentf8861f5dc2391e0c46dd118370195e7730ec46ca (diff)
downloadgdb-8376927b2cc8b80cd5aa1e48aabafc85c0ad4f3e.zip
gdb-8376927b2cc8b80cd5aa1e48aabafc85c0ad4f3e.tar.gz
gdb-8376927b2cc8b80cd5aa1e48aabafc85c0ad4f3e.tar.bz2
ld: add support for eBPF
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.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/elf64bpf.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/emulparams/elf64bpf.sh b/ld/emulparams/elf64bpf.sh
new file mode 100644
index 0000000..39b23f0
--- /dev/null
+++ b/ld/emulparams/elf64bpf.sh
@@ -0,0 +1,10 @@
+TEMPLATE_NAME=elf32
+SCRIPT_NAME=elf
+BIG_OUTPUT_FORMAT="elf64-bpfbe"
+LITTLE_OUTPUT_FORMAT="elf64-bpfle"
+OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"
+ARCH=bpf
+MACHINE=
+TARGET_PAGE_SIZE=0x1000
+# XXX this is arbitrary, for now
+TEXT_START_ADDR=0x00400000