Re: [go-nuts] External/internal linker and cgo packages

2020-04-29 Thread Ian Lance Taylor
On Wed, Apr 29, 2020 at 8:58 PM Vincent Blanchon wrote: > > Thank you again for your reply! > I thought Go would compile all the C files in one .go, that makes sense. > > By the way, how Go would deal with those files if cgo is not enabled - > meaning the internal linker will do the job? > How

Re: [go-nuts] External/internal linker and cgo packages

2020-04-29 Thread Vincent Blanchon
Hello Ian, Thank you again for your reply! I thought Go would compile all the C files in one .go, that makes sense. By the way, how Go would deal with those files if cgo is not enabled - meaning the internal linker will do the job? How the internal linker can deal with that? Le jeudi 30 avril

Re: [go-nuts] External/internal linker and cgo packages

2020-04-29 Thread Ian Lance Taylor
On Tue, Apr 28, 2020 at 10:49 PM Vincent Blanchon wrote: > > I'm building a simple program that has a dependency to > github.com/DataDog/zstd, a wrapper of a C code. > So by default, Go will use the external linker. When debugging with, I can see > > host link: "clang" "-m64"

[go-nuts] External/internal linker and cgo packages

2020-04-28 Thread Vincent Blanchon
Hello, I'm building a simple program that has a dependency to github.com/DataDog/zstd, a wrapper of a C code. So by default, Go will use the external linker. When debugging with, I can see host link: "clang" "-m64" "-Wl,-headerpad,1144" "-Wl,-no_pie" "-Wl,-pagezero_size,400" "-o"