diff options
author | Sam Clegg <sbc@chromium.org> | 2019-04-16 13:05:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-16 13:05:04 -0700 |
commit | a76c9dcddf1280b76b0c18c2605453d66a2af410 (patch) | |
tree | b66c02a987ae4142c8b8496e66dc8b65d12445bb /test/lld/shared.cpp | |
parent | 324238cc44e51c65637d29a938c435248d384154 (diff) | |
download | binaryen-a76c9dcddf1280b76b0c18c2605453d66a2af410.tar.gz binaryen-a76c9dcddf1280b76b0c18c2605453d66a2af410.tar.bz2 binaryen-a76c9dcddf1280b76b0c18c2605453d66a2af410.zip |
Make sure we always add signature to `fp$` functions (#1994)
Previously we were searching for the function by name but this
doesn't work when the internal name for the function is different.
In order to repro such a case the shared.c test was converted to C++
since then binaryen's internal name is different since it comes from
the de-mangled name section.
Diffstat (limited to 'test/lld/shared.cpp')
-rw-r--r-- | test/lld/shared.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lld/shared.cpp b/test/lld/shared.cpp new file mode 100644 index 000000000..51bdee833 --- /dev/null +++ b/test/lld/shared.cpp @@ -0,0 +1,10 @@ +extern "C" int puts(const char* str); +extern "C" int external_var; + +int print_message() { + puts("Hello, world"); + return external_var; +} + +void* ptr_puts = (void*)&puts; +void* ptr_local_func = (void*)&print_message; |