summaryrefslogtreecommitdiff
path: root/gcc/config/darwin.c
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-11 21:39:27 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-11 21:39:27 +0000
commit09e39ca0571f3aed171610ba415fa0600df2f2d2 (patch)
tree77a85efd3dfb2bc1f5c74a80bf8dc62c8773e38c /gcc/config/darwin.c
parentfeb04535441d2d17f8c75f021514e47745d658b8 (diff)
downloadgcc-09e39ca0571f3aed171610ba415fa0600df2f2d2.tar.gz
* config/darwin.c (machopic_validate_stub_or_non_lazy_ptr): Mark
the thing referenced as used, not the stub itself. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87375 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r--gcc/config/darwin.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index a5d7ac9b6b2..6bab55445bc 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -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)