Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/asm: cryptic relocation errors with -spectre=all on GOARCH=386 #49006

Closed
bcmills opened this issue Oct 15, 2021 · 1 comment
Closed

cmd/asm: cryptic relocation errors with -spectre=all on GOARCH=386 #49006

bcmills opened this issue Oct 15, 2021 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Oct 15, 2021

What version of Go are you using (go version)?

$ go version
go version devel go1.18-1cbec6851 Fri Oct 15 07:13:43 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/bcmills/.cache/go-build"
GOENV="/usr/local/google/home/bcmills/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/tmp/tmp.6WLdHtHLTx/.gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/tmp/tmp.6WLdHtHLTx/.gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/google/home/bcmills/sdk/gotip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/google/home/bcmills/sdk/gotip/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.18-1cbec6851 Fri Oct 15 07:13:43 2021 +0000"
GCCGO="/usr/local/google/home/bcmills/bin/gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="c++"
CGO_ENABLED="1"
GOMOD="/tmp/tmp.6WLdHtHLTx/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2894050865=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ GOARCH=386 go build -asmflags=all=-spectre=all .

-- go.mod --
module example

go 1.18
-- main.go --
package main

func main() {}

What did you expect to see?

Either a successful build, or an error message from cmd/asm indicating that -spectre=all is not supported on 386.

What did you see instead?

# example
gogo: relocation target runtime.retpolineBX not defined
runtime.rt0_go: relocation target runtime.retpolineAX not defined
runtime.mcall: relocation target runtime.retpolineAX not defined
runtime.mcall: relocation target runtime.retpolineDI not defined
runtime.systemstack: relocation target runtime.retpolineDI not defined
runtime.systemstack: relocation target runtime.retpolineAX not defined
runtime.asmcgocall: relocation target runtime.retpolineAX not defined
runtime.walltime: relocation target runtime.retpolineAX not defined
runtime.nanotime1: relocation target runtime.retpolineAX not defined
runtime.sigfwd: relocation target runtime.retpolineAX not defined
runtime.clone: relocation target runtime.retpolineSI not defined

This is distilled from a test failure seen in https://build.golang.org/log/446eb1e8cfb84ad3b91d8e92c2316ec2a3903562.

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 15, 2021
@bcmills bcmills added this to the Backlog milestone Oct 15, 2021
@gopherbot
Copy link

Change https://golang.org/cl/356190 mentions this issue: cmd/asm: report an error when trying to do spectre on 386

@golang golang locked and limited conversation to collaborators Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants