Stream: wasi

Topic: ✔ Hi, where does wasi-sdk implement `__cxx_global_var_init`?


view this post on Zulip Scott Waye (Jun 24 2023 at 16:17):

I grepped around, but can't find the implementation of this which I suppose comes from libstdc++. At linking I have an undefined symbol and stub call in one of the overloads:
(func $__cxx_global_var_init.2 (type 6)
(local i32 i32 i32)
i32.const 18
local.set 0
i32.const 0
local.set 1
i32.const 1024
local.set 2
local.get 0
local.get 1
local.get 2
call $undefined_stub.3
drop
return)

view this post on Zulip bjorn3 (Jun 24 2023 at 16:38):

Are you using clang or clang++ for linking? You need the latter for C++.

view this post on Zulip Scott Waye (Jun 24 2023 at 16:53):

Tried both, output seems the same. Does this function not have an implementation in c/c++ ?

view this post on Zulip Scott Waye (Jun 24 2023 at 16:53):

maybe its a macro somewhere, that would explain why it has a few overloads I suppose

view this post on Zulip Scott Waye (Jun 24 2023 at 18:22):

Couldn't find it, but by trial and error think this missing function was pthread_attr_destroy

view this post on Zulip Notification Bot (Jun 24 2023 at 20:34):

Scott Waye has marked this topic as resolved.


Last updated: Oct 23 2024 at 20:03 UTC