cmd/go: Some C compiler and linker flags are not applied when using CGo #43771
Labels
FrozenDueToAge
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?I've also tested this with versions:
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have this Go code:
I'm building using this Makefile:
And checking whether resulting binary is properly hardened: https://manpages.debian.org/testing/devscripts/hardening-check.1.en.html
~/Documents/cgo >>> hardening-check -s hello
What did you expect to see?
hello: Position Independent Executable: yes Stack protected: no, not found! (ignored) Fortify Source functions: yes Read-only relocations: yes Immediate binding: yes
What did you see instead?
Fortification and immediate binding flags are not handled correctly.
The text was updated successfully, but these errors were encountered: