On 02/01/2012 06:56 AM, Jakub Jelinek wrote:

Do users really want to demangle linker maps?  I would never want that,
e.g. because it is ambiguous and less compact.
IMHO the best is just to back out the changes that introduced this
regression.

I don't think this is even really a regression. I haven't actually sat down to try to reproduce this, but backing out the previous patch would leave the -frepo behavior even more broken on Windows hosts than it is now; one of the bugs fixed by the previous patch was that on Windows collect2 *always* told ld to demangle names and there was no way for users to override this via a command-line option or setting COLLECT_NO_DEMANGLE. And, I think the -frepo bug was present on Linux hosts too if you explicitly configured your GCC build with --with-demangler-in-ld, which is what you need to do if you want ld to be able to produce demangled link maps at all.

The patch I posted the other day does reconcile the problem when the user wants both a demangled link map and -frepo processing, although it does add the two extra link steps. Maybe we can figure out a way to bypass the extra steps so that they only happen when the user has specified -Wl,-Map and not --no-demangle? And/or make explicit -frepo on the link command line shortcut some of it?

(BTW, the CodeSourcery IDE adds -Wl,-Map to the link line by default because it's easier to always generate a link map than to have to explain to users how to get one. Especially in the embedded space, it's something many of our users actually do look at.)

-Sandra

Reply via email to