pull/128/head
lu4p 5 years ago
parent 86420e0b38
commit c5c19a9a33

@ -162,21 +162,24 @@ func stripPCLinesAndNames(am *goobj2.ArchiveMember) {
lists := [][]*goobj2.Sym{am.SymDefs, am.NonPkgSymDefs, am.NonPkgSymRefs}
for _, list := range lists {
for _, s := range list {
if s.Func != nil {
for _, inl := range s.Func.InlTree {
inl.Line = 1
}
s.Func.PCFile = nil
s.Func.PCLine = nil
s.Func.PCInline = nil
if s.Func == nil {
continue
}
// remove unneeded debug aux symbols
s.Func.DwarfInfo = nil
s.Func.DwarfLoc = nil
s.Func.DwarfRanges = nil
s.Func.DwarfDebugLines = nil
for _, inl := range s.Func.InlTree {
inl.Line = 1
}
s.Func.PCFile = nil
s.Func.PCLine = nil
s.Func.PCInline = nil
// remove unneeded debug aux symbols
s.Func.DwarfInfo = nil
s.Func.DwarfLoc = nil
s.Func.DwarfRanges = nil
s.Func.DwarfDebugLines = nil
}
}

@ -3,7 +3,6 @@ env GOPRIVATE=test/main
# Tiny mode
garble -tiny -debugdir=.obf-src build
exec ./main$exe
stderr '\? 0'
[short] stop # no need to verify this with -short

Loading…
Cancel
Save