diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-02-28 13:57:50 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-03-07 10:23:01 +0000 |
| commit | 7e3bd60dd6c8f783f5a418c64aa75f6818236dc4 (patch) | |
| tree | 24dce56dc037521e340e73f45ba41c8b6c264af2 /tools/syz-check | |
| parent | 831e3629115be4f5e68e6e0df3a5b07eed26daa4 (diff) | |
pkg/symbolizer: introduce Symbolizer interface
To simplify interface Read*Symbols were moved out from symbolizer.Symbolizer.
Diffstat (limited to 'tools/syz-check')
| -rw-r--r-- | tools/syz-check/check.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/syz-check/check.go b/tools/syz-check/check.go index f42512c02..f153db6d1 100644 --- a/tools/syz-check/check.go +++ b/tools/syz-check/check.go @@ -110,7 +110,7 @@ func check(OS, arch, obj string, dwarf, netlink bool) ([]Warn, error) { warnings = append(warnings, warnings2...) } if netlink { - warnings3, err := checkNetlink(OS, arch, obj, structTypes, locs) + warnings3, err := checkNetlink(arch, obj, structTypes, locs) if err != nil { return nil, err } @@ -372,7 +372,7 @@ func parseDescriptions(OS, arch string) ([]prog.Type, map[string]*ast.Struct, [] // Then read in the symbol data, which is an array of nla_policy structs. // These structs allow to easily figure out type/size of attributes. // Finally we compare our descriptions with the kernel policy description. -func checkNetlink(OS, arch, obj string, structTypes []prog.Type, +func checkNetlink(arch, obj string, structTypes []prog.Type, locs map[string]*ast.Struct) ([]Warn, error) { if arch != targets.AMD64 { // Netlink policies are arch-independent (?), @@ -388,8 +388,7 @@ func checkNetlink(OS, arch, obj string, structTypes []prog.Type, if rodata == nil { return nil, fmt.Errorf("object file %v does not contain .rodata section", obj) } - symb := symbolizer.NewSymbolizer(targets.Get(OS, arch)) - symbols, err := symb.ReadRodataSymbols(obj) + symbols, err := symbolizer.ReadRodataSymbols(obj) if err != nil { return nil, err } |
