Skip to content

cmd/ld: invoke host linker for Windows cgo build #4069

Closed
@rsc

Description

@rsc
It should be possible to invoke the host linker for a cgo build.
That is, we'd run 6l to write a .o file for the Go pieces and then invoke gcc to do the
final link with the .syso files. This would fix many corner cases in 6l's support for
linking arbitrary ELF objects into the binary.

I would like to keep 6l's arbitrary ELF support so that one need not have a C compiler
installed to use a Go compiler, but we need the 'invoke gcc' plan as a fallback.

6l = 6l, 5l, 8l here, to avoid confusion with host ld.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions