aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ld
diff options
context:
space:
mode:
authorAnthony Martin <ality@pbrane.org>2013-02-14 18:43:54 -0800
committerAnthony Martin <ality@pbrane.org>2013-02-14 18:43:54 -0800
commitf2c3122307fc91b792226facbe1da1f48eec9be5 (patch)
tree2f587eeea4f523c9ddf99d42e3e9c2506cae718e /src/cmd/ld
parent7c5bd322d53cdcbfb59db334ba243502ae170803 (diff)
downloadgo-f2c3122307fc91b792226facbe1da1f48eec9be5.tar.xz
cmd/ld: fix -s flag for ELF executables
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
Diffstat (limited to 'src/cmd/ld')
-rw-r--r--src/cmd/ld/elf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/ld/elf.c b/src/cmd/ld/elf.c
index c771d10ec3..630906653e 100644
--- a/src/cmd/ld/elf.c
+++ b/src/cmd/ld/elf.c
@@ -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);