cmd/internal/ld: prevent creation of .dynamic and .dynsym symbols when externally linking

This allows the removal of a fudge in data.go.

We have to defer the calls to adddynlib on non-Darwin until after we have
decided whether we are externally or internally linking.  The Macho/ELF
separation could do with some cleaning up, but: code freeze.

Fixing this once rather than per-arch is what inspired the previous CLs.

Change-Id: I0166f7078a045dc09827745479211247466c0c54
Reviewed-on: https://go-review.googlesource.com/10002
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Michael Hudson-Doyle 2015-05-12 16:07:05 +12:00 committed by Russ Cox
parent 4cfff271c2
commit ddc4c146a4
3 changed files with 14 additions and 14 deletions

View file

@ -178,6 +178,7 @@ var (
Thelinkarch *LinkArch
outfile string
dynexp []*LSym
dynlib []string
ldflag []string
havedynamic int
Funcalign int