aboutsummaryrefslogtreecommitdiff
path: root/sim/bpf/bpf.c
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2020-09-03 16:24:51 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2020-09-03 18:22:08 +0200
commit0316fb52d6eaca5f2398843f57ba08f8d3746056 (patch)
treedf544c67ceacb4fcf00168b98bd20b6694076a02 /sim/bpf/bpf.c
parent1d01693f555be09f78cea4e2454c24457777f057 (diff)
downloadfsf-binutils-gdb-0316fb52d6eaca5f2398843f57ba08f8d3746056.zip
fsf-binutils-gdb-0316fb52d6eaca5f2398843f57ba08f8d3746056.tar.gz
fsf-binutils-gdb-0316fb52d6eaca5f2398843f57ba08f8d3746056.tar.bz2
bpf: several small fixes in the simulator
This patch fixes the following problems: - Missing includes in several files leading to implicit function declarations. - Missing prototype for bpf_trace_printk in bpf-helpers.h - The simulator bitsize was set to 32 bits, causing truncation of the program counter. Tested in bpf-unknown-none. sim/ChangeLog: 2020-09-03 Jose E. Marchesi <jose.marchesi@oracle.com> * bpf/bpf.c: Include bpf-helpers.h. * bpf/bpf-helpers.h: Provide a prototype for bpf_trace_printk. * bpf/configure.ac: Set simulator bitsize to 64. * bpf/configure (includedir): Regenerate. * bpf/sim-if.c: Include stdlib.h. * bpf/traps.c: Likewise.
Diffstat (limited to 'sim/bpf/bpf.c')
-rw-r--r--sim/bpf/bpf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sim/bpf/bpf.c b/sim/bpf/bpf.c
index 0fb8d81..f413b36 100644
--- a/sim/bpf/bpf.c
+++ b/sim/bpf/bpf.c
@@ -27,6 +27,7 @@
#include "decode.h"
#include "defs-le.h" /* For SCACHE */
+#include "bpf-helpers.h"
/* It is not possible to include both defs-le.h and defs-be.h due to
duplicated definitions, so we need a bunch of forward declarations