This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR 51910, -frepo/linker demangling interaction
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 1 Feb 2012 13:50:12 -0700
- Subject: Re: [PATCH] Fix PR 51910, -frepo/linker demangling interaction
- References: <4F25DF6A.firstname.lastname@example.org> <20120130142341.GF18768@tyan-ft48-01.lab.bos.redhat.com> <4F26BA55.email@example.com> <20120130161124.GH18768@tyan-ft48-01.lab.bos.redhat.com> <4F26FCF8.firstname.lastname@example.org> <20120201135629.GR18768@tyan-ft48-01.lab.bos.redhat.com> <4F2989CF.email@example.com> <4F299321.firstname.lastname@example.org>
On 02/01/2012 12:31 PM, Jason Merrill wrote:
Why do you want the link map to be demangled? It seems more reliable to
deal with mangled symbols; there's always c++filt if you want to check
what the symbols demangle to.
It's certainly more reliable for automated tools to deal with mangled
symbols, but users (especially users who are not also compiler
implementors!) have a very hard time translating mangled names into
names that actually appear in their program source code. Additionally,
demangling is the documented default behavior of ld and it's not exactly
user-friendly for the linker to completely ignore both its usual default
and explicit requests for demangled output when invoked via collect2.
Using gcc to link your program instead of invoking ld directly is
supposed to make things *easier* for users, not harder.