You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We built binutils with --enable-elf-stt-common. This makes the gnu assembler/objcopy and ld default to generating common symbols with the STT_COMMON type.
If binutils was not configured this way, this should be reproducible by passing --elf-stt-common=yes and -z common to the assembler and linker respectively when builing go. I wasn't able to do this but that's probably due to my unfamiliarity with go's build system.
How to fix this?
go could pass --elf-stt-common=no and -z nocommon when building itself or anything else. However I don't think that's workable, as then it would not be able to link to objects that were created with those flags set.
The text was updated successfully, but these errors were encountered:
Or wait a few days for the first beta if you don't want to run src/make.bash.
ianlancetaylor
changed the title
go broken with binutils that generates STT_COMMON symbols
cmd/link: broken with binutils that generates STT_COMMON symbols
Nov 29, 2016
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
We built binutils with
--enable-elf-stt-common
. This makes the gnu assembler/objcopy and ld default to generating common symbols with theSTT_COMMON
type.What did you see?
This makes go break at runtime with:
If binutils was not configured this way, this should be reproducible by passing
--elf-stt-common=yes
and-z common
to the assembler and linker respectively when builing go. I wasn't able to do this but that's probably due to my unfamiliarity with go's build system.How to fix this?
go could pass
--elf-stt-common=no
and-z nocommon
when building itself or anything else. However I don't think that's workable, as then it would not be able to link to objects that were created with those flags set.The text was updated successfully, but these errors were encountered: