https://bugs.llvm.org/show_bug.cgi?id=45522
Bug ID: 45522
Summary: wasm_export on symbol with external name linkage isn't
preserved
Product: lld
Version: unspecified
Hardware: Other
OS: other
Status: NEW
Severity: normal
Priority: P
Component: wasm
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Compiling this program (with wasm32-wasi for stdio.h, but the bug isn't
specific to WASI):
#include <stdio.h>
__attribute__((export_name("yellow")))
static void green(void) {
printf("hello green, exported as yellow\n");
}
int main(void) {
return 0;
}
produces an executable which doesn't export "yellow".
I expected this to mean that the C symbol "green" is internal, so it can't be
directly linked to from other C files, but that it's treated as live through
the linker and exported from the resulting wasm module as "yellow". Is that
reasonable?
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs