exception: ensure base exception vtable is non-hidden
I found that when building this library under Yocto, `-flto=auto` is
used by default and the vtable for the exception class ends up becoming
hidden (since there are no non-pure/non-inline functions). I've tried
using `__attribute__((visibility("default")))` with no luck. The only
thing which seems to work is defining some non-inline function to force
the vtable to be emitted.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iaac957591be38d38d021503e15e16f0c982808a9
diff --git a/src/exception.cpp b/src/exception.cpp
index df0baa5..f44cdaa 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -14,6 +14,9 @@
namespace exception
{
+void exception::unused() const noexcept
+{}
+
int generated_exception::get_errno() const noexcept
{
return EIO;