This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: PATCH: PR other/16394: Pass --demangle to ld


On Wed, Jul 07, 2004 at 01:51:58PM -0400, Jason Merrill wrote:
> On Wed, 7 Jul 2004 09:30:20 -0700, "H. J. Lu" <hjl@lucon.org> wrote:
> 
> > On Wed, Jul 07, 2004 at 07:55:11AM -0700, Mark Mitchell wrote:
> >> H. J. Lu wrote:
> >> 
> >> >--demangle was added to ld before 2.10. This patch checks if the
> >> >linker supports --demangle and uses it if it is available.
> >> 
> >> I think you should probably check that "ld" is GNU ld, in addition to 
> >> checking that it supports --demangle.  Some linkers might support 
> >> --demangle, but use a different mangling scheme.
> >> 
> >> There's also the issue that cplus_demangle will be more likely to match 
> >> the compiler's mangling than "ld --demangle" which might be out of date.
> >
> > I added the check for GNU ld and the --with-demangler-in-ld option
> > default to no.
> 
> What about Mark's point that cplus_demangle is more likely to be correct?

You won't get it unless you pass --with-demangler-in-ld to configure.
Then you can either upgrade your binutils or live with it. In my case, 
binutils has the correct cplus_demangle for gcc on my machine.

> What problem are you trying to solve with this patch?
> 

It is in PR other/16394. Basically, collect2 tries to demangle more
than just symbol names.


H.J.


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