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
This commit is contained in:
Anthony Martin 2013-02-14 18:43:54 -08:00
parent 7c5bd322d5
commit f2c3122307
1 changed files with 4 additions and 2 deletions

View 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);