libsysdecode: support errno and syscalls for arm64 Linux

Sponsored by:	Turing Robotic Industries Inc.
This commit is contained in:
Ed Maste 2018-04-26 18:54:00 +00:00
parent 5f2336efb4
commit 9a16bd169e
3 changed files with 10 additions and 8 deletions

View File

@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <sysdecode.h>
#if defined(__i386__) || defined(__amd64__)
#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
static
#include <compat/linux/linux_errno.inc>
#endif
@ -130,7 +130,7 @@ sysdecode_abi_to_freebsd_errno(enum sysdecode_abi abi, int error)
case SYSDECODE_ABI_FREEBSD:
case SYSDECODE_ABI_FREEBSD32:
return (error);
#if defined(__i386__) || defined(__amd64__)
#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
case SYSDECODE_ABI_LINUX:
case SYSDECODE_ABI_LINUX32: {
unsigned int i;
@ -166,7 +166,7 @@ sysdecode_freebsd_to_abi_errno(enum sysdecode_abi abi, int error)
case SYSDECODE_ABI_FREEBSD:
case SYSDECODE_ABI_FREEBSD32:
return (error);
#if defined(__i386__) || defined(__amd64__)
#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
case SYSDECODE_ABI_LINUX:
case SYSDECODE_ABI_LINUX32:
if (error >= 0 && error <= ELAST)

View File

@ -49,9 +49,11 @@ static
#include <compat/freebsd32/freebsd32_syscalls.c>
#endif
#if defined(__amd64__) || defined(__i386__)
#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
static
#ifdef __amd64__
#ifdef __aarch64__
#include <arm64/linux/linux_syscalls.c>
#elif __amd64__
#include <amd64/linux/linux_syscalls.c>
#else
#include <i386/linux/linux_syscalls.c>
@ -83,7 +85,7 @@ sysdecode_syscallname(enum sysdecode_abi abi, unsigned int code)
return (freebsd32_syscallnames[code]);
break;
#endif
#if defined(__amd64__) || defined(__i386__)
#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
case SYSDECODE_ABI_LINUX:
if (code < nitems(linux_syscallnames))
return (linux_syscallnames[code]);

View File

@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd January 14, 2018
.Dd April 26, 2018
.Dt SYSDECODE 3
.Os
.Sh NAME
@ -57,7 +57,7 @@ Supported on all platforms.
Supported on amd64 and powerpc64.
.It Li SYSDECODE_ABI_LINUX
Linux binaries of the same platform.
Supported on amd64 and i386.
Supported on amd64, i386, and arm64.
.It Li SYSDECODE_ABI_LINUX32
32-bit Linux binaries.
Supported on amd64.