darwin.c (machopic_validate_stub_or_non_lazy_ptr): Mark the thing referenced as used...
authorGeoffrey Keating <geoffk@apple.com>
Sat, 11 Sep 2004 21:39:27 +0000 (21:39 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Sat, 11 Sep 2004 21:39:27 +0000 (21:39 +0000)
* config/darwin.c (machopic_validate_stub_or_non_lazy_ptr): Mark
the thing referenced as used, not the stub itself.

From-SVN: r87375

gcc/ChangeLog
gcc/config/darwin.c

index db61ded7e2d5aaaff6d70b8d7d14d8b828f4d74a..24b9efb8e7c423d9588d2b98bc8c8ee8d75c12c8 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-11  Geoffrey Keating  <geoffk@apple.com>
+
+       * config/darwin.c (machopic_validate_stub_or_non_lazy_ptr): Mark
+       the thing referenced as used, not the stub itself.
+
 2004-09-11  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        * c-tree.h (enum c_storage_class): New.
index a5d7ac9b6b20441a6635bed7e245ef0693848320..6bab55445bc01b9f2c3f212640d5d0220ea2c6ce 100644 (file)
@@ -382,8 +382,11 @@ machopic_validate_stub_or_non_lazy_ptr (const char *name)
       
       p->used = true;
 
-      /* Do exactly what assemble_name will do when we actually call it.  */
-      real_name = targetm.strip_name_encoding (name);
+      /* Do what output_addr_const will do when we actually call it.  */
+      if (SYMBOL_REF_DECL (p->symbol))
+       mark_decl_referenced (SYMBOL_REF_DECL (p->symbol));
+
+      real_name = targetm.strip_name_encoding (XSTR (p->symbol, 0));
       
       id = maybe_get_identifier (real_name);
       if (id)
@@ -874,7 +877,7 @@ machopic_output_indirection (void **slot, void *data)
       else
        sprintf (stub, "%s%s", user_label_prefix, ptr_name);
 
-      machopic_output_stub (asm_out_file, sym, stub);    
+      machopic_output_stub (asm_out_file, sym, stub);
     }
   else if (! indirect_data (symbol)
           && (machopic_symbol_defined_p (symbol)