cmd/ld: when linking externally, only generate dwarf info for ELF

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9025047
This commit is contained in:
Rob Pike 2013-04-30 14:22:28 -07:00
parent ed9644fc39
commit 2a1ca145cf
1 changed files with 3 additions and 0 deletions

View File

@ -2262,6 +2262,9 @@ dwarfemitdebugsections(void)
if(debug['w']) // disable dwarf
return;
if(linkmode == LinkExternal && !iself)
return;
// For diagnostic messages.
newattr(&dwtypes, DW_AT_name, DW_CLS_STRING, strlen("dwtypes"), "dwtypes");