Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/link: the -g flag breaks cgo #9889

mwhudson opened this issue Feb 16, 2015 · 2 comments


None yet
3 participants
Copy link

commented Feb 16, 2015

This may well be below the caring threshold, but the -g flag ("disable go package data checks") of the linkers prevents the cgo section of the object file being read and so makes links involving cgo fail.


This comment has been minimized.

Copy link

commented Apr 10, 2015

We should fix this. It should be simple enough
(cmd/internal/ld/go.go, func ldpkg).

@rsc rsc added this to the Go1.5 milestone Apr 10, 2015

mwhudson added a commit to mwhudson/go that referenced this issue May 22, 2015

cmd/internal/ld: read cgo data even when -g is passed
Simplest possible fix.

Fixes issue golang#9889

Change-Id: I7b8e986d60135d8e4c92d84dc803a93fe1c9dba1

@rsc rsc changed the title cmd/ld: the -g flag breaks cgo cmd/link: the -g flag breaks cgo Jun 8, 2015


This comment has been minimized.

Copy link

commented Jun 29, 2015

Fixed by linked CL; used wrong comment form.

@rsc rsc closed this Jun 29, 2015

@golang golang locked and limited conversation to collaborators Jun 28, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.