1. 16 Apr, 2014 16 commits
  2. 15 Apr, 2014 13 commits
    • Rob Pike's avatar
      doc/install.html: FreeBSD 8 and higher only are supported · c8ef6776
      Rob Pike authored
      Fixes #7188
      
      LGTM=adg
      R=golang-codereviews, adg
      CC=golang-codereviews
      https://golang.org/cl/88280044
      c8ef6776
    • Rob Pike's avatar
      doc/asm.html: remove mention of 6l -a · edebe108
      Rob Pike authored
      Also make it clear this is not a complete description of all features.
      Fixes #7790.
      
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/88300044
      edebe108
    • David du Colombier's avatar
      net/http: skip TestTransportClosesBodyOnError on Plan 9 · b9f5dce4
      David du Colombier authored
      LGTM=rsc
      R=bradfitz, rsc
      CC=golang-codereviews
      https://golang.org/cl/87800044
      b9f5dce4
    • Shenghou Ma's avatar
      math/big: fix doc typos. · 0a96d64c
      Shenghou Ma authored
      Fixes #7768.
      
      LGTM=iant, gri
      R=golang-codereviews, iant, gri
      CC=golang-codereviews
      https://golang.org/cl/87260043
      0a96d64c
    • Russ Cox's avatar
      cmd/ld: attempt at fixing openbsd build · ed890e74
      Russ Cox authored
      OpenBSD is excluded from all the usual thread-local storage
      code, not just emitting the tbss section in the external link .o
      but emitting a PT_TLS section in an internally-linked executable.
      I assume it just has no proper TLS support. Exclude it here too.
      
      TBR=iant
      CC=golang-codereviews
      https://golang.org/cl/87900045
      ed890e74
    • Russ Cox's avatar
      build: disable static cgo linking test on netbsd · 568e3526
      Russ Cox authored
      We get
      /usr/lib/libc.a(stack_protector.o): In function `__stack_chk_fail_local':
      stack_protector.c:(.text+0x158): multiple definition of `__stack_chk_fail_local'
      /var/tmp/go-link-04838a/000001.o:/tmp/gobuilder/netbsd-386-minux-c7a9e9243878/go/src/pkg/runtime/cgo/gcc_386.S:41: first defined here
      
      I am assuming this has never worked and possibly is not intended to work.
      (Some systems are vehemently against static linking.)
      
      TBR=iant
      CC=golang-codereviews
      https://golang.org/cl/88130046
      568e3526
    • Russ Cox's avatar
      cmd/ld: use TLS relocations on ELF systems in external linking mode · 6f8b1208
      Russ Cox authored
      Fixes #7719.
      
      LGTM=iant
      R=iant
      CC=golang-codereviews
      https://golang.org/cl/87760050
      6f8b1208
    • Russ Cox's avatar
      liblink: introduce TLS register on 386 and amd64 · 90093f06
      Russ Cox authored
      When I did the original 386 ports on Linux and OS X, I chose to
      define GS-relative expressions like 4(GS) as relative to the actual
      thread-local storage base, which was usually GS but might not be
      (it might be FS, or it might be a different constant offset from GS or FS).
      
      The original scope was limited but since then the rewrites have
      gotten out of control. Sometimes GS is rewritten, sometimes FS.
      Some ports do other rewrites to enable shared libraries and
      other linking. At no point in the code is it clear whether you are
      looking at the real GS/FS or some synthesized thing that will be
      rewritten. The code manipulating all these is duplicated in many
      places.
      
      The first step to fixing issue 7719 is to make the code intelligible
      again.
      
      This CL adds an explicit TLS pseudo-register to the 386 and amd64.
      As a register, TLS refers to the thread-local storage base, and it
      can only be loaded into another register:
      
              MOVQ TLS, AX
      
      An offset from the thread-local storage base is written off(reg)(TLS*1).
      Semantically it is off(reg), but the (TLS*1) annotation marks this as
      indexing from the loaded TLS base. This emits a relocation so that
      if the linker needs to adjust the offset, it can. For example:
      
              MOVQ TLS, AX
              MOVQ 8(AX)(TLS*1), CX // load m into CX
      
      On systems that support direct access to the TLS memory, this
      pair of instructions can be reduced to a direct TLS memory reference:
      
              MOVQ 8(TLS), CX // load m into CX
      
      The 2-instruction and 1-instruction forms correspond roughly to
      ELF TLS initial exec mode and ELF TLS local exec mode, respectively.
      
      Liblink applies this rewrite on systems that support the 1-instruction form.
      The decision is made using only the operating system (and probably
      the -shared flag, eventually), not the link mode. If some link modes
      on a particular operating system require the 2-instruction form,
      then all builds for that operating system will use the 2-instruction
      form, so that the link mode decision can be delayed to link time.
      
      Obviously it is late to be making changes like this, but I despair
      of correcting issue 7719 and issue 7164 without it. To make sure
      I am not changing existing behavior, I built a "hello world" program
      for every GOOS/GOARCH combination we have and then worked
      to make sure that the rewrite generates exactly the same binaries,
      byte for byte. There are a handful of TODOs in the code marking
      kludges to get the byte-for-byte property, but at least now I can
      explain exactly how each binary is handled.
      
      The targets I tested this way are:
      
              darwin-386
              darwin-amd64
              dragonfly-386
              dragonfly-amd64
              freebsd-386
              freebsd-amd64
              freebsd-arm
              linux-386
              linux-amd64
              linux-arm
              nacl-386
              nacl-amd64p32
              netbsd-386
              netbsd-amd64
              openbsd-386
              openbsd-amd64
              plan9-386
              plan9-amd64
              solaris-amd64
              windows-386
              windows-amd64
      
      There were four exceptions to the byte-for-byte goal:
      
      windows-386 and windows-amd64 have a time stamp
      at bytes 137 and 138 of the header.
      
      darwin-386 and plan9-386 have five or six modified
      bytes in the middle of the Go symbol table, caused by
      editing comments in runtime/sys_{darwin,plan9}_386.s.
      
      Fixes #7164.
      
      LGTM=iant
      R=iant, aram, minux.ma, dave
      CC=golang-codereviews
      https://golang.org/cl/87920043
      90093f06
    • Rob Pike's avatar
      text/template: say more often that templates are safe for parallel execution · aeb37527
      Rob Pike authored
      It was said already but apparently not enough times.
      
      Fixes #6985.
      
      LGTM=crawshaw
      R=golang-codereviews, crawshaw
      CC=golang-codereviews
      https://golang.org/cl/86300043
      aeb37527
    • Dmitriy Vyukov's avatar
      runtime: fix program termination when main goroutine calls Goexit · 55e0f36f
      Dmitriy Vyukov authored
      Do not consider idle finalizer/bgsweep/timer goroutines as doing something useful.
      We can't simply set isbackground for the whole lifetime of the goroutines,
      because when finalizer goroutine calls user function, we do want to consider it
      as doing something useful.
      This is borken due to timers for quite some time.
      With background sweep is become even more broken.
      Fixes #7784.
      
      LGTM=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/87960044
      55e0f36f
    • Jan Ziak's avatar
      cmd/dist: use GOHOSTARCH/GOHOSTOS instead of GOOS/GOARCH for host libraries and binaries · d826b2ed
      Jan Ziak authored
      Fixes #6559
      
      LGTM=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/81330045
      d826b2ed
    • Brad Fitzpatrick's avatar
      os/exec: quiet distracting log output during test · e45141b8
      Brad Fitzpatrick authored
      TLS handshake failures didn't use to log, but do in Go 1.3.
      Shut it up so the actual failure can be seen in e.g.
      http://build.golang.org/log/ede7e12362a941d93bf1fe21db9208a3e298029e
      
      LGTM=adg
      R=adg
      CC=golang-codereviews
      https://golang.org/cl/87870043
      e45141b8
    • Andrew Gerrand's avatar
      undo CL 87300043 / 1dc800571456 · 85ddc689
      Andrew Gerrand authored
      This breaks "go get -d repo/path/...".
      
      ««« original CL description
      cmd/go: do not miss an error if import path contains "cmd/something"
      
      Fixes #7638
      
      LGTM=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/87300043
      »»»
      
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/87890043
      85ddc689
  3. 14 Apr, 2014 11 commits