From 9faf6b79297810f6c9418201c6a9fe7fe5a3695c Mon Sep 17 00:00:00 2001 From: Mikael Urankar Date: Sun, 18 Sep 2022 17:39:37 +0200 Subject: [PATCH] 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 Run-TryBot: Joel Sing Reviewed-by: Joel Sing TryBot-Result: Gopher Robot Reviewed-by: Than McIntosh Reviewed-by: Cherry Mui --- src/cmd/link/internal/riscv64/obj.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/link/internal/riscv64/obj.go b/src/cmd/link/internal/riscv64/obj.go index 557e8932c98..8e4e41fff98 100644 --- a/src/cmd/link/internal/riscv64/obj.go +++ b/src/cmd/link/internal/riscv64/obj.go @@ -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 {