diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2020-09-03 16:24:51 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2020-09-03 18:22:08 +0200 |
commit | 0316fb52d6eaca5f2398843f57ba08f8d3746056 (patch) | |
tree | df544c67ceacb4fcf00168b98bd20b6694076a02 /sim/bpf/sim-if.c | |
parent | 1d01693f555be09f78cea4e2454c24457777f057 (diff) | |
download | binutils-0316fb52d6eaca5f2398843f57ba08f8d3746056.zip binutils-0316fb52d6eaca5f2398843f57ba08f8d3746056.tar.gz binutils-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/sim-if.c')
-rw-r--r-- | sim/bpf/sim-if.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sim/bpf/sim-if.c b/sim/bpf/sim-if.c index fbb122b..e7e5de6 100644 --- a/sim/bpf/sim-if.c +++ b/sim/bpf/sim-if.c @@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <stdlib.h> + #include "sim-main.h" #include "sim-options.h" #include "libiberty.h" |