Undefined symbols in dwarf1 output

Eric Raskin ehr@listworks.com
Fri Jun 11 07:54:00 GMT 1999


I've been working on this one for a while now...

First, here's the symptom:

$ g++ -g -o test test.cc
UX:as: ERROR: (EOF):undefined name: .L_T134

Here's test.cc (lifted straight from valarray.cc libstdc++ test and stl_functions.h):

--------start of code--------

template <class _Arg1, class _Arg2, class _Result>
struct binary_function {
  typedef _Arg1 first_argument_type;
  typedef _Arg2 second_argument_type;
  typedef _Result result_type;
};      

template <class _Tp>
struct multiplies : public binary_function<_Tp,_Tp,_Tp> {
  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
};

template class multiplies<int>;

--------end of code----------

I've traced it down to emitting the TAG_inheritance DIE after 'multiplies<int>',
which indicates that 'multiplies' is a subclass of 'binary_function'.  The
undefined symbol occurs because no DIE is ever emitted for 'binary_function'.

Why is it being skipped?

------------------------------------------------------------------------
Eric H. Raskin                            Voice:  914-769-7100 x321
President, CSC Division                   Fax:    914-769-8070
The Listworks Corp.                       E-Mail: ehr@listworks.com
1 Campus Drive
Pleasantville, NY 10570



More information about the Gcc mailing list