diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-15 19:54:53 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-15 19:54:53 +0000 |
commit | bacb3196677c7fea8c9fd6763661bf2f1e24196a (patch) | |
tree | 660473c3d3af41800821cd8d2024c656ff94e290 /gcc/objc | |
parent | 040cb3097cdeabd8072b6b26e9d5c1b619eec008 (diff) | |
download | gcc-bacb3196677c7fea8c9fd6763661bf2f1e24196a.tar.gz |
* objc/objc-act.c (handle_class_ref): Use rest_of_decl_compilation
so that CHOOSE_SECTION gets used.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42114 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/objc-act.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 5936e2ea7f3..b6ea82101cf 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -8438,20 +8438,16 @@ handle_class_ref (chain) pushdecl (decl); rest_of_decl_compilation (decl, 0, 0, 0); - /* Make following constant read-only, but only for GNU runtime. */ - if (!flag_next_runtime) - readonly_data_section (); - + /* Make a decl for the address. */ + sprintf (string, "%sobjc_class_ref_%s", + (flag_next_runtime ? "." : "__"), name); exp = build1 (ADDR_EXPR, string_type_node, decl); + decl = build_decl (VAR_DECL, get_identifier (string), string_type_node); + DECL_INITIAL (decl) = exp; + TREE_STATIC (decl) = 1; - /* Align the section properly. */ - assemble_constant_align (exp); - - /* Inform the assembler about this new external thing. */ - assemble_external (decl); - - /* Output a constant to reference this address. */ - output_constant (exp, int_size_in_bytes (string_type_node)); + pushdecl (decl); + rest_of_decl_compilation (decl, 0, 0, 0); } static void |