On Wed, Apr 3, 2019 at 12:27 PM <durgasomeswararao...@gmail.com> wrote:
>
> Hi,
> Any one explain the background process of go build or how go build creates 
> shared objects and include into go binary.
> Here sharing my experience with c shared files.
> Earlier I worked with there we creating some shared objects of my projects 
> and collected manually and using.
>
> Here is the scenario I observed with go binary.
> I ran this command in Linux ldd <gobinary>  and got dependency shared objects 
> (.so) of Linux.
>
> If possible please explain how go binary communicate/use  linux shared 
> objects(.so)

On many systems, a Go program that uses cgo, or that uses the net or
os/user packages, will be linked against system shared libraries.
These are used for cgo support, or for GODEBUG=netdns=cgo (see
https://golang.org/pkg/net) or calls to getpwuid and friends.  A Go
program uses a shared library exactly the same way that a C program
does.

I hope that helps.  If you want a more specific answer I encourage you
to ask a more specific question.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to