Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: select DWARF 4 when using external linker #22455
When a user requests external linkage, the Go linker seems to be invoking the external linker with the "-gdwarf-2" flag (asking for DWARF version 2). Example:
Given that the DWARF produced by the Go compiler is now DWARF 4, I don't think it makes sense to continue to use this flag. When I look at the dwarf from the himom.go build above, it appears that all compilation units in the .debug_info are showing version 4 except for this one:
Not sure what the original thinking was for doing this, but it doesn't seem useful now.
For the record, we started passing