Skip to content

cmd/go, cmd/link: support -buildmode=shared on FreeBSD #29715

Closed
@kolbycrouch

Description

@kolbycrouch

Hello. I noticed recently when trying to build a shared copy of std, that cmd/go and cmd/link don't support shared linking on FreeBSD for any architecture.

After simply adding FreeBSD/amd64 to the case in cmd/go/internal/work/init.go and adding a case for FreeBSD in cmd/link/internal/ld/config.go, I was able to get a libstd.so and link a hello world program dynamically. The hello world program worked as well.

I was wondering if there was some known issue with dynamic linking on FreeBSD, or if it was simply overlooked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions