This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]