cmd/ld: emit relocs for DWARF info when doing an external link

I would like opinions on whether this is a good idea for 1.1.
On the one hand it's a moderately important issue.  On the
other hand this introduces at least the possibility of
external linker errors due to the additional relocations and
it may be better to wait.

I'm fairly confident that the behaviour is unchanged when not
using an external linker.

Update issue 5221

This CL is tested lightly on 386 and amd64 and fixes the cases
I tested.  I have not tested it on Darwin or Windows.

R=golang-dev, dave, daniel.morsing, rsc
CC=golang-dev
https://codereview.appspot.com/8858047
cmd/go: undo CL 8119049

Manual undo due to later changes in doc/go1.1.html; cmd/go/test.bash still passes.

Rationale, from CL 8119049 review log:

This makes the 'go run' command different from every other command.
For example, 'go test' does not mean 'go test *.go'.

If we were going to handle the no arguments case in 'go run', I would hope that
it would scan the current directory to find a package just like 'go build' or
'go test' would, and then it would require that package to be 'package main',
and then it would run that package. This would make it match 'go test' and 'go
build' and 'go install' and so on. It would mean that if you are working on a
command in a directory that is 'go install'able, then 'go run' will run the
binary for you. The current CL does not accomplish that when build constraints
or file name constraints are involved.

For example, if I am working on a program like:

$ ls
main.go
main_386.s
main_arm.s
main_amd64.s
$

Then 'go run' will fail here because the .s files are ignored.

If instead I am working on a program like:

$ ls
main.go
main_386.go
main_arm.go
main_amd64.go
$

then 'go run' will fail because too many files are included.

I would like to see this command implemented so that it is compatible with the
other go subcommands. Since it is too late to do that for Go 1.1, I would like
to see this CL reverted, to preserve the option to do it better later.

R=golang-dev, iant, r
CC=golang-dev
https://codereview.appspot.com/8797049
cmd/ld: when linking externally, only generate dwarf info for ELF

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/9025047
net: do not call syscall.Bind twice on windows

Fixes issue 5355.

R=golang-dev, mikioh.mikioh, bradfitz, r
CC=golang-dev
https://codereview.appspot.com/8966046

Committer: Rob Pike <r@golang.org>
doc: link to Go 1.1 release notes

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/9047045