[llvm-bugs] [Bug 43934] New: [WebAssembly] undefined symbol: __heap_base

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 7 08:46:13 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=43934

            Bug ID: 43934
           Summary: [WebAssembly] undefined symbol: __heap_base
           Product: lld
           Version: unspecified
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: wasm
          Assignee: unassignedbugs at nondot.org
          Reporter: dan433584 at gmail.com
                CC: llvm-bugs at lists.llvm.org, sbc at chromium.org

wasm-ld has code to define __heap_base, however it doesn't appear to be defined
when __heap_base is referenced.

Here's a reduced testcase; compile with -nostdlib:

```
void *volatile p;
extern void __heap_base;

void _start(void) {
    p = &__heap_base;
}
```

I get this error:

```
$ clang -nostdlib test.c 
wasm-ld: error: /tmp/s-01d300.o: undefined symbol: __heap_base
```

This comes up in wasi-libc, as of this PR:

https://github.com/CraneStation/wasi-libc/pull/114

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191107/e0a36048/attachment.html>


More information about the llvm-bugs mailing list