1
0
mirror of https://github.com/golang/go synced 2024-11-17 15:54:39 -07:00

cmd/link/internal/riscv64: add support for freebsd/riscv64

Updates #53466

Change-Id: Ifa1b8fe79f952a08dbdf91ae5ab23e4431e66134
Reviewed-on: https://go-review.googlesource.com/c/go/+/431660
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Mikael Urankar 2022-09-18 17:39:37 +02:00 committed by Meng Zhuo
parent 2cbcf36ede
commit 9faf6b7929

View File

@ -41,7 +41,7 @@ func Init() (*sys.Arch, ld.Arch) {
Linuxdynld: "/lib/ld.so.1",
Freebsddynld: "XXX",
Freebsddynld: "/usr/libexec/ld-elf.so.1",
Netbsddynld: "XXX",
Openbsddynld: "XXX",
Dragonflydynld: "XXX",
@ -53,7 +53,7 @@ func Init() (*sys.Arch, ld.Arch) {
func archinit(ctxt *ld.Link) {
switch ctxt.HeadType {
case objabi.Hlinux:
case objabi.Hlinux, objabi.Hfreebsd:
ld.Elfinit(ctxt)
ld.HEADR = ld.ELFRESERVE
if *ld.FlagTextAddr == -1 {