Re: [go-nuts] Re: If Go is using libc instead of syscalls on macOS now, why is it not shown via otool -L?

2019-05-03 Thread andrey mirtchovski
macOS doesn't support static linking user binaries. in fact I do see
libSystem linked for each go binary on my Mojave system, including the
simplest non-outputting hello world:

$ cat > t.go
package main; func main(){}
$ go build t.go && otool -L t
t: /usr/lib/libSystem.B.dylib (compatibility version 0.0.0, current
version 0.0.0)
$

-- 
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.


[go-nuts] Re: If Go is using libc instead of syscalls on macOS now, why is it not shown via otool -L?

2019-05-03 Thread howardcshaw
I believe that by default, Go programs are statically linked.

>From the man page for otool:

*-L* Display the names and version numbers of  the  shared  libraries
  that  the  object file uses, as well as the shared library ID if
  the file is a shared library.


This is listing what is dynamically linked, not statically linked, so it does 
not show up.

-- 
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.