This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto][patch] Fix IL symbol table mismatch with ELF symbol table
- From: Rafael Espindola <espindola at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Diego Novillo <dnovillo at google dot com>
- Date: Mon, 5 Jan 2009 10:38:12 +0000
- Subject: [lto][patch] Fix IL symbol table mismatch with ELF symbol table
2009-01-05 Rafael Avila de Espindola <espindola@google.com>
* lto-section-out.c (write_symbol_vec): Correctly handle names that
start with a '*'.
Cheers,
--
Rafael Avila de Espindola
Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c
index 83fba02..26abc47 100644
--- a/gcc/lto-section-out.c
+++ b/gcc/lto-section-out.c
@@ -1091,6 +1091,12 @@ write_symbol_vec (htab_t hash, struct lto_output_stream *stream,
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (t));
+ /* FIXME lto: this is from assemble_name_raw in varasm.c. For some
+ architectures we might have to do the same name manipulations that
+ ASM_OUTPUT_LABELREF does. */
+ if (name[0] == '*')
+ name = &name[1];
+
d_slot.t = t;
slot = htab_find_slot (hash, &d_slot, NO_INSERT);
gcc_assert (slot != NULL);