mirror of
https://github.com/opencontainers/runc.git
synced 2025-11-01 03:22:38 +08:00
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.16.0 to 0.17.0. - [Release notes](https://github.com/cilium/ebpf/releases) - [Commits](https://github.com/cilium/ebpf/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: github.com/cilium/ebpf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
44 lines
835 B
Go
44 lines
835 B
Go
package linux
|
|
|
|
import (
|
|
"runtime"
|
|
)
|
|
|
|
// PlatformPrefix returns the platform-dependent syscall wrapper prefix used by
|
|
// the linux kernel.
|
|
//
|
|
// Based on https://github.com/golang/go/blob/master/src/go/build/syslist.go
|
|
// and https://github.com/libbpf/libbpf/blob/master/src/libbpf.c#L10047
|
|
func PlatformPrefix() string {
|
|
switch runtime.GOARCH {
|
|
case "386":
|
|
return "__ia32_"
|
|
case "amd64", "amd64p32":
|
|
return "__x64_"
|
|
|
|
case "arm", "armbe":
|
|
return "__arm_"
|
|
case "arm64", "arm64be":
|
|
return "__arm64_"
|
|
|
|
case "mips", "mipsle", "mips64", "mips64le", "mips64p32", "mips64p32le":
|
|
return "__mips_"
|
|
|
|
case "s390":
|
|
return "__s390_"
|
|
case "s390x":
|
|
return "__s390x_"
|
|
|
|
case "riscv", "riscv64":
|
|
return "__riscv_"
|
|
|
|
case "ppc":
|
|
return "__powerpc_"
|
|
case "ppc64", "ppc64le":
|
|
return "__powerpc64_"
|
|
|
|
default:
|
|
return ""
|
|
}
|
|
}
|