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


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

problem with template instantiation with GNU ld



hi -

I ran into a problem recently with egcs 971114 on linux in which
template member functions and templates involving nested types were
not being automatically instantiated with -frepo.

I tracked this down to miscommunication between ld and tlink.
tlink looks for symbol names in either mangled form as the first
word on a line, or in demangled form inside of single quotes.  GNU ld
uses the second form of message.  However, it appears that the demangling
code in ld (version string
`GNU ld version cygnus-2.8.1 (with BFD linux-2.8.1.0.15)') is not in sync
with egcs, since for the template instantiations which were giving
problems, ld was using the mangled form in the error message.

Eventually, i suppose, the demangling code will be the same everywhere.
In the meantime, though, it seemed reasonable to modify tlink so that
it could also recognize mangled names inside quotes.  The appended
patch implements that, and fixes the problem for me.

thanks,
sss


1997-11-20  scott snyder  <sss@d0linux01.fnal.gov>

        * tlink.c (scan_linker_output): Recognize mangled names
        in quotes.



*** tlink.c     1997/10/17 19:03:41     1.1.1.1
--- tlink.c     1997/11/21 19:29:43
***************
*** 573,578 ****
--- 573,580 ----
            *q = 0, dem = demangled_hash_lookup (p, false);
          if (dem)
            sym = symbol_hash_lookup (dem->mangled, false);
+           else if (q)
+             sym = symbol_hash_lookup (p, false);
        }
  
        if (sym && sym->tweaked)


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