cmd/link: fix zig-zag decoding

The >>1 shift needs to happen before converting to int32, otherwise
large values will decode with an incorrect sign bit.

The <<31 shift can happen before or after, but before is consistent
with liblink and the go12symtab doc.

Bug demo at http://play.golang.org/p/jLrhPUakIu

LGTM=rsc
R=golang-codereviews, minux, rsc
CC=golang-codereviews
https://codereview.appspot.com/119630043

Committer: Russ Cox <rsc@golang.org>
cmd/6g, cmd/8g: fix, test byte-sized magic multiply

Credit to Rémy for finding and writing test case.

Fixes issue 8325.

LGTM=r
R=golang-codereviews, r
CC=dave, golang-codereviews, iant, remyoudompheng
https://codereview.appspot.com/124950043
A+C: Andrew Bursavich (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://codereview.appspot.com/124120043
misc/nacl/testzip.proto: add fewer files to the zip

LGTM=bradfitz, rsc
R=rsc, iant, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/126940043
runtime: no need to set R9 to m for runtime.sigpanic anymore

Replaces CL 123980043 which I created on the dev.power64 branch.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://codereview.appspot.com/123120043
cmd/8g: fix build

Fixes issue 8510.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/129720043
cmd/gc: comma-ok assignments produce untyped bool as 2nd result

LGTM=rsc
R=gri, rsc
CC=golang-codereviews
https://codereview.appspot.com/127950043
compress/{gzip,zlib}: mention that Close flushes

Our other CloseFlushers (archive/tar, compress/flate) do mention this.

The original change was accidentally submitted to the release branch:
        https://codereview.appspot.com/117430043/

TBR=rsc
R=r, rsc
CC=golang-codereviews
https://codereview.appspot.com/124130043
crypto/tls: implement tls-unique channel binding (RFC 5929 section 3).
Tested against GnuTLS and Python.

LGTM=agl
R=golang-codereviews, agl, ashankar
CC=agl, golang-codereviews
https://codereview.appspot.com/117100043

Committer: Adam Langley <agl@golang.org>
cmd/cgo: iterate over names in deterministic order

This makes GCC behavior (and cgo build failures) deterministic.

Fixes issue 8487.

Ran this shell command on linux/amd64 (Ubuntu 12.04) before and
after this change:

    for x in `seq 100`; do
      go tool cgo -debug-gcc=true issue8441.go 2>&1 | md5sum
    done | sort | uniq -c

Before:
    67 2cdcb8c7c4e290f7d9009abc581b83dd  -
    10 9a55390df94f7cec6d810f3e20590789  -
    10 acfad22140d43d9b9517bbc5dfc3c0df  -
    13 c337f8fee2304b3a8e3158a4362d8698  -

After:
    100 785c316cbcbcd50896695050e2fa23c1  -

LGTM=minux, iant
R=golang-codereviews, bradfitz, minux, iant
CC=golang-codereviews
https://codereview.appspot.com/126990043

Committer: Ian Lance Taylor <iant@golang.org>
cmd/cgo: fix default alignment for empty structs

Fixes issue 5242.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/125120043

Committer: Ian Lance Taylor <iant@golang.org>
run.bash: run misc/cgo/testgodefs/test.bash

misc/cgo/testgodefs was added by revision d1cf884a594f, but not
add to run.bash.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/129760044

Committer: Ian Lance Taylor <iant@golang.org>
A+C: Thiago Fransosi Farina (individual CLA)

Generated by a+c.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://codereview.appspot.com/125960043
dist: Make vaddn private to buf.c

This function does not have a declaration/prototype in a.h, and it is used only
in buf.c, so it is local to it and thus can be marked as private by adding
'static' to it.

LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://codereview.appspot.com/122300043

Committer: Ian Lance Taylor <iant@golang.org>
cmd/cgo: make C function pointers non-assignable

Fixes issue 7757.
Fixes issue 8488.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/118690044

Committer: Ian Lance Taylor <iant@golang.org>
runtime/pprof: fix data race
It's unclear why we do this broken double-checked locking.
The mutex is not held for the whole duration of CPU profiling.
Fixes issue 8365.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/116290043
runtime: remove FlagNoProfile
Turns out to be unused as well.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews, khr
https://codereview.appspot.com/127170044
crypto/rand: use getrandom system call on Linux

Adds internal/syscall package.

Fixes Issue 8520

LGTM=r, agl
R=agl, rsc, r
CC=golang-codereviews, iant
https://codereview.appspot.com/123260044
doc: document go1.3.1

LGTM=r
R=r, rsc
CC=golang-codereviews
https://codereview.appspot.com/126060043
cmd/go, go/build: implement import comment checking

See golang.org/s/go14customimport for design.

Added case to deps_test to allow go/build to import regexp.
Not a new dependency, because go/build already imports go/doc
which imports regexp.

Fixes issue 7453.

LGTM=r
R=r, josharian
CC=golang-codereviews
https://codereview.appspot.com/124940043