This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC/RFA: Preventing name mangling of . in anchor expressions
- From: Ian Lance Taylor <iant at google dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 14 Feb 2007 09:36:32 -0800
- Subject: Re: RFC/RFA: Preventing name mangling of . in anchor expressions
- References: <m3k5ykslul.fsf@redhat.com>
Nick Clifton <nickc@redhat.com> writes:
> gcc/ChangeLog
> 2007-02-14 Nick Clifton <nickc@redhat.com>
>
> * varasm.c (default_asm_output_anchor): Prepend * to . symbol in
> order to prevent it from being munged by the target.
>
> Index: gcc/varasm.c
> ===================================================================
> --- gcc/varasm.c (revision 121945)
> +++ gcc/varasm.c (working copy)
> @@ -6098,7 +6098,7 @@ default_asm_output_anchor (rtx symbol)
> {
> char buffer[100];
>
> - sprintf (buffer, ". + " HOST_WIDE_INT_PRINT_DEC,
> + sprintf (buffer, "*. + " HOST_WIDE_INT_PRINT_DEC,
> SYMBOL_REF_BLOCK_OFFSET (symbol));
> ASM_OUTPUT_DEF (asm_out_file, XSTR (symbol, 0), buffer);
> }
Hmmm, that's weird. Why does ASM_OUTPUT_DEF pass the VALUE parameter
to assemble_name? Worse, the version in c4x.h does not do this.
Given that ASM_OUTPUT_DEF works this way, and given that we are not
going to change that now, I think this patch is obvious.
Ian