XCOFF/PE hack removal
Tom Rix
trix@redhat.com
Tue Jan 22 11:10:00 GMT 2002
To foo or to .foo? That is the question
Speaking for XCOFF, I'm ok with the change.
You should add powerpc64-elf to the list of targets in the comment.
Tom
Alan Modra wrote:
> I'd like to apply the following so that errors reported when linking
> powerpc64-elf objects discern between a function descriptor symbol
> and it's associated function code symbol, which only differs by a
> leading dot. However, this will affect PE and XCOFF error messages,
> so I'd like an OK from the opposition camp first. If not OK, then
> I'll do something target dependent.
>
> ld/ChangeLog
> * ldmisc.c (demangle): Put back dots when string not demangled.
>
> --
> Alan Modra
> IBM OzLabs - Linux Technology Centre
>
> Index: ld/ldmisc.c
> ===================================================================
> RCS file: /cvs/src/src/ld/ldmisc.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 ldmisc.c
> --- ldmisc.c 2001/09/26 01:55:44 1.8
> +++ ldmisc.c 2002/01/22 09:08:55
> @@ -69,6 +69,7 @@ demangle (string)
> const char *string;
> {
> char *res;
> + int dots = 0;
>
> if (output_bfd != NULL
> && bfd_get_symbol_leading_char (output_bfd) == string[0])
> @@ -78,9 +79,13 @@ demangle (string)
> format. Xcoff has a single '.', while the NT PE for PPC has
> '..'. So we remove all of them. */
> while (string[0] == '.')
> - ++string;
> + {
> + ++dots;
> + ++string;
> + }
>
> res = cplus_demangle (string, DMGL_ANSI | DMGL_PARAMS);
> + string -= dots;
> return res ? res : xstrdup (string);
> }
--
Tom Rix
GCC Engineer
trix@redhat.com
More information about the Binutils
mailing list