diff --git a/cache_shared.go b/cache_shared.go index a42ed1c..276f632 100644 --- a/cache_shared.go +++ b/cache_shared.go @@ -152,7 +152,8 @@ type listedPackage struct { Standard bool Dir string - CompiledGoFiles []string + CompiledGoFiles []string // all .go files to build + SFiles []string // all .s (asm) files to build Imports []string Error *packageError // to report package loading errors to the user diff --git a/reverse.go b/reverse.go index 85d751e..95136fd 100644 --- a/reverse.go +++ b/reverse.go @@ -68,6 +68,14 @@ One can reverse a captured panic stack trace as follows: // Package paths are obfuscated, too. addHashedWithPackage(lpkg.ImportPath) + // Assembly filenames are obfuscated in a simple way. + // Mirroring [transformer.transformAsm]; note the lack of a test + // as so far this has only mattered for build errors with positions. + for _, name := range lpkg.SFiles { + newName := hashWithPackage(lpkg, name) + ".s" + replaces = append(replaces, newName, name) + } + files, err := parseFiles(lpkg, lpkg.Dir, lpkg.CompiledGoFiles) if err != nil { return err