aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlessandro Arzilli <alessandro.arzilli@gmail.com>2018-05-13 15:17:40 +0200
committerDavid Chase <drchase@google.com>2018-05-13 20:09:56 +0000
commit3636d53c6119fd1b8a5f9e309fdf65c79952d398 (patch)
tree718076a8602a7f83f044a51dbd6ffad195373ef0 /src
parent6495bf17105fbf5c76a719bdea3f383eea8b28db (diff)
downloadgo-3636d53c6119fd1b8a5f9e309fdf65c79952d398.tar.xz
cmd/link: writelines should keep is_stmt in sync with what it's writing
For all functions but the last one if the function ends on a non-statement instruction the statement flag in debug_line is changed but is_stmt is not updated to match. Change-Id: I03c275c5e261ea672ce4da7baca2458810708326 Reviewed-on: https://go-review.googlesource.com/112979 Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/link/internal/ld/dwarf.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go
index 6232ab6e2f..9a75ad96f1 100644
--- a/src/cmd/link/internal/ld/dwarf.go
+++ b/src/cmd/link/internal/ld/dwarf.go
@@ -1302,6 +1302,7 @@ func writelines(ctxt *Link, lib *sym.Library, textp []*sym.Symbol, ls *sym.Symbo
}
if is_stmt == 0 && i < len(textp)-1 {
// If there is more than one function, ensure default value is established.
+ is_stmt = 1
ls.AddUint8(uint8(dwarf.DW_LNS_negate_stmt))
}
}