]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: fix -s flag for ELF executables
authorAnthony Martin <ality@pbrane.org>
Fri, 15 Feb 2013 02:43:54 +0000 (18:43 -0800)
committerAnthony Martin <ality@pbrane.org>
Fri, 15 Feb 2013 02:43:54 +0000 (18:43 -0800)
This fixes a regression introduced in changeset 98034d036d03
which added support for producing host object files.

R=rsc, minux.ma
CC=dave, golang-dev
https://golang.org/cl/7307107

src/cmd/ld/elf.c

index c771d10ec379b1ff97fb98be233d909907c57ebc..630906653ec70116abc69763f9b49e4bd13f7c3a 100644 (file)
@@ -1398,8 +1398,10 @@ elfobj:
        eh->shstrndx = sh->shnum;
 
        // put these sections early in the list
-       elfshname(".symtab");
-       elfshname(".strtab");
+       if(!debug['s']) {
+               elfshname(".symtab");
+               elfshname(".strtab");
+       }
 
        for(sect=segtext.sect; sect!=nil; sect=sect->next)
                elfshbits(sect);