Skip to content

cmd/link: J-type instruction relocation offset out of range during build #79275

Description

@wdvxdr1123

Go version

go1.26.3 linux/riscv64

Output of go env in your module/workspace:

-

What did you do?

cd $GOROOT/src/internal/coverage/cfile && go test

What did you see happen?

--- FAIL: TestCoverageApis (73.82s)
    emitdata_test.go:126: build failed (exit status 1): # command-line-arguments
        internal/abi.Kind.String: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x101002 must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.Kind.String: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x100ffe must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.memmove: signed immediate 0x1003b2 must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.memmove: signed immediate 0x100374 must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.memmove: signed immediate 0x10030a must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.memmove: signed immediate 0x1002cc must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x10017c must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x100178 must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x100174 must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x100170 must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x10016c must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x100168 must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x100162 must be in range [-0x100000, 0xfffff] (21 bits)
        internal/abi.NewName: cannot encode J-type instruction relocation offset for runtime.panicBounds: signed immediate 0x10015c must be in range [-0x100000, 0xfffff] (21 bits)
FAIL
exit status 1
FAIL    internal/coverage/cfile 305.612s

What did you expect to see?

test pass

Metadata

Metadata

Assignees

Labels

arch-riscvIssues solely affecting the riscv64 architecture.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions