Skip to content

Consider symbol visibility for shared library #41

@dkg

Description

@dkg

The current shared object produced with BUILD_SHARED_LIBS=on exposes many different C++ symbols, and appears to make no attempt to filter what is explicitly exposed.

Does every symbol need to be exposed in the shared object? I'm not enough of a C++ person to be able to tell what the library's symbol table should really look like, but i do observe that there are symbols exposed that are not part of either the sexp namespace or the ext_key_format namespace.

For example, when i try to build it i see the following symbols:

  • _ZNKSt5ctypeIcE8do_widenEc (unmangled: std::ctype<char>::do_widen(char) const)
  • _ZNSt15_Sp_counted_ptrIDnLN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv (unmangled: std::_Sp_counted_ptr<decltype(nullptr), (__gnu_cxx::_Lock_policy)2>::_M_dispose())
  • _ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits (unmangled: std::__detail::__to_chars_10_impl<unsigned int>(char*, unsigned int, unsigned int)::__digits)

(there are many more, but the list above gives a flavor of what i'm seeing)

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions