Closed
Description
In src/runtime/testdata/testprogcgo, running the final parts of a link by hand:
$ ls -l testprogcgo
-rwxr-xr-x 1 rsc eng 2008504 Mar 29 14:35 testprogcgo
$ dsymutil -f testprogcgo -o testprogcgo.dw
warning: (x86_64) /tmp/go.o unable to open object file: Invalid data was encountered while parsing the file
$ echo $?
0
$
The resulting binary is malformed.
This is the root cause of #19734, but we'll treat that issue as fixed by the workaround of not trusting dsymutil's exit status when it prints "warnings" (for backport to Go 1.8).
This issue is to fix our object files to be compatible with dsymutil, for Go 1.9.