summaryrefslogtreecommitdiff
path: root/gcc/config/sh/sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/sh/sh.c')
-rw-r--r--gcc/config/sh/sh.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index b84f6220a9e..0dafbc32d11 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -204,6 +204,7 @@ static bool sh_cannot_modify_jumps_p PARAMS ((void));
static bool sh_ms_bitfield_layout_p PARAMS ((tree));
static void sh_encode_section_info PARAMS ((tree, int));
+static const char *sh_strip_name_encoding PARAMS ((const char *));
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
@@ -242,6 +243,11 @@ static void sh_encode_section_info PARAMS ((tree, int));
#undef TARGET_MS_BITFIELD_LAYOUT_P
#define TARGET_MS_BITFIELD_LAYOUT_P sh_ms_bitfield_layout_p
+#undef TARGET_ENCODE_SECTION_INFO
+#define TARGET_ENCODE_SECTION_INFO sh_encode_section_info
+#undef TARGET_STRIP_NAME_ENCODING
+#define TARGET_STRIP_NAME_ENCODING sh_strip_name_encoding
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Print the operand address in x to the stream. */
@@ -6820,3 +6826,14 @@ sh_encode_section_info (decl, first)
if (TARGET_SH5 && first && TREE_CODE (decl) != FUNCTION_DECL)
XEXP (rtl, 0) = gen_datalabel_ref (symbol);
}
+
+/* Undo the effects of the above. */
+
+static const char *
+sh_strip_name_encoding (str)
+ const char *str;
+{
+ STRIP_DATALABEL_ENCODING (str, str);
+ str += *str == '*';
+ return str;
+}