From 95ef1e7efc42a511b2aebff6c9391fec56462330 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sun, 18 Sep 2022 02:36:20 +1000 Subject: [PATCH] cmd/link: enable linking on openbsd/riscv64 Updates #55999 Change-Id: I6e48e6649e19a9b2d776745c05eefb3995b6dd00 Reviewed-on: https://go-review.googlesource.com/c/go/+/518625 Reviewed-by: Aaron Bieber Run-TryBot: Joel Sing Reviewed-by: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Auto-Submit: Keith Randall --- 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 a18e8369fd..940a8d611c 100644 --- a/src/cmd/link/internal/riscv64/obj.go +++ b/src/cmd/link/internal/riscv64/obj.go @@ -42,7 +42,7 @@ func Init() (*sys.Arch, ld.Arch) { Freebsddynld: "/usr/libexec/ld-elf.so.1", Netbsddynld: "XXX", - Openbsddynld: "XXX", + Openbsddynld: "/usr/libexec/ld.so", Dragonflydynld: "XXX", Solarisdynld: "XXX", @@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) { func archinit(ctxt *ld.Link) { switch ctxt.HeadType { - case objabi.Hlinux, objabi.Hfreebsd: + case objabi.Hlinux, objabi.Hfreebsd, objabi.Hopenbsd: ld.Elfinit(ctxt) ld.HEADR = ld.ELFRESERVE if *ld.FlagRound == -1 {