summaryrefslogtreecommitdiff
path: root/src/cmd/nm/nm_test.go
Commit message (Collapse)AuthorAgeFilesLines
* all: fix some printf format stringsJosh Bleecher Snyder2017-02-141-3/+3
| | | | | | | | | | Appease vet. Change-Id: Ie88de08b91041990c0eaf2e15628cdb98d40c660 Reviewed-on: https://go-review.googlesource.com/36938 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/link: do not prefix external symbols with underscore on windows/386/cgoAlex Brainman2017-02-041-44/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | CL 18057 added underscore to most external pe symbols on windows/386/cgo. The CL changed runtime.epclntab and runtime.pclntab pe symbols into _runtime.pclntab and _runtime.epclntab, and now cmd/nm cannot find them. Revert correspondent CL 18057 changes, because most pe symbols do not need underscore prefix. This CL also removes code that added obj.SHOSTOBJ symbols explicitly, because each of those was also added via genasmsym call. These created duplicate pe symbols (like _GetProcAddress@8 and __GetProcAddress@8), and external linker would complain. This CL adds new test in cmd/nm to verify go programs built with cgo. Fixes #18416 Change-Id: I68b1be8fb631d95ec69bd485c77c79604fb23f26 Reviewed-on: https://go-review.googlesource.com/35076 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: use testing.GoToolPath instead of "go"Keith Randall2016-08-301-1/+1
| | | | | | | | | | | | | | This change makes sure that tests are run with the correct version of the go tool. The correct version is the one that we invoked with "go test", not the one that is first in our path. Fixes #16577 Change-Id: If22c8f8c3ec9e7c35d094362873819f2fbb8559b Reviewed-on: https://go-review.googlesource.com/28089 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* all: extract "can I exec?" check from tests into internal/testenvRuss Cox2015-06-161-9/+2
| | | | | | | | Change-Id: I7b54be9d8b50b39e01c6be21f310ae9a10404e9d Reviewed-on: https://go-review.googlesource.com/10753 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* cmd/nm: skip fork test on darwin/arm64David Crawshaw2015-04-121-2/+3
| | | | | | | | Just like darwin/arm. Change-Id: Iabb6282f18548da43117ee60f7ad6e272502f09d Reviewed-on: https://go-review.googlesource.com/8825 Reviewed-by: Minux Ma <minux@golang.org>
* cmd/nm: exclude Go tool test on darwin/armDavid Crawshaw2015-02-261-0/+4
| | | | | | Change-Id: I44f1240a766f20de5997faca4f13f96af6da3534 Reviewed-on: https://go-review.googlesource.com/6190 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
* build: adjustments for move from src/pkg to srcRuss Cox2014-09-081-1/+1
| | | | | | | | | | | | | | | | | | | This CL adjusts code referring to src/pkg to refer to src. Immediately after submitting this CL, I will submit a change doing 'hg mv src/pkg/* src'. That change will be too large to review with Rietveld but will contain only the 'hg mv'. This CL will break the build. The followup 'hg mv' will fix it. For more about the move, see golang.org/s/go14nopkg. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/134570043
* cmd/addr2line, cmd/nm: factor object reading into cmd/internal/objfileRuss Cox2014-08-071-2/+2
| | | | | | | | | | | | | | | To do in another CL: make cmd/objdump use cmd/internal/objfile too. There is a package placement decision in this CL: cmd/internal/objfile instead of internal/objfile. I chose to put internal under cmd to make clear (and enforce) that no standard library packages should use this (it's a bit dependency-heavy). LGTM=r R=r CC=golang-codereviews https://golang.org/cl/123910043
* cmd/nm: skip test on android (no Go tool)David Crawshaw2014-07-081-2/+3
| | | | | | | LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/107590043
* build: make nacl passRuss Cox2014-05-201-0/+4
| | | | | | | | | | | | | | | | Add nacl.bash, the NaCl version of all.bash. It's a separate script because it builds a variant of package syscall with a large zip file embedded in it, containing all the input files needed for tests. Disable various tests new since the last round, mostly the ones using os/exec. Fixes #7945. LGTM=dave R=golang-codereviews, remyoudompheng, dave, bradfitz CC=golang-codereviews https://golang.org/cl/100590044
* cmd/nm: do not write to GOROOT testdata directories during TestNMAlex Brainman2014-05-121-5/+12
| | | | | | | LGTM=bradfitz R=bradfitz, 0intro CC=golang-codereviews https://golang.org/cl/95280043
* cmd/nm: do not fail TestNM if symbol has less then 3 columns in nm outputAlex Brainman2014-04-211-5/+0
| | | | | | | | | Fixes #7829 LGTM=dave R=golang-codereviews, aram, dave CC=golang-codereviews https://golang.org/cl/89830043
* cmd/nm: disable TestNM on darwin, linux and solarisAlex Brainman2014-04-211-0/+4
| | | | | | | | | Update #7829 LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://golang.org/cl/89810043
* cmd/ld: correct addresses in windows pe symbol tableAlex Brainman2014-04-211-0/+49
| | | | | | | | | | | This should have been part of 36eb4a62fbb6, but I later discovered that addresses are all wrong. Appropriate test added now. LGTM=r R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/89470043
* cmd/nm: windows pe handling fixesAlex Brainman2014-04-161-0/+40
- output absolute addresses, not relative; - accept negative section numbers. Update #6936 Fixes #7738 LGTM=rsc R=golang-codereviews, bradfitz, ruiu, rsc CC=golang-codereviews https://golang.org/cl/85240046