diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-08-02 19:07:22 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-08-02 19:07:22 +0200 |
| commit | d9a893a554d6077f5cab4aa8a81f24213443232e (patch) | |
| tree | ad7c6ccd2373fe3fd36183f7d9be114e8503b7ac /sys/netbsd | |
| parent | 5cbdd9f4445514cbacadc362c2891e40b7f36072 (diff) | |
Makefile: don't compile all targets into target binaries
Currently target binaries contain support for all OS/arch combinations.
However, obviously a fuchsia target binary won't test windows.
For target binaries we need support only for a single target
(with the exception of 386/arm target in amd64/arm64 binaries).
So compile in only _the_ target into target binaries.
This reduces akaros/amd64 fuzzer binary from 33 to 7 MB
and execprog from 28 to 2 MB.
Diffstat (limited to 'sys/netbsd')
| -rw-r--r-- | sys/netbsd/gen/amd64.go | 8 | ||||
| -rw-r--r-- | sys/netbsd/gen/empty.go | 3 | ||||
| -rw-r--r-- | sys/netbsd/init.go | 7 |
3 files changed, 10 insertions, 8 deletions
diff --git a/sys/netbsd/gen/amd64.go b/sys/netbsd/gen/amd64.go index be9bbb998..cd7cdcd03 100644 --- a/sys/netbsd/gen/amd64.go +++ b/sys/netbsd/gen/amd64.go @@ -1,10 +1,14 @@ // AUTOGENERATED FILE +// +build !syz_target syz_target,syz_os_netbsd,syz_arch_amd64 package gen import . "github.com/google/syzkaller/prog" +import . "github.com/google/syzkaller/sys/netbsd" -var Target_amd64 = &Target{OS: "netbsd", Arch: "amd64", Revision: revision_amd64, PtrSize: 8, PageSize: 4096, NumPages: 4096, DataOffset: 536870912, Syscalls: syscalls_amd64, Resources: resources_amd64, Structs: structDescs_amd64, Consts: consts_amd64} +func init() { + RegisterTarget(&Target{OS: "netbsd", Arch: "amd64", Revision: revision_amd64, PtrSize: 8, PageSize: 4096, NumPages: 4096, DataOffset: 536870912, Syscalls: syscalls_amd64, Resources: resources_amd64, Structs: structDescs_amd64, Consts: consts_amd64}, InitTarget) +} var resources_amd64 = []*ResourceDesc{ {Name: "fd", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd"}, Values: []uint64{18446744073709551615, 18446744073709551516}}, @@ -1673,4 +1677,4 @@ var consts_amd64 = []ConstValue{ {Name: "WUNTRACED", Value: 2}, } -const revision_amd64 = "cea6c87ab1f9e36df1927913a619e71cd29abcbf" +const revision_amd64 = "c05720ceb16e651f6ae9addd1f5be83497d861e3" diff --git a/sys/netbsd/gen/empty.go b/sys/netbsd/gen/empty.go new file mode 100644 index 000000000..5baff07bf --- /dev/null +++ b/sys/netbsd/gen/empty.go @@ -0,0 +1,3 @@ +// AUTOGENERATED FILE +// This file is needed if OS is completely excluded by build tags. +package gen diff --git a/sys/netbsd/init.go b/sys/netbsd/init.go index 908cbe655..7b6b1250e 100644 --- a/sys/netbsd/init.go +++ b/sys/netbsd/init.go @@ -5,15 +5,10 @@ package netbsd import ( "github.com/google/syzkaller/prog" - "github.com/google/syzkaller/sys/netbsd/gen" "github.com/google/syzkaller/sys/targets" ) -func init() { - prog.RegisterTarget(gen.Target_amd64, initTarget) -} - -func initTarget(target *prog.Target) { +func InitTarget(target *prog.Target) { arch := &arch{ MAP_FIXED: target.ConstMap["MAP_FIXED"], } |
