This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
dwarf patch: @ in DW.ref symbols
- To: gcc patches <gcc-patches at gcc dot gnu dot org>
- Subject: dwarf patch: @ in DW.ref symbols
- From: Aldy Hernandez <aldyh at redhat dot com>
- Date: 09 Nov 2001 19:04:10 -0500
hi guys.
this might be completely off... but...
all the natives i'm trying to bootstrap are dying with the following, on
the "DW.ref" lines.
misc-inst.s:159017: Warning: rest of line ignored; first ignored character is `@'
aren't "@"'s supposed to be stripped before outputting to the assembler?
i'm prob missing something, but if i'm not... here is a patch to fix the
problem. is this ok? what's wrong?
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy
Red Hat, Inc.
2001-11-09 Aldy Hernandez <aldyh@redhat.com>
* dwarf2asm.c (dw2_force_const_mem): Use STRIP_NAME_ENCODING on
DW.ref symbol name.
(dw2_output_indirect_constant_1): Same.
Index: dwarf2asm.c
===================================================================
RCS file: /cvs/uberbaum/gcc/dwarf2asm.c,v
retrieving revision 1.19
diff -c -p -r1.19 dwarf2asm.c
*** dwarf2asm.c 2001/11/09 01:21:13 1.19
--- dwarf2asm.c 2001/11/09 23:55:41
*************** dw2_force_const_mem (x)
*** 782,790 ****
if (USE_LINKONCE_INDIRECT)
{
! char *ref_name = alloca (strlen (XSTR (x, 0)) + sizeof "DW.ref.");
! sprintf (ref_name, "DW.ref.%s", XSTR (x, 0));
id = get_identifier (ref_name);
decl = build_decl (VAR_DECL, id, ptr_type_node);
DECL_ARTIFICIAL (decl) = 1;
--- 782,797 ----
if (USE_LINKONCE_INDIRECT)
{
! const char *real_symbol_name;
! char *symbol_name = alloca (strlen (XSTR (x, 0)));
! char *ref_name;
!
! strcpy (symbol_name, XSTR (x,0));
! STRIP_NAME_ENCODING (real_symbol_name, symbol_name);
! ref_name = alloca (strlen (real_symbol_name) + sizeof "DW.ref.");
! sprintf (ref_name, "DW.ref.%s", real_symbol_name);
!
id = get_identifier (ref_name);
decl = build_decl (VAR_DECL, id, ptr_type_node);
DECL_ARTIFICIAL (decl) = 1;
*************** dw2_output_indirect_constant_1 (node, da
*** 823,835 ****
splay_tree_node node;
void* data ATTRIBUTE_UNUSED;
{
! const char *sym;
rtx sym_ref;
sym = (const char *) node->key;
! sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym);
if (USE_LINKONCE_INDIRECT)
! fprintf (asm_out_file, "\t.hidden DW.ref.%s\n", sym);
assemble_variable ((tree) node->value, 1, 1, 1);
assemble_integer (sym_ref, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
--- 830,843 ----
splay_tree_node node;
void* data ATTRIBUTE_UNUSED;
{
! const char *sym, *real_sym;
rtx sym_ref;
sym = (const char *) node->key;
! STRIP_NAME_ENCODING (real_sym, sym);
! sym_ref = gen_rtx_SYMBOL_REF (Pmode, real_sym);
if (USE_LINKONCE_INDIRECT)
! fprintf (asm_out_file, "\t.hidden DW.ref.%s\n", real_sym);
assemble_variable ((tree) node->value, 1, 1, 1);
assemble_integer (sym_ref, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);