> Any update? > > I've managed to generate a simple test case from > libstdc++-v3/src/c++98/strstream.cc which reproduces the issue on > ARM that Ramana has reported previously: > > > template<class _CharT> struct char_traits; > > template<typename _CharT, typename _Traits> > class basic_ios > { > }; > > template<typename _CharT, typename _Traits = char_traits<_CharT> > > class basic_istream : virtual public basic_ios<_CharT, _Traits> > { > protected: > int _M_gcount; > virtual ~basic_istream() > { } > }; > > class istrstream : public basic_istream<char> > { > virtual ~istrstream(); > }; > > istrstream::~istrstream() > { > } > > ------------------ CUT ------------------ > > With an arm-none-linux-gnueabi gcc configured as: > > ./gcc/configure --target=arm-none-linux-gnueabi > --enable-gnu-indirect-function --enable-shared --with-arch=armv7-a > --with-fpu=vfpv3-d16 --with-float=softfp --with-arch=armv7-a > (irrelevant parts omitted) > > With the following command line options: > > -fdata-sections -O2 -fPIC -S ./test.cpp > > We'll see > > ./test.cpp:17:7: error: istrstream::_ZTV10istrstream.localalias.0 > causes a section type conflict with istrstream::_ZTV10istrstream > class istrstream : public basic_istream<char> > ^ > ./test.cpp:17:7: note: 'istrstream::_ZTV10istrstream' was declared here
This seems to be same cause as on AIX - we do section for decl rather than original. The following patch seems to fix it. Does it allows bootstrap for you? (it doesn't for AIX. but that seems bug in output machinery) Index: varasm.c =================================================================== --- varasm.c (revision 210914) +++ varasm.c (working copy) @@ -1083,6 +1083,9 @@ { addr_space_t as = ADDR_SPACE_GENERIC; int reloc; + symtab_node *snode = symtab_get_node (decl); + if (snode) + decl = symtab_alias_ultimate_target (snode)->decl; if (TREE_TYPE (decl) != error_mark_node) as = TYPE_ADDR_SPACE (TREE_TYPE (decl)); > > > Yufeng