From: jont AT harlequin DOT co DOT uk (Jon Thackray) Subject: Re: Bad linker behaviour 9 Oct 1997 21:42:56 -0700 Message-ID: <199710090850.JAA04018.cygnus.gnu-win32@zaphod.long.harlequin.co.uk> References: <199710081759 DOT NAA09713 AT tweedledumb DOT cygnus DOT com> To: gnu-win32 AT cygnus DOT com ian AT cygnus DOT com writes: > In gnu-win32 jont AT harlequin DOT co DOT uk (Jon Thackray) writes: > > >This means that all link failures will report the actual symbol name, > >which may not be so good for C++ but will work better for all other > >users of ld. If ld is invoked standalone, this is definitely the way > >it should behave (I also object to it stripping a leading _ from the > >names it reports, this is making an assumption that the object files > >I've linked have come from a C compiler which is untrue in my case). > >If ld wishes to be more sophisticated in the cases where it is invoked > >from gcc or g++, then it should be given additional command line > >information requesting this behaviour, rather than doing this by > >default. > > The normal case of using the linker is for C and C++ programs. When > linking such programs, the linker should report symbols using names > that are meaningful for C and C++. I agree with this. > I would have no objection in principle to making this depend upon a > command line option. Unfortunately, compilers traditionally do not > pass any such command line option. gcc must work with either a native > Unix linker or the GNU linker. It can not pass a command line option > that will only be understood by the GNU linker. Therefore, I don't > see any way to make this work correctly based on a command line > option. > > My conclusion is the reverse of yours: we should provide a command > line option which turns off the symbol name demangling. Ok, I would be happy with this. I suggest one option to turn off C++ style mangling, and one to turn off underscore stripping. The language I am working with does not do either of these. - 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".