This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Understanding gnu.ver and symbol exporting.


Few questions regarding the syntax of this file. I don't fully
understand how the unmangled extern block works.

Say I'm working on N2671/N2709, <future>, with a source file future.cc
along with memory.cc that defines allocator_arg (required for a lot of
ctor overloads). So I 'nm' both .o's and pull out the following
symbols:

future.cc:
T _ZNKSt12future_error4codeEv
T _ZNKSt12future_error4whatEv
W _ZNSt12future_errorD0Ev
W _ZNSt12future_errorD1Ev
V _ZTISt12future_error
V _ZTSSt12future_error
V _ZTVSt12future_error

memory.cc:
B _ZSt13allocator_arg

So, I noticed that weak symbols ('W') aren't listed as exports from
other object files so I exclude those (something to do with virtual
dtor?), and I'm left with:

# future
_ZNKSt12future_error4codeEv;
_ZNKSt12future_error4whatEv;
_ZTISt12future_error;
_ZTSSt12future_error;
_ZTVSt12future_error;

# memory
_ZSt13allocator_arg;

Adding this to gnu.ver, I get 4 abi failures, the last 3 future_error
symbols and the allocator_arg. So I'm missing something, and I'm
pretty sure it has to do with that extern "C++" block at the top of
the file. First, there's no std::f* section so do I have to do
something like:

std::f[a-t]*;
#std::future_error
std::future[^_]*;
std::f[v-z]*;

??

Second, any attempt I made to get allocator_arg to not fail the abi
check ended up making every other std::allocator* symbol fail (i.e.
jumped from 4 to 15 errors).

Guidance?

Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]