Hacker News new | ask | show | jobs
by cstrahan 3582 days ago
Go packages are statically linked into Go executables, yes. That doesn't mean that C libraries are, though -- and I think it's that level of static linkage that the parent meant.

If you're on macOS, try running $ otool -L some-go-program, or on linux:

  $ ldd ./team-service
        linux-vdso.so.1 (0x00007ffe492af000)
        libpthread.so.0 => /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/libpthread.so.0 (0x00007f47ef267000)
        libssl.so.1.0.0 => /nix/store/v9mq9iv2sg017r7i0fpw8qlifvlpvlks-openssl-1.0.2h/lib/libssl.so.1.0.0 (0x00007f47eeff6000)
        libcrypto.so.1.0.0 => /nix/store/v9mq9iv2sg017r7i0fpw8qlifvlpvlks-openssl-1.0.2h/lib/libcrypto.so.1.0.0 (0x00007f47eeba4000)
        libc.so.6 => /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/libc.so.6 (0x00007f47ee803000)
        /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/ld-linux-x86-64.so.2 (0x00007f47ef484000)
        libdl.so.2 => /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/libdl.so.2 (0x00007f47ee5ff000)