]> git.proxmox.com Git - wasi-libc.git/commit
Don't run static constructors on arbitrary user exports.
authorDan Gohman <dev@sunfishcode.online>
Fri, 23 Sep 2022 18:46:59 +0000 (11:46 -0700)
committerDan Gohman <dev@sunfishcode.online>
Thu, 29 Sep 2022 20:15:32 +0000 (13:15 -0700)
commit907d10fecbca24daec3005414dd34f59721b7159
treebc831dada5901558c24e1b6827e79628ac18e25b
parent05b3b876e63cdc919c79f5127a7ae8dbdb7b095f
Don't run static constructors on arbitrary user exports.

Previously, "new-style commmands" considered every user-defined
export to be a potential command entrypoint, so wasi-libc and wasm-ld
cooperated to run the user's static constructors on each entrypoint.

This form of new-style command turned out not to be useful, and it
interferes with some use cases, so disable it.

This is done by making an explicit call to `__wasm_call_ctors`, which
tells wasm-ld that it shouldn't synthesize any calls to
`__wasm_call_ctors` on its own.
libc-bottom-half/crt/crt1-command.c
libc-bottom-half/crt/crt1.c