From: ian AT cygnus DOT com (Ian Lance Taylor) Subject: Re: Bad linker behaviour 10 Oct 1997 07:06:08 -0700 Message-ID: <199710091505.LAA13344.cygnus.gnu-win32@subrogation.cygnus.com> References: <199710091441 DOT IAA12964 AT chorus DOT dr DOT lucent DOT com> To: marcus AT bighorn DOT dr DOT lucent DOT com Cc: gnu-win32 AT cygnus DOT com From: marcus AT bighorn DOT dr DOT lucent DOT com Date: Thu, 9 Oct 1997 08:41:54 -0600 When gcc compiles a file, there are two symbols that it adds to the object module, `___gnu_compiled_c' and `gcc2_compiled.'. For a C++ file, I see that `__gnu_compiled_cplusplus' and `gcc2_compiled.' are defined. So, it seems that ld could watch for `___gnu_compiled_c' in an object file and flag it for removing the leading '_' on symbols from that module, and if it sees `__gnu_compiled_cplusplus' it would demangle symbols from that object module, otherwise it would leave the symbol alone. That sounds like a plausible idea to me. I'm not sure how difficult it would be to implement: I believe that there are a number of cases that print a symbol name which do not have any record of which module it was defined in. I don't plan to implement this myself, but I would be happy to look at patches for it. Ian - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".