Skip to content

Commit 3930b7b

Browse files
authored
Add getFunction calls for endianness test function signatures (#534)
These missing functions (added through the new function call types in #525) result in the following linker error when compiling against NullVM: ``` ld: error: undefined symbol: proxy_wasm::NullPlugin::getFunction(std::__u::basic_string_view<char, std::__u::char_traits<char>>, std::__u::function<proxy_wasm::Word (proxy_wasm::ContextBase*, proxy_wasm::Word, unsigned long, float, double)>*) >>> referenced by null_plugin.cc >>> blaze-out/k8-fastbuild/_objs/null_lib/null_plugin.pic.o:(vtable for proxy_wasm::NullPlugin) ld: error: undefined symbol: proxy_wasm::NullPlugin::getFunction(std::__u::basic_string_view<char, std::__u::char_traits<char>>, std::__u::function<unsigned long (proxy_wasm::ContextBase*, float)>*) >>> referenced by null_plugin.cc >>> blaze-out/k8-fastbuild/_objs/null_lib/null_plugin.pic.o:(vtable for proxy_wasm::NullPlugin) ld: error: undefined symbol: proxy_wasm::NullPlugin::getFunction(std::__u::basic_string_view<char, std::__u::char_traits<char>>, std::__u::function<float (proxy_wasm::ContextBase*, float, float)>*) >>> referenced by null_plugin.cc >>> blaze-out/k8-fastbuild/_objs/null_lib/null_plugin.pic.o:(vtable for proxy_wasm::NullPlugin) ld: error: undefined symbol: proxy_wasm::NullPlugin::getFunction(std::__u::basic_string_view<char, std::__u::char_traits<char>>, std::__u::function<double (proxy_wasm::ContextBase*, float, float, float)>*) >>> referenced by null_plugin.cc >>> blaze-out/k8-fastbuild/_objs/null_lib/null_plugin.pic.o:(vtable for proxy_wasm::NullPlugin) clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` Signed-off-by: Matt Leon <mattleon@google.com>
1 parent b71cb75 commit 3930b7b

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/null/null_plugin.cc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,28 @@ void NullPlugin::getFunction(std::string_view function_name, WasmCallWord<3> *f)
259259
}
260260
}
261261

262+
void NullPlugin::getFunction(std::string_view function_name, WasmCall_lf *f) {
263+
error("Unexpected getFunction for testing signature WasmCall_lf: " + std::string(function_name));
264+
*f = nullptr;
265+
}
266+
267+
void NullPlugin::getFunction(std::string_view function_name, WasmCall_fff *f) {
268+
error("Unexpected getFunction for testing signature WasmCall_fff: " + std::string(function_name));
269+
*f = nullptr;
270+
}
271+
272+
void NullPlugin::getFunction(std::string_view function_name, WasmCall_dfff *f) {
273+
error("Unexpected getFunction for testing signature WasmCall_dfff: " +
274+
std::string(function_name));
275+
*f = nullptr;
276+
}
277+
278+
void NullPlugin::getFunction(std::string_view function_name, WasmCall_WWlfd *f) {
279+
error("Unexpected getFunction for testing signature WasmCall_WWlfd: " +
280+
std::string(function_name));
281+
*f = nullptr;
282+
}
283+
262284
null_plugin::Context *NullPlugin::ensureContext(uint64_t context_id, uint64_t root_context_id) {
263285
auto e = context_map_.insert(std::make_pair(context_id, nullptr));
264286
if (e.second) {

0 commit comments

Comments
 (0)