]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link/internal/riscv64: add support for freebsd/riscv64
authorMikael Urankar <mikael@FreeBSD.org>
Sun, 18 Sep 2022 15:39:37 +0000 (17:39 +0200)
committerMeng Zhuo <mzh@golangcn.org>
Fri, 30 Sep 2022 03:08:40 +0000 (03:08 +0000)
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>
src/cmd/link/internal/riscv64/obj.go

index 557e8932c98b44dbee83682acf8a12ed37e622c9..8e4e41fff986676b8c8013bf2f04ae1993c56de5 100644 (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 {