On Tue, Aug 20, 2019 at 9:12 PM Xiangdong JI <xiangdong...@arm.com> wrote:
>
> In 'init' section of .gox files, there might be functions like the followings 
> besides those 'import',
>
>             math ~math bits ~math..z2fbits atomic 
> ~runtime..z2finternal..z2fatomic
>
> where and how are those functions generated, any source code or doc I can 
> refer to? Thanks.

These are pairs of package name and init function name.  If the init
function name starts with "~" then it is a dummy name and there is no
actual function.  Otherwise it is a real function.  The function is
generated by the compiler and handles initialization of package scope
variables that cannot be statically initialized, and calls all the
init functions in the package.

Ian

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXuxyqccx%3Da2Zu-Z9%3DK3MTriNt3X8rGpRVfJPpk83Q%3DWQ%40mail.gmail.com.

Reply via email to