diff --git a/go/profile/compile_ghidra_artifacts.go b/go/profile/compile_ghidra_artifacts.go index e1c8798..817d15d 100644 --- a/go/profile/compile_ghidra_artifacts.go +++ b/go/profile/compile_ghidra_artifacts.go @@ -3,6 +3,8 @@ package profile import ( "os" "path/filepath" + + "github.com/thunderbrewhq/binana/go/symbols" ) func compile_ghidra_artifacts(profile *Profile, params *CompileArtifactsParams) (err error) { @@ -15,8 +17,18 @@ func compile_ghidra_artifacts(profile *Profile, params *CompileArtifactsParams) if err != nil { return } + // strip out autoanalysis symbols + var symbol_table symbols.Table + symbol_table.Init() + for entry := range profile.Symbols.Entries() { + if !entry.Symbol.Auto { + if err = symbol_table.Insert(entry); err != nil { + return + } + } + } - _, err = profile.Symbols.WriteTo(symbol_file) + _, err = symbol_table.WriteTo(symbol_file) symbol_file.Close() return } diff --git a/go/profile/compile_idapro_artifacts.go b/go/profile/compile_idapro_artifacts.go index 172aa02..9d08ab0 100644 --- a/go/profile/compile_idapro_artifacts.go +++ b/go/profile/compile_idapro_artifacts.go @@ -107,6 +107,11 @@ func compile_idapro_artifacts(profile *Profile, params *CompileArtifactsParams) name_instances := make(map[string]int) for symbol := range profile.Symbols.Entries() { + if symbol.Symbol.Auto { + // Ignore auto-analysis symbols + continue + } + name := symbol.Symbol.Name instances := name_instances[name] name_instances[name] = instances + 1