Skip to content

Commit b91f370

Browse files
committed
fix: export vtable/typeinfo symbols of zvec classes in Linux version script
The version script only exported zvec::* function/data symbols. vtable, typeinfo, VTT and guard variable symbols demangle to 'vtable for zvec::...' etc., which the zvec::* pattern does not match, so they were localized by 'local: *'. Consumers linking libzvec.so then failed with 'undefined reference to vtable for zvec::core_interface::HNSWIndexParam'. Add the mangled-name patterns (_ZTVN4zvec*, _ZTIN4zvec*, _ZTSN4zvec*, _ZTTN4zvec*, _ZGVN4zvec*), mirroring what exported_symbols_cpp.txt already does on macOS.
1 parent 08cebdf commit b91f370

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/exported_symbols_cpp.lds

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
zvec::*;
66
};
77
zvec_*;
8+
/* vtable / typeinfo / VTT / guard variables of zvec:: classes.
9+
Their demangled names start with "vtable for" etc., so the
10+
zvec::* patterns above do not match them; without these the
11+
consumers fail with "undefined reference to vtable". Mirrors
12+
__ZTVN4zvec* etc. in exported_symbols_cpp.txt on macOS. */
13+
_ZTVN4zvec*;
14+
_ZTIN4zvec*;
15+
_ZTSN4zvec*;
16+
_ZTTN4zvec*;
17+
_ZGVN4zvec*;
818
local:
919
*;
1020
};

0 commit comments

Comments
 (0)