aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-04-30 14:22:28 -0700
committerRob Pike <r@golang.org>2013-04-30 14:22:28 -0700
commit2a1ca145cf0489160ca284e08eeca4673563c007 (patch)
treec3ef92300ccb781d05b6919fad796259a902be0e
parented9644fc3954d6852c725e2efd062fb46c0786a7 (diff)
downloadgo-2a1ca145cf0489160ca284e08eeca4673563c007.tar.gz
go-2a1ca145cf0489160ca284e08eeca4673563c007.zip
cmd/ld: when linking externally, only generate dwarf info for ELF
R=golang-dev, iant CC=golang-dev https://golang.org/cl/9025047
-rw-r--r--src/cmd/ld/dwarf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/ld/dwarf.c b/src/cmd/ld/dwarf.c
index 79f1ebb711..98b03f1c38 100644
--- a/src/cmd/ld/dwarf.c
+++ b/src/cmd/ld/dwarf.c
@@ -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");