aboutsummaryrefslogtreecommitdiffstats
path: root/sys/syz-sysgen/sysgen.go
diff options
context:
space:
mode:
Diffstat (limited to 'sys/syz-sysgen/sysgen.go')
-rw-r--r--sys/syz-sysgen/sysgen.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/syz-sysgen/sysgen.go b/sys/syz-sysgen/sysgen.go
index 8043adf9d..a424e1488 100644
--- a/sys/syz-sysgen/sysgen.go
+++ b/sys/syz-sysgen/sysgen.go
@@ -205,11 +205,11 @@ func generate(target *targets.Target, prg *compiler.Prog, consts map[string]uint
fmt.Fprintf(out, "\tRegisterTarget(&Target{"+
"OS: %q, Arch: %q, Revision: revision_%v, PtrSize: %v, "+
"PageSize: %v, NumPages: %v, DataOffset: %v, Syscalls: syscalls_%v, "+
- "Resources: resources_%v, Structs: structDescs_%v, Consts: consts_%v}, "+
+ "Resources: resources_%v, Structs: structDescs_%v, Types: types_%v, Consts: consts_%v}, "+
"InitTarget)\n}\n\n",
target.OS, target.Arch, target.Arch, target.PtrSize,
target.PageSize, target.NumPages, target.DataOffset,
- target.Arch, target.Arch, target.Arch, target.Arch)
+ target.Arch, target.Arch, target.Arch, target.Arch, target.Arch)
fmt.Fprintf(out, "var resources_%v = ", target.Arch)
serializer.Write(out, prg.Resources)
@@ -223,6 +223,10 @@ func generate(target *targets.Target, prg *compiler.Prog, consts map[string]uint
serializer.Write(out, prg.Syscalls)
fmt.Fprintf(out, "\n\n")
+ fmt.Fprintf(out, "var types_%v = ", target.Arch)
+ serializer.Write(out, prg.Types)
+ fmt.Fprintf(out, "\n\n")
+
constArr := make([]prog.ConstValue, 0, len(consts))
for name, val := range consts {
constArr = append(constArr, prog.ConstValue{Name: name, Value: val})