[Bug target/45196] ld: warning: can't add line info to anonymous symbol

iains at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Aug 5 14:23:00 GMT 2010



------- Comment #1 from iains at gcc dot gnu dot org  2010-08-05 14:23 -------
does this solve the problem?
 (it's a hack - we should ensure that the debug sections do not appear in
between our program sections, but that's for another day).


Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c (revision 162881)
+++ gcc/config/darwin.c (working copy)
@@ -1699,6 +1699,23 @@ darwin_asm_output_dwarf_delta (FILE *file, int siz
 void
 darwin_file_start (void)
 {
+  fputs ("\t.const\n\t.static_const\n\t.cstring\n", asm_out_file) ;
+  fputs ("\t.literal4\n\t.literal8\n\t.literal16\n", asm_out_file) ;
+  fputs ("\t.data\n\t.static_data\n\t.const_data\n", asm_out_file) ;
+  if (!TARGET_64BIT) 
+    {
+      if (flag_pic == 2)
+       fputs ("\t.picsymbol_stub\n", asm_out_file) ;
+      else
+       fputs ("\t.symbol_stub\n", asm_out_file) ;
+      fputs ("\t.lazy_symbol_pointer\n\t.non_lazy_symbol_pointer\n",
asm_out_file);
+      fputs ("\t.section __TEXT,__textcoal_nt,coalesced,pure_instructions\n",
asm_out_file); 
+    }
+  else
+    {
+      fputs ("\t.section
__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n",
asm_out_file) ;
+    }
+  in_section = NULL;
   if (write_symbols == DWARF2_DEBUG)
     {
       static const char * const debugnames[] =


-- 

iains at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45196



More information about the Gcc-bugs mailing list