An error occurred fetching the project authors.
- 02 May, 2019 1 commit
-
-
erifan01 authored
This CL improves internal link to provide basic support for cgo and PIE: 1, add support for GOT, PLT and GOTPLT. 2, add support for following ELF relocation types which have been used by std packages: R_AARCH64_ADR_GOT_PAGE R_AARCH64_LD64_GOT_LO12_NC R_AARCH64_ADR_PREL_PG_HI21 R_AARCH64_ADD_ABS_LO12_NC R_AARCH64_LDST8_ABS_LO12_NC R_AARCH64_LDST32_ABS_LO12_NC R_AARCH64_LDST64_ABS_LO12_NC R_AARCH64_JUMP26 R_AARCH64_ABS64 R_AARCH64_PREL32 R_AARCH64_PREL64 With this change, Go toolchain can be built in internal linking mode, and pure Go programs can be built with PIE mode in internal linking mode on arm64. Updates #10373 The prototype of this CL is contributed by Wei Xiao <wei.xiao@arm.com> Change-Id: I2253923c69e855fd1524d54def309a961dce6247 Reviewed-on: https://go-review.googlesource.com/c/go/+/163579Reviewed-by:
Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com>
-
- 30 Apr, 2019 1 commit
-
-
Clément Chigot authored
.go.buildinfo must be added to the symbol table on AIX. Otherwise, ld won't be able to handle its relocations. This patch also make ".data" the default section for all symbols inside the data segment. Change-Id: I83ac2bf1050e0ef6ef9c96ff793efd4ddc8e98d7 Reviewed-on: https://go-review.googlesource.com/c/go/+/174298 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Apr, 2019 1 commit
-
-
Elias Naur authored
Determine the macho platform once and use that the two places that need it. This makes it easier to add a third platform check for a follow-up change. Updates #31447 Change-Id: I522a5fface647ab8e608f816c5832d531534df7a Reviewed-on: https://go-review.googlesource.com/c/go/+/174198 Run-TryBot: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 19 Apr, 2019 1 commit
-
-
Cherry Zhang authored
Use mmap for writing most of the output file content, specifically, the sections and segments. After layout, we already know the sizes and file offsets for the sections and segments. So we can just write the bytes by copying to a mmap'd backing store. The writing of the output file is split into two parts. The first part writes the sections and segments to the mmap'd region. The second part writes some extra content, for which we don't know the size, so we use direct file IO. This is in preparation for mmap'ing input files read-only. Change-Id: I9f3b4616a9f96bfd5c940d74c50aacd6d330f7d2 Reviewed-on: https://go-review.googlesource.com/c/go/+/170738 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Austin Clements <austin@google.com>
-
- 12 Apr, 2019 1 commit
-
-
Josh Bleecher Snyder authored
Rename it to PCIter and convert it to use methods. Set pcscale once, during construction, to make call sites clearer. Change some ints to bools. Use a simple iteration termination condition, instead of the cap comparison from the c2go translation. Instead of requiring a Pcdata, which requires one caller to synthesize a fake Pcdata, just ask for a byte slice. Passes toolstash-check. Change-Id: I811da0e929cf4a806bd6d70357ccf2911cd0c737 Reviewed-on: https://go-review.googlesource.com/c/go/+/171770 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Mar, 2019 3 commits
-
-
Than McIntosh authored
Update the recently-added '-strictdups' sanity checking to avoid failing the link in cases where we have objects feeding into the link with a mix of command line flags (and in particular some with "-N" and some without). This scenario will trigger errors/warnings due to inlinable functions and wrapper functions that have different sizes due to presence or lack of optimization. Update #31034. Change-Id: I1dd9e37c2f9bea5da0ab82e32e6fc210aebf6a65 Reviewed-on: https://go-review.googlesource.com/c/go/+/169160 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
Clément Chigot authored
Change-Id: Ia268b0d64dc89866aa09bfffcaa109741088a904 Reviewed-on: https://go-review.googlesource.com/c/go/+/169119 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Elias Naur authored
We don't use the TLS section on android, and dropping it avoids complaints about underalignment from the Android Q linker. Updates #29674 Change-Id: I91dabf2a58e6eb1783872639a6a144858db09cef Reviewed-on: https://go-review.googlesource.com/c/go/+/169618Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 22 Mar, 2019 2 commits
-
-
Than McIntosh authored
Introduce a new linker command line option "-strictdups", which enables sanity checking of "ok to duplicate" symbols, especially DWARF info symbols. Acceptable values are 0 (no checking) 1 (issue warnings) and 2 (issue a fatal error checks fail). Currently if we read a DWARF symbol (such as "go.info.PKG.FUNCTION") from one object file, and then encounter the same symbol later on while reading another object file, we simply discard the second one and move on with the link, since the two should in theory be identical. If as a result of a compiler bug we wind up with symbols that are not identical, this tends to (silently) result in incorrect DWARF generation, which may or may not be discovered depending on who is consuming the DWARF and what's being done with it. When this option is turned on, at the point where a duplicate symbol is detected in the object file reader, we check to make sure that the length/contents of the symbol are the same as the previously read symbol, and print a descriptive warning (or error) if not. For the time being this can be used for one-off testing to find problems; at some point it would be nice if we can enable it by default. Updates #30908. Change-Id: I64c4e07c326b4572db674ff17c93307e2eec607c Reviewed-on: https://go-review.googlesource.com/c/go/+/168410 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
Clément Chigot authored
Change-Id: I939518462c931ba9feb125b2f299ef0706b124ce Reviewed-on: https://go-review.googlesource.com/c/go/+/168879 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 21 Mar, 2019 1 commit
-
-
Elias Naur authored
We're going to need the ability to extract the LC_VERSION_MIN_* and LC_BUILD_VERSION load commands. This CL adds peekMachoPlatform to do that and in the process simplifies machoCombineDwarf. While here, disable DWARF combining for Apple platforms other than macOS (watchOS, tvOS, bridgeOS), not just iOS. Updates #22395 Change-Id: I4862b0f15ccc87b7be1a6532b4d37b47c8f7f243 Reviewed-on: https://go-review.googlesource.com/c/go/+/168459Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 19 Mar, 2019 1 commit
-
-
Clément Chigot authored
C trampolines are made by fixup CSECTS which are added between two symbols. If such CSECTS is added inside Go functions, all method offsets stored in moduledatas will be wrong. In order to prevent this, every C code is moved at the end of the executable and long calls are created for GO functions called by C code. The main function can't longer be made in Go as AIX __start isn't using a long call to branch on it. Therefore, a main is defined on runtime/cgo. Change-Id: I214b18decdb83107cf7325b298609eef9f9d1330 Reviewed-on: https://go-review.googlesource.com/c/go/+/164010 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 15 Mar, 2019 1 commit
-
-
Clément Chigot authored
This commit fixes trampoline generation on aix/ppc64 which must use TOC symbols. It also adds a size to runtime.text.X symbols to prevent ld from moving them, like runtime.text. Change-Id: Ida033ec20ad8d7b7fb3faeb0ec4fa7bc4ce86b7e Reviewed-on: https://go-review.googlesource.com/c/go/+/164009 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 13 Mar, 2019 2 commits
-
-
Clément Chigot authored
-mcmodel=large and -Wl,-bbigtoc must always be passed to gcc in order to prevent TOC overflow error. However, a warning is still issued by ld. It is removed as it doesn't give any useful information. Change-Id: I95a78e8993cc7b5c0f329654d507409785f7eea6 Reviewed-on: https://go-review.googlesource.com/c/go/+/164008 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
DWARF relocations isn't working with some older ld, because of -Wl,-bnoobjreorder which is needed on Go. This commit checks ld's version and disable DWARF generation in cmd/link if it's too old. Some tests must therefore be skipped. Change-Id: I2e794c263eb0dfe0b42e7062fb80c26f086b44d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/164007 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 08 Mar, 2019 1 commit
-
-
Clément Chigot authored
Change-Id: I6638cb0f9ed751c76a29cae62a93a923f18f14f3 Reviewed-on: https://go-review.googlesource.com/c/go/+/164005 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 06 Mar, 2019 2 commits
-
-
Clément Chigot authored
Moduledata symbols like runtime.data or runtime.text must have the same position in the final executable (as some symbol accesses are made by offset from them). ld on AIX might move them randomly if there are nil size symbols. ld will also remove unreachable symbols like runtime.epclntab or runtime.rodata. In order to keep them, R_REF relocations are created between firstmoduledata and these symbols. This relocation tells ld to keep these symbols even if there aren't reachable. Change-Id: Ie5a28cf406977131cec6442f7f5b6fd89fb775a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/164004 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit adds external linking in cmd/link for aix/ppc64. As relocations on .text data aren't possible on AIX, Segrelrodata is used to move all these datas to .data section. Change-Id: I4d1361c1fc9290e11e6f5560864460c76551dbeb Reviewed-on: https://go-review.googlesource.com/c/go/+/164003 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 09 Jan, 2019 1 commit
-
-
Clément Chigot authored
This commit allows to cross-compiling aix/ppc64. The nosplit limit must twice as large as on others platforms because of AIX syscalls. The stack limit, especially stackGuardMultiplier, was set by cmd/dist during the bootstrap and doesn't depend on GOOS/GOARCH target. Fixes #29572 Change-Id: Id51e38885e1978d981aa9e14972eaec17294322e Reviewed-on: https://go-review.googlesource.com/c/157117 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 18 Dec, 2018 1 commit
-
-
Joel Sing authored
Add support for cgo on openbsd/arm.The gcc shipped with base OpenBSD armv7 is old/inadequate, so use clang by default. Change-Id: I945a26d369378952d357727718e69249411e1127 Reviewed-on: https://go-review.googlesource.com/c/154381 Run-TryBot: Joel Sing <joel@sing.id.au> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 15 Dec, 2018 1 commit
-
-
Shenghou Ma authored
CL 146297 ignored archive members with short names that don't have the .o suffix, however, it also ignored .syso files as well. This change restores the original .syso behavior and adds a test. As the test is basically following a shell script, we make use of the existing cmd/go/testdata/script framework. To support running C compiler in the script, we added a `cc` command, which runs the C compiler along with correct platform specific arguments. Fixes #29253. Change-Id: If8520151c4d6a74ab9fe84d34bff9a4480688815 Reviewed-on: https://go-review.googlesource.com/c/154109 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Cherry Zhang <cherryyz@google.com> Reviewed-by:
Alan Donovan <adonovan@google.com>
-
- 05 Dec, 2018 1 commit
-
-
Ian Lance Taylor authored
Fixes #29110 Change-Id: I077d1a9caa7f4545de1418cec718c4a37ac36ef8 Reviewed-on: https://go-review.googlesource.com/c/152757 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 02 Dec, 2018 1 commit
-
-
Tobias Klauser authored
Follow-up for CL 147037 and after Brad noticed the "returns whether" pattern during the review of CL 150621. Go documentation style for boolean funcs is to say: // Foo reports whether ... func Foo() bool (rather than "returns whether") Created with: $ perl -i -npe 's/returns whether/reports whether/' $(git grep -l "returns whether" | grep -v vendor) Change-Id: I15fe9ff99180ad97750cd05a10eceafdb12dc0b4 Reviewed-on: https://go-review.googlesource.com/c/150918 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Nov, 2018 2 commits
-
-
Elias Naur authored
After CL 151139 introduced a plugin test, the macOS linker for iOS outputs: ld: warning: -flat_namespace is deprecated on iOS Omit the -flat_namespace flag on iOS; plugins are not supported on iOS, and unlikely to ever be. Change-Id: I2d08f8b984efcfd442d572b4a0f3a2c95c551b9f Reviewed-on: https://go-review.googlesource.com/c/151300 Run-TryBot: Elias Naur <elias.naur@gmail.com> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
When building windows/386 executable that imports "plugin" package, cmd/link adds reference to DLL with blank name. Running objdump -x a.exe reports ... The Import Tables (interpreted .idata section contents) ... DLL Name: vma: Hint/Ord Member-Name Bound-To 25308a 0 _GLOBAL_OFFSET_TABLE_ ... So, obviously, executable cannot run, because Windows complains that it cannot find DLL when trying to run it. Stop using _GLOBAL_OFFSET_TABLE_ on windows/386. Fixes #28789 Change-Id: Idd489eafd998f6e329f40c5d90a2a8965ab1d873 Reviewed-on: https://go-review.googlesource.com/c/151139 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 12 Nov, 2018 2 commits
-
-
Austin Clements authored
This implements compiler and linker support for separating the function calling ABI into two ABIs: a stable and an internal ABI. At the moment, the two ABIs are identical, but we'll be able to evolve the internal ABI without breaking existing assembly code that depends on the stable ABI for calling to and from Go. The Go compiler generates internal ABI symbols for all Go functions. It uses the symabis information produced by the assembler to create ABI wrappers whenever it encounters a body-less Go function that's defined in assembly or a Go function that's referenced from assembly. Since the two ABIs are currently identical, for the moment this is implemented using "ABI alias" symbols, which are just forwarding references to the native ABI symbol for a function. This way there's no actual code involved in the ABI wrapper, which is good because we're not deriving any benefit from it right now. Once the ABIs diverge, we can eliminate ABI aliases. The linker represents these different ABIs internally as different versions of the same symbol. This way, the linker keeps us honest, since every symbol definition and reference also specifies its version. The linker is responsible for resolving ABI aliases. Fixes #27539. Change-Id: I197c52ec9f8fc435db8f7a4259029b20f6d65e95 Reviewed-on: https://go-review.googlesource.com/c/147160 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
Austin Clements authored
We're going to use the linker's symbol versions to track ABIs. Currently, version 0 is used for global symbols and version > 0 is used for file-local symbols. This CL reserves versions 0 to 9 for global symbols with ABIs and uses version 10 and up for file-local symbols. To make this clean, it also introduces a method on Symbol for querying whether it's file-local. For #27539. Change-Id: Id3bc7369268f35128b14318a62e86335181a80e5 Reviewed-on: https://go-review.googlesource.com/c/146859 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com> Reviewed-by:
Heschi Kreinick <heschi@google.com>
-
- 02 Nov, 2018 1 commit
-
-
Alan Donovan authored
For many build systems, modular static analysis is most conveniently implemented by saving analysis facts (which are analogous to export data) in an additional section in the archive file, similar to __PKGDEF. See golang.org/x/tools/go/analysis for an overview. Because such sections are not object files, the linker must not attempt to link them. This change causes the linker to skip special sections whose name does not end with .o (and is short enough not to be truncated). Fixes #28429 Change-Id: I830852decf868cb017263308b114f72838032993 Reviewed-on: https://go-review.googlesource.com/c/146297 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 25 Oct, 2018 1 commit
-
-
Russ Cox authored
Certain installations of Xcode are affected by a bug that causes them to print an inconsequential link-time warning that looks like: ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking. This has nothing to do with Go, and we've sent this repro case to Apple: $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version version: 10.0.0.0.1.1535735448 $ clang --version Apple LLVM version 10.0.0 (clang-1000.10.44.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin $ cat > issue.c int main() { return 0; } ^D $ clang issue.c -framework CoreFoundation ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking. $ Even if Apple does release a fixed Xcode, many people are seeing this useless warning, and we might as well make it go away. Fixes #26073. Change-Id: Ifc17ba7da1f6b59e233c11ebdab7241cb6656324 Reviewed-on: https://go-review.googlesource.com/c/144112Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Andrew Bonventre <andybons@golang.org>
-
- 24 Oct, 2018 1 commit
-
-
Clément Chigot authored
This commit adds AIX operating system to cmd/link package for ppc64 architecture. Updates: #25893 Change-Id: I349e0a2658c31919b72117b62c4c9935c9af07c0 Reviewed-on: https://go-review.googlesource.com/c/138730 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 08 Oct, 2018 1 commit
-
-
Igor Zhilianin authored
Change-Id: I94cebca86706e072fbe3be782d3edbe0e22b9432 GitHub-Last-Rev: 8e15a40545704fb21b41a8768079f2da19341ef3 GitHub-Pull-Request: golang/go#28067 Reviewed-on: https://go-review.googlesource.com/c/140437 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 06 Oct, 2018 1 commit
-
-
Igor Zhilianin authored
Change-Id: If2954bdfc551515403706b2cd0dde94e45936e08 GitHub-Last-Rev: d4cfc41a5504cf10befefdb881d4c45986a1d1f8 GitHub-Pull-Request: golang/go#28049 Reviewed-on: https://go-review.googlesource.com/c/140299Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 11 Sep, 2018 2 commits
-
-
Ian Lance Taylor authored
Some linker flags can actually be input files, which can cause misleading errors when doing the trial link, which can cause the linker to incorrectly decide that the flag is not supported, which can cause the link to fail. Fixes #27510 Updates #27110 Updates #27293 Change-Id: I70c1e913cee3c813e7b267bf779bcff26d4d194a Reviewed-on: https://go-review.googlesource.com/134057 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by:
Damien Neil <dneil@google.com>
-
Lynn Boger authored
Use the binary.{Big,Little}Endian integer encoding methods rather than variations found in local implementations. The functions in the binary package have been tested to ensure they inline correctly and don't add unnecessary bounds checking. Change-Id: Ie10111ca6edb7c11e8e5e21c58a5748ae99b7f87 Reviewed-on: https://go-review.googlesource.com/134375 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Michael Munday <mike.munday@ibm.com>
-
- 04 Sep, 2018 1 commit
-
-
Alessandro Arzilli authored
Splits part of dwarfgeneratedebugsyms into a new function, dwarfGenerateDebugInfo which is called between deadcode elimination and type name mangling. This function takes care of collecting and processing the DIEs for all functions and package-level variables and also generates DIEs for all types used in the program. Fixes #23733 Change-Id: I75ef0608fbed2dffc3be7a477f1b03e7e740ec61 Reviewed-on: https://go-review.googlesource.com/111237 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Heschi Kreinick <heschi@google.com>
-
- 30 Aug, 2018 2 commits
-
-
Than McIntosh authored
The sym.Symbol 'ElfType' field is used only for symbols corresponding to things in imported shared libraries, hence is not needed in the common case. Relocate it to sym.AuxSymbol so as to shrink the main Symbol struct. Updates #26186 Change-Id: I803efc561c31a0ca1d93eca434fda1c862a7b2c5 Reviewed-on: https://go-review.googlesource.com/125479Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Than McIntosh authored
Create a new "AuxSymbol" struct into which 'cold' or 'infrequently set' symbol fields are located. Move the Extname field from the main Symbol struct to AuxSymbol. Updates #26186 Change-Id: I9e795fb0cc48f978e2818475fa073ed9f2db202d Reviewed-on: https://go-review.googlesource.com/125476Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 29 Aug, 2018 1 commit
-
-
Zheng Xu authored
Supporting frame-pointer makes Linux's perf and other profilers much more useful because it lets them gather a stack trace efficiently on profiling events. Major changes include: 1. save FP on the word below where RSP is pointing to (proposed by Cherry and Austin) 2. adjust some specific offsets in runtime assembly and wrapper code 3. add support to FP in goroutine scheduler 4. adjust link stack overflow check to take the extra word into account 5. adjust nosplit test cases to enable frame sizes which are 16 bytes aligned Performance impacts on go1 benchmarks: Enable frame-pointer (by default) name old time/op new time/op delta BinaryTree17-46 5.94s ± 0% 6.00s ± 0% +1.03% (p=0.029 n=4+4) Fannkuch11-46 2.84s ± 1% 2.77s ± 0% -2.58% (p=0.008 n=5+5) FmtFprintfEmpty-46 55.0ns ± 1% 58.9ns ± 1% +7.06% (p=0.008 n=5+5) FmtFprintfString-46 102ns ± 0% 105ns ± 0% +2.94% (p=0.008 n=5+5) FmtFprintfInt-46 118ns ± 0% 117ns ± 1% -1.19% (p=0.000 n=4+5) FmtFprintfIntInt-46 181ns ± 0% 182ns ± 1% ~ (p=0.444 n=5+5) FmtFprintfPrefixedInt-46 215ns ± 1% 214ns ± 0% ~ (p=0.254 n=5+4) FmtFprintfFloat-46 292ns ± 0% 296ns ± 0% +1.46% (p=0.029 n=4+4) FmtManyArgs-46 720ns ± 0% 732ns ± 0% +1.72% (p=0.008 n=5+5) GobDecode-46 9.82ms ± 1% 10.03ms ± 2% +2.10% (p=0.008 n=5+5) GobEncode-46 8.14ms ± 0% 8.72ms ± 1% +7.14% (p=0.008 n=5+5) Gzip-46 420ms ± 0% 424ms ± 0% +0.92% (p=0.008 n=5+5) Gunzip-46 48.2ms ± 0% 48.4ms ± 0% +0.41% (p=0.008 n=5+5) HTTPClientServer-46 201µs ± 4% 201µs ± 0% ~ (p=0.730 n=5+4) JSONEncode-46 17.1ms ± 0% 17.7ms ± 1% +3.80% (p=0.008 n=5+5) JSONDecode-46 88.0ms ± 0% 90.1ms ± 0% +2.42% (p=0.008 n=5+5) Mandelbrot200-46 5.06ms ± 0% 5.07ms ± 0% ~ (p=0.310 n=5+5) GoParse-46 5.04ms ± 0% 5.12ms ± 0% +1.53% (p=0.008 n=5+5) RegexpMatchEasy0_32-46 117ns ± 0% 117ns ± 0% ~ (all equal) RegexpMatchEasy0_1K-46 332ns ± 0% 329ns ± 0% -0.78% (p=0.008 n=5+5) RegexpMatchEasy1_32-46 104ns ± 0% 113ns ± 0% +8.65% (p=0.029 n=4+4) RegexpMatchEasy1_1K-46 563ns ± 0% 569ns ± 0% +1.10% (p=0.008 n=5+5) RegexpMatchMedium_32-46 167ns ± 2% 177ns ± 1% +5.74% (p=0.008 n=5+5) RegexpMatchMedium_1K-46 49.5µs ± 0% 53.4µs ± 0% +7.81% (p=0.008 n=5+5) RegexpMatchHard_32-46 2.56µs ± 1% 2.72µs ± 0% +6.01% (p=0.008 n=5+5) RegexpMatchHard_1K-46 77.0µs ± 0% 81.8µs ± 0% +6.24% (p=0.016 n=5+4) Revcomp-46 631ms ± 1% 627ms ± 1% ~ (p=0.095 n=5+5) Template-46 81.8ms ± 0% 86.3ms ± 0% +5.55% (p=0.008 n=5+5) TimeParse-46 423ns ± 0% 432ns ± 0% +2.32% (p=0.008 n=5+5) TimeFormat-46 478ns ± 2% 497ns ± 1% +3.89% (p=0.008 n=5+5) [Geo mean] 71.6µs 73.3µs +2.45% name old speed new speed delta GobDecode-46 78.1MB/s ± 1% 76.6MB/s ± 2% -2.04% (p=0.008 n=5+5) GobEncode-46 94.3MB/s ± 0% 88.0MB/s ± 1% -6.67% (p=0.008 n=5+5) Gzip-46 46.2MB/s ± 0% 45.8MB/s ± 0% -0.91% (p=0.008 n=5+5) Gunzip-46 403MB/s ± 0% 401MB/s ± 0% -0.41% (p=0.008 n=5+5) JSONEncode-46 114MB/s ± 0% 109MB/s ± 1% -3.66% (p=0.008 n=5+5) JSONDecode-46 22.0MB/s ± 0% 21.5MB/s ± 0% -2.35% (p=0.008 n=5+5) GoParse-46 11.5MB/s ± 0% 11.3MB/s ± 0% -1.51% (p=0.008 n=5+5) RegexpMatchEasy0_32-46 272MB/s ± 0% 272MB/s ± 1% ~ (p=0.190 n=4+5) RegexpMatchEasy0_1K-46 3.08GB/s ± 0% 3.11GB/s ± 0% +0.77% (p=0.008 n=5+5) RegexpMatchEasy1_32-46 306MB/s ± 0% 283MB/s ± 0% -7.63% (p=0.029 n=4+4) RegexpMatchEasy1_1K-46 1.82GB/s ± 0% 1.80GB/s ± 0% -1.07% (p=0.008 n=5+5) RegexpMatchMedium_32-46 5.99MB/s ± 0% 5.64MB/s ± 1% -5.77% (p=0.016 n=4+5) RegexpMatchMedium_1K-46 20.7MB/s ± 0% 19.2MB/s ± 0% -7.25% (p=0.008 n=5+5) RegexpMatchHard_32-46 12.5MB/s ± 1% 11.8MB/s ± 0% -5.66% (p=0.008 n=5+5) RegexpMatchHard_1K-46 13.3MB/s ± 0% 12.5MB/s ± 1% -6.01% (p=0.008 n=5+5) Revcomp-46 402MB/s ± 1% 405MB/s ± 1% ~ (p=0.095 n=5+5) Template-46 23.7MB/s ± 0% 22.5MB/s ± 0% -5.25% (p=0.008 n=5+5) [Geo mean] 82.2MB/s 79.6MB/s -3.26% Disable frame-pointer (GOEXPERIMENT=noframepointer) name old time/op new time/op delta BinaryTree17-46 5.94s ± 0% 5.96s ± 0% +0.39% (p=0.029 n=4+4) Fannkuch11-46 2.84s ± 1% 2.79s ± 1% -1.68% (p=0.008 n=5+5) FmtFprintfEmpty-46 55.0ns ± 1% 55.2ns ± 3% ~ (p=0.794 n=5+5) FmtFprintfString-46 102ns ± 0% 103ns ± 0% +0.98% (p=0.016 n=5+4) FmtFprintfInt-46 118ns ± 0% 115ns ± 0% -2.54% (p=0.029 n=4+4) FmtFprintfIntInt-46 181ns ± 0% 179ns ± 0% -1.10% (p=0.000 n=5+4) FmtFprintfPrefixedInt-46 215ns ± 1% 213ns ± 0% ~ (p=0.143 n=5+4) FmtFprintfFloat-46 292ns ± 0% 300ns ± 0% +2.83% (p=0.029 n=4+4) FmtManyArgs-46 720ns ± 0% 739ns ± 0% +2.64% (p=0.008 n=5+5) GobDecode-46 9.82ms ± 1% 9.78ms ± 1% ~ (p=0.151 n=5+5) GobEncode-46 8.14ms ± 0% 8.12ms ± 1% ~ (p=0.690 n=5+5) Gzip-46 420ms ± 0% 420ms ± 0% ~ (p=0.548 n=5+5) Gunzip-46 48.2ms ± 0% 48.0ms ± 0% -0.33% (p=0.032 n=5+5) HTTPClientServer-46 201µs ± 4% 199µs ± 3% ~ (p=0.548 n=5+5) JSONEncode-46 17.1ms ± 0% 17.2ms ± 0% ~ (p=0.056 n=5+5) JSONDecode-46 88.0ms ± 0% 88.6ms ± 0% +0.64% (p=0.008 n=5+5) Mandelbrot200-46 5.06ms ± 0% 5.07ms ± 0% ~ (p=0.548 n=5+5) GoParse-46 5.04ms ± 0% 5.07ms ± 0% +0.65% (p=0.008 n=5+5) RegexpMatchEasy0_32-46 117ns ± 0% 112ns ± 4% -4.27% (p=0.016 n=4+5) RegexpMatchEasy0_1K-46 332ns ± 0% 330ns ± 1% ~ (p=0.095 n=5+5) RegexpMatchEasy1_32-46 104ns ± 0% 110ns ± 1% +5.29% (p=0.029 n=4+4) RegexpMatchEasy1_1K-46 563ns ± 0% 567ns ± 2% ~ (p=0.151 n=5+5) RegexpMatchMedium_32-46 167ns ± 2% 166ns ± 0% ~ (p=0.333 n=5+4) RegexpMatchMedium_1K-46 49.5µs ± 0% 49.6µs ± 0% ~ (p=0.841 n=5+5) RegexpMatchHard_32-46 2.56µs ± 1% 2.49µs ± 0% -2.81% (p=0.008 n=5+5) RegexpMatchHard_1K-46 77.0µs ± 0% 75.8µs ± 0% -1.55% (p=0.008 n=5+5) Revcomp-46 631ms ± 1% 628ms ± 0% ~ (p=0.095 n=5+5) Template-46 81.8ms ± 0% 84.3ms ± 1% +3.05% (p=0.008 n=5+5) TimeParse-46 423ns ± 0% 425ns ± 0% +0.52% (p=0.008 n=5+5) TimeFormat-46 478ns ± 2% 478ns ± 1% ~ (p=1.000 n=5+5) [Geo mean] 71.6µs 71.6µs -0.01% name old speed new speed delta GobDecode-46 78.1MB/s ± 1% 78.5MB/s ± 1% ~ (p=0.151 n=5+5) GobEncode-46 94.3MB/s ± 0% 94.5MB/s ± 1% ~ (p=0.690 n=5+5) Gzip-46 46.2MB/s ± 0% 46.2MB/s ± 0% ~ (p=0.571 n=5+5) Gunzip-46 403MB/s ± 0% 404MB/s ± 0% +0.33% (p=0.032 n=5+5) JSONEncode-46 114MB/s ± 0% 113MB/s ± 0% ~ (p=0.056 n=5+5) JSONDecode-46 22.0MB/s ± 0% 21.9MB/s ± 0% -0.64% (p=0.008 n=5+5) GoParse-46 11.5MB/s ± 0% 11.4MB/s ± 0% -0.64% (p=0.008 n=5+5) RegexpMatchEasy0_32-46 272MB/s ± 0% 285MB/s ± 4% +4.74% (p=0.016 n=4+5) RegexpMatchEasy0_1K-46 3.08GB/s ± 0% 3.10GB/s ± 1% ~ (p=0.151 n=5+5) RegexpMatchEasy1_32-46 306MB/s ± 0% 290MB/s ± 1% -5.21% (p=0.029 n=4+4) RegexpMatchEasy1_1K-46 1.82GB/s ± 0% 1.81GB/s ± 2% ~ (p=0.151 n=5+5) RegexpMatchMedium_32-46 5.99MB/s ± 0% 6.02MB/s ± 1% ~ (p=0.063 n=4+5) RegexpMatchMedium_1K-46 20.7MB/s ± 0% 20.7MB/s ± 0% ~ (p=0.659 n=5+5) RegexpMatchHard_32-46 12.5MB/s ± 1% 12.8MB/s ± 0% +2.88% (p=0.008 n=5+5) RegexpMatchHard_1K-46 13.3MB/s ± 0% 13.5MB/s ± 0% +1.58% (p=0.008 n=5+5) Revcomp-46 402MB/s ± 1% 405MB/s ± 0% ~ (p=0.095 n=5+5) Template-46 23.7MB/s ± 0% 23.0MB/s ± 1% -2.95% (p=0.008 n=5+5) [Geo mean] 82.2MB/s 82.3MB/s +0.04% Frame-pointer is enabled on Linux by default but can be disabled by setting: GOEXPERIMENT=noframepointer. Fixes #10110 Change-Id: I1bfaca6dba29a63009d7c6ab04ed7a1413d9479e Reviewed-on: https://go-review.googlesource.com/61511Reviewed-by:
Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 28 Aug, 2018 2 commits
-
-
Alessandro Arzilli authored
Moves type name mangling after deadcode elimination. The motivation for doing this is to create a space between deadcode elimination and type name mangling where DWARF generation for types and variables can exist, to fix issue #23733. Change-Id: I9db8ecc0f4efe3df6c1e4025f02642fd452f9a39 Reviewed-on: https://go-review.googlesource.com/111236Reviewed-by:
Heschi Kreinick <heschi@google.com> Reviewed-by:
Cherry Zhang <cherryyz@google.com> Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Than McIntosh authored
This patch contains the remnants of CL (122482), which was intended to reduce memory allocation in 'relocsym'. Another CL (113637) went in first that included pretty much all of the code changes in 122482, however there are some changes to comments that are worth preserving. Change-Id: Iacdbd2bfe3b7ca2656596570f06ce9a646211913 Reviewed-on: https://go-review.googlesource.com/122482Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-