From a76c9dcddf1280b76b0c18c2605453d66a2af410 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 16 Apr 2019 13:05:04 -0700 Subject: 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. --- test/lld/shared.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/lld/shared.cpp (limited to 'test/lld/shared.cpp') 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; -- cgit v1.2.3