This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
MeP: Use targetm.strip_name_encoding
- From: Nick Clifton <nickc at redhat dot com>
- To: dj at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Oct 2010 09:17:36 +0100
- Subject: MeP: Use targetm.strip_name_encoding
Hi DJ,
There are a couple of places in mep.c where the macro
TARGET_STRIP_NAME_ENCODING is used. Unfortunately at these points it
still has its old definition (of doing nothing) rather than invoking
mep_strip_name_encoding, and so no stripping is performed.
I plan to apply the patch below therefore as an obvious fix. I hope
that this is OK with you.
Checked by building an mep-elf toolchain (which used to fail building
libgcc because of a unstripped symbol name).
Cheers
Nick
gcc/ChangeLog
2010-10-19 Nick Clifton <nickc@redhat.com>
* config/mep/mep.c (mep_print_operand): Use
targetm.strip_name_encoding.
(mep_output_aligned_common): Likewise.
Index: gcc/config/mep/mep.c
===================================================================
--- gcc/config/mep/mep.c (revision 165680)
+++ gcc/config/mep/mep.c (working copy)
@@ -3402,7 +3402,7 @@
(unsigned long) CONST_DOUBLE_HIGH(r));
break;
case SYMBOL_REF:
- real_name = TARGET_STRIP_NAME_ENCODING (XSTR (r, 0));
+ real_name = targetm.strip_name_encoding (XSTR (r, 0));
assemble_name (file, real_name);
break;
case LABEL_REF:
@@ -4834,7 +4834,7 @@
align /= 2;
p2align ++;
}
- name2 = TARGET_STRIP_NAME_ENCODING (name);
+ name2 = targetm.strip_name_encoding (name);
if (global)
fprintf (stream, "\t.globl\t%s\n", name2);
fprintf (stream, "\t.p2align %d\n", p2align);