delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/08/23:44:52

From: ian AT cygnus DOT com
Subject: Re: Bad linker behaviour
8 Oct 1997 23:44:52 -0700 :
Message-ID: <199710081759.NAA09713.cygnus.gnu-win32@tweedledumb.cygnus.com>
References: <199710061729 DOT NAA29946 AT tweedledumb DOT cygnus DOT com>
To: jont AT harlequin DOT co DOT uk
Cc: gnu-win32 AT cygnus DOT com

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 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.

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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019