https://bugs.llvm.org/show_bug.cgi?id=37555
Bug ID: 37555
Summary: [WebAssembly] Segment->OutputSeg is nullptr at
DefinedData::getVirtualAddress
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: WebAssembly
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
The lld's getVirtualAddress() fails for function static locals when debug
information is enabled in object file.
The test case compiled from C:
struct S {
int i; int j;
};
void test(struct S *i) {
i->i ^= i->j;
}
void start() {
static struct S s = { 1, 2 };
test(&s);
}
void _start() { }
// `clang-7.0 --target=wasm32-unknown-unknown-wasm test.c -g -c -o test.o`
The command `lld -flavor wasm test.o -o test.wasm` fails at
https://github.com/llvm-mirror/lld/blob/f8a91f09fc90265ce7f104ed4c0e4aebcfedc693/wasm/Symbols.cpp#L155
due to Segment->OutputSeg being NULL.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs