Observations from setting up an embedded zig project

It’s a fair question! Really just depends on whether you need any of the features offered by the C std library. For instance you could forgo linking in the “math” library (libm.a) if you aren’t using anything from the <math.h> header.

That being said the __libc_init_array symbol is supplied by libc_nano.a which you want since the default generated assembly script uses that symbol to initialize all your default valued variables.

TLDR, you almost certainly want to link in the standard library, but math library is up to you. It also looks like you may not need to link in libgcc.a if you look at this post with a response from Andrew: