]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: when linking externally, only generate dwarf info for ELF
authorRob Pike <r@golang.org>
Tue, 30 Apr 2013 21:22:28 +0000 (14:22 -0700)
committerRob Pike <r@golang.org>
Tue, 30 Apr 2013 21:22:28 +0000 (14:22 -0700)
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9025047

src/cmd/ld/dwarf.c

index 79f1ebb7112dd2d609485ea45e0018a421fe3460..98b03f1c381d9c6ce608b8343ca04957b4d76753 100644 (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");