diff options
Diffstat (limited to 'pkg/csource')
| -rw-r--r-- | pkg/csource/csource.go | 5 | ||||
| -rw-r--r-- | pkg/csource/generated.go | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index d2ab513cc..8818e4f1c 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -209,7 +209,8 @@ func (ctx *context) generateCalls(p prog.ExecProg, trace bool) ([]string, []uint func (ctx *context) emitCall(w *bytes.Buffer, call prog.ExecCall, ci int, haveCopyout, trace bool) { callName := call.Meta.CallName - native := ctx.sysTarget.SyscallNumbers && !strings.HasPrefix(callName, "syz_") + _, trampoline := ctx.sysTarget.SyscallTrampolines[callName] + native := ctx.sysTarget.SyscallNumbers && !strings.HasPrefix(callName, "syz_") && !trampoline fmt.Fprintf(w, "\t") if haveCopyout || trace { fmt.Fprintf(w, "res = ") @@ -269,6 +270,8 @@ func (ctx *context) emitCallName(w *bytes.Buffer, call prog.ExecCall, native boo fmt.Fprintf(w, "syscall(%v%v", ctx.sysTarget.SyscallPrefix, callName) } else if strings.HasPrefix(callName, "syz_") { fmt.Fprintf(w, "%v(", callName) + } else if trampolineName, ok := ctx.sysTarget.SyscallTrampolines[callName]; ok { + fmt.Fprintf(w, "%v(", trampolineName) } else { args := strings.Repeat(",intptr_t", len(call.Args)) if args != "" { diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index 6c1f343be..e374b593f 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -5197,6 +5197,8 @@ struct fs_image_segment { #define sys_memfd_create 360 #elif GOARCH_mips64le #define sys_memfd_create 314 +#elif GOARCH_s390x +#define sys_memfd_create 350 #endif static unsigned long fs_image_segment_check(unsigned long size, unsigned long nsegs, long segments) |
