Subject: Re: Bad linker behaviour
From: [email-masked] (Jon Thackray)

9 Oct 1997 21:42:56 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
To: [email-masked]

[email-masked] writes:
 > In gnu-win32 [email-masked] (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
"[email-masked]" with one line of text: "help".