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: RFC/RFA: Preventing name mangling of . in anchor expressions


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


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