Commit 561e6650 by Richard Stallman

New macro to decode a symbol name munged by ENCODE_SECTION_INFO.

(STRIP_NAME_ENCODING):
New macro to decode a symbol name munged by ENCODE_SECTION_INFO.
(assemble_start_function, assemble_variable): Use STRIP_NAME_ENCODING.

From-SVN: r2572
parent e42b4c96
......@@ -49,6 +49,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define ASM_STABS_OP ".stabs"
#endif
/* This macro gets just the user-specified name
out of the string in a SYMBOL_REF. On most machines,
we discard the * if any and that's all. */
#ifndef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
(VAR) = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'))
#endif
/* File in which assembler code is being written. */
extern FILE *asm_out_file;
......@@ -549,7 +557,7 @@ assemble_start_function (decl, fnname)
if (TREE_PUBLIC (decl))
{
if (!first_global_object_name)
first_global_object_name = fnname + (fnname[0] == '*');
STRIP_NAME_ENCODING (first_global_object_name, fnname);
ASM_GLOBALIZE_LABEL (asm_out_file, fnname);
}
......@@ -839,7 +847,7 @@ assemble_variable (decl, top_level, at_end)
if (TREE_PUBLIC (decl) && DECL_NAME (decl))
{
if (!first_global_object_name)
first_global_object_name = name + (name[0] == '*');
STRIP_NAME_ENCODING(first_global_object_name, name);
ASM_GLOBALIZE_LABEL (asm_out_file, name);
}
#if 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment