mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: revert DWARF version to 2 for .debug_lines
On OSX 10.12 and earlier, paired with XCode 9.0, specifying DWARF version 3 causes dsymutil to misbehave. Version 2 appears to be good enough to allow processing of the prologue_end opcode on (at least one version of) Linux and OSX 10.13. Fixes #25451. Change-Id: Ic760e34248393a5386be96351c8e492da1d3413b Reviewed-on: https://go-review.googlesource.com/114015 Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
685ecc7f02
commit
402dd10a99
1 changed files with 1 additions and 1 deletions
|
|
@ -1158,7 +1158,7 @@ func writelines(ctxt *Link, lib *sym.Library, textp []*sym.Symbol, ls *sym.Symbo
|
|||
unitLengthOffset := ls.Size
|
||||
ls.AddUint32(ctxt.Arch, 0) // unit_length (*), filled in at end.
|
||||
unitstart = ls.Size
|
||||
ls.AddUint16(ctxt.Arch, 3) // dwarf version (appendix F)
|
||||
ls.AddUint16(ctxt.Arch, 2) // dwarf version (appendix F) -- version 3 is incompatible w/ XCode 9.0's dsymutil, latest supported on OSX 10.12 as of 2018-05
|
||||
headerLengthOffset := ls.Size
|
||||
ls.AddUint32(ctxt.Arch, 0) // header_length (*), filled in at end.
|
||||
headerstart = ls.Size
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue