An error occurred fetching the project authors.
  1. 31 Oct, 2015 1 commit
  2. 29 Oct, 2015 1 commit
  3. 28 Oct, 2015 2 commits
  4. 19 Oct, 2015 1 commit
  5. 08 Oct, 2015 1 commit
  6. 06 Oct, 2015 1 commit
    • Michael Hudson-Doyle's avatar
      cmd/link: set the ELF headers of ARM executables that use cgo correctly · 3e6334e2
      Michael Hudson-Doyle authored
      It is generally expected that the ELF flags of a dynamically linked executable
      and the libraries it links against match. Go's linker currently always produces
      executables with flags that do not declare a float abi (hard, soft) at all, but
      when cgo is involved it is unlikely that this matches the system libraries
      being linked against -- really the decision about ABI is made by the C compiler
      during the invocation of cgo.
      
      This change is basically a port of the code from binutils that parses the
      ".ARM.attributes" section to check for the tag that declares that the code is
      built for the hard-float ABI.
      
      Fixes #7094
      
      Change-Id: I737c8f3b5ed4af545cfc3e86722d03eb83083402
      Reviewed-on: https://go-review.googlesource.com/14860
      Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMinux Ma <minux@golang.org>
      3e6334e2
  7. 08 Sep, 2015 1 commit
  8. 04 Sep, 2015 3 commits
    • Shawn Walker-Salas's avatar
      cmd/go: fix Go buildid reading on Solaris · 4f74de1e
      Shawn Walker-Salas authored
      TestNoteReading fails on Solaris with linkmode=external due to some
      assumptions made about how ELF .note sections are written by some
      linkers.
      
      On current versions of Solaris and older derivatives, SHF_ALLOC is
      intentionally ignored for .note sections unless the .note section is
      assigned to the text segment via a mapfile.  Also, if .note sections
      are assigned to the text segment, no PT_NOTE program header will be
      created thwarting Go's attempts at attempting to quickly find the
      .note.
      
      Furthermore, Go assumes that the relevant note segment will be placed
      early in the file while the Solaris linker currently places the note
      segment last in the file, additionally thwarting Go's optimisation
      attempts that read only the first 16KB of the file to find the
      buildid.
      
      The fix is to detect when the note section is outside of the first
      16KB of the file and then fallback to additionally reading that
      section of the file.  This way, in future versions of Solaris when
      this linking behaviour is changed, the fast path will always succeed
      and we'll only be slower if it fails; likewise, any other linker that
      does this will also just work.
      
      Fixes #12178
      
      Change-Id: I61c1dc3f744ae3ad63938386d2ace8a432c0efe1
      Reviewed-on: https://go-review.googlesource.com/14210
      Run-TryBot: Aram Hăvărneanu <aram@mgk.ro>
      Reviewed-by: default avatarAram Hăvărneanu <aram@mgk.ro>
      4f74de1e
    • Dave Cheney's avatar
      Revert "cmd/internal/ld: put read-only relocated data into .data.rel.ro when... · e49b2460
      Dave Cheney authored
      Revert "cmd/internal/ld: put read-only relocated data into .data.rel.ro when making a shared object"
      
      This reverts commit 2c2cbb69.
      
      Broke darwin/arm64
      
      Change-Id: Ibd2dea475d6ce6a8b4b40e2da19a83fc0514025d
      Reviewed-on: https://go-review.googlesource.com/14301Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      e49b2460
    • Michael Hudson-Doyle's avatar
      cmd/internal/ld: put read-only relocated data into .data.rel.ro when making a shared object · 2c2cbb69
      Michael Hudson-Doyle authored
      Currently Go produces shared libraries that cannot be shared between processes
      because they have relocations against the text segment (not text section). This
      fixes this by moving some data to sections with magic names recognized by the
      static linker.
      
      Fixes #10914
      Updates #9210
      
      Change-Id: I7178daadc0ae87953d5a084aa3d580f4e3b46d47
      Reviewed-on: https://go-review.googlesource.com/10300
      Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      2c2cbb69
  9. 03 Sep, 2015 1 commit
  10. 31 Jul, 2015 1 commit
  11. 11 Jul, 2015 1 commit
  12. 29 Jun, 2015 1 commit
  13. 05 Jun, 2015 2 commits
  14. 27 May, 2015 3 commits
    • Michael Hudson-Doyle's avatar
      cmd/internal/ld: store the libraries a shared library was linked against in a note · bcc1870f
      Michael Hudson-Doyle authored
      The motivation for this is the innocuous looking test case that is added. This
      creates a stack exe -> libdep2.so -> libdep.so -> libruntime.so. The problem
      comes from the fact that a function from libdep.so gets inlined all the way
      into exe. This (unsurprisingly) means that the object file for exe references
      symbols from libdep.so, which means that -ldep needs to be passed when linking
      exe and it isn't. The fix is simply to pass it -- there is no harm in passing
      it when it's not needed.
      
      The thing is, it's not clear at all in the current code to see how the linker
      can know that libdep2 is linked against libdep. It could look through the
      DT_NEEDED entries in libdep2 and try to guess which are Go libraries, but it
      feels better to be explicit. So this adds another SHT_NOTE section that lists
      the shared libraries a shared library was linked against, and makes sure the
      complete set of depended upon shared libraries is passed to the external
      linker.
      
      Change-Id: I79aa6f98b4db4721d657a7eb7b7f062269bf49e2
      Reviewed-on: https://go-review.googlesource.com/10376Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      bcc1870f
    • Michael Hudson-Doyle's avatar
      cmd/link/internal/ld: put abi hash into a note · 65518032
      Michael Hudson-Doyle authored
      This makes for a more stable API for tools (including cmd/link itself) to
      extract the abi hash from a shared library and makes it possible at all for a
      library that has had the local symbol table removed.
      
      The existing note-writing code only supports writing notes into the very start
      of the object file so they are easy to find in core dumps. This doesn't apply
      to the "go" notes and means that all notes have to fit into a fixed size
      budget. That's annoying now we have more notes (and the next CL will add
      another one) so this does a little bit of work to make adding notes that do not
      have to go at the start of the file easier and moves the writing of the package
      list note over to that mechanism, which lets me revert a hack that increased
      the size budget mentioned above for -buildmode=shared builds.
      
      Change-Id: I6077a68d395c8a2bc43dec8506e73c71ef77d9b9
      Reviewed-on: https://go-review.googlesource.com/10375Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      65518032
    • Michael Hudson-Doyle's avatar
      cmd/link: replace interface{} fields with concrete types · cf2736c4
      Michael Hudson-Doyle authored
      The LSym.Section and Section.Elfsect fields were defined as interface{} but
      always had the same concrete type (*Section and *ElfShdr respectively) so just
      define them with that type. Reduces size of LSym from 328 to 320 bytes and
      reduces best-of-10 maxresident size from 246028k to 238036k when linking
      libstd.so.
      
      Change-Id: Ie7112c53e4c2c7ce5fe233b81372aa5633f572e8
      Reviewed-on: https://go-review.googlesource.com/10410Reviewed-by: default avatarMinux Ma <minux@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      cf2736c4
  15. 21 May, 2015 1 commit
  16. 15 May, 2015 1 commit
  17. 06 May, 2015 1 commit
  18. 05 May, 2015 1 commit
  19. 30 Apr, 2015 1 commit
  20. 29 Apr, 2015 1 commit
  21. 23 Apr, 2015 1 commit
  22. 20 Apr, 2015 1 commit
  23. 17 Apr, 2015 1 commit
  24. 15 Apr, 2015 2 commits
  25. 12 Apr, 2015 1 commit
    • David Crawshaw's avatar
      cmd/interal/ld: darwin c-archive buildmode support · ced7ffe9
      David Crawshaw authored
      Uses ar to create an archive when -buildmode=c-archive.
      
      A small example (that I hope to turn into a test in a later CL):
      
      goarchive.go:
      	package main
      
      	import "fmt"
      
      	import "C"
      
      	func init() {
      		fmt.Println("ran go init")
      	}
      
      	//export FuncInGo
      	func FuncInGo() {
      		fmt.Println("called a go function")
      	}
      
      	func main() {
      		fmt.Println("in main")
      	}
      
      This can be compiled with:
      
      	go build -ldflags=-buildmode=c-archive -o=libgo.a goarchive.go
      
      main.c:
      
      	#include <stdio.h>
      
      	extern void FuncInGo();
      
      	int main(void) {
      		printf("c hello\n");
      		FuncInGo();
      		printf("c goodbye\n");
      		return 0;
      	}
      
      Can be compiled with:
      
      	cc main.c libgo.a
      
      Apple provide a warning about the lack of PIE, but still produce a
      binary which runs and outputs (on darwin/amd64):
      
      	c hello
      	ran go init
      	called a go function
      	c goodbye
      
      Change-Id: I7611925f210a83afa6bd1e66a5601dd636a428c8
      Reviewed-on: https://go-review.googlesource.com/8711Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      ced7ffe9
  26. 09 Apr, 2015 1 commit
  27. 08 Apr, 2015 4 commits
  28. 01 Apr, 2015 1 commit
  29. 17 Mar, 2015 1 commit
  30. 16 Mar, 2015 1 commit