Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I thought it depended on libc by default?


You might find https://mt165.co.uk/blog/static-link-go/ useful, but a quick tl;dr:

Go binaries are statically linked by default if they do not call out to any C functions.

Go will automatically switch to dynamic linking if you need to call out to C functions. There are some parts of the standard library that do this internally, and so many folks assume that go is dynamically linked by default.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: