Skip to content

Instantly share code, notes, and snippets.

@vaskoz
Created May 11, 2015 02:58
Show Gist options
  • Select an option

  • Save vaskoz/1da53dc241875b15fd66 to your computer and use it in GitHub Desktop.

Select an option

Save vaskoz/1da53dc241875b15fd66 to your computer and use it in GitHub Desktop.
Golang dynamic linking for DNS resolution
package main
import "net"
func main() {
net.Dial("tcp", "google.com:80")
}
ldd ~/app/bin/app
linux-vdso.so.1 => (0x00007fffac9ff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f043c9f3000)
libc.so.6 => /lib64/libc.so.6 (0x00007f043c65f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f043cc17000)
ldd test
linux-vdso.so.1 => (0x00007fffee9e8000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f26e3638000)
libc.so.6 => /lib64/libc.so.6 (0x00007f26e32a4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f26e385c000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment