aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-02-15 20:26:02 +0000
committerRichard Stallman <rms@gnu.org>1992-02-15 20:26:02 +0000
commitb3a5ad9cbd1f25648a8115f0fb62b367c65b3caa (patch)
tree77fa482206b5a010e0fc856fe532f68f303798b5 /gcc
parent349860d8b970b0eefa8e92a01fe68aa94cb604f7 (diff)
downloadgcc-b3a5ad9cbd1f25648a8115f0fb62b367c65b3caa.zip
gcc-b3a5ad9cbd1f25648a8115f0fb62b367c65b3caa.tar.gz
gcc-b3a5ad9cbd1f25648a8115f0fb62b367c65b3caa.tar.bz2
*** empty log message ***
From-SVN: r326
Diffstat (limited to 'gcc')
-rw-r--r--gcc/objc/objc-act.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index dcc269d..4864592 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1034,7 +1034,7 @@ build_module_descriptor ()
return buf;
}
#else /* NEXT_OBJC_RUNTIME */
- return "__objcInit";
+ return 0;
#endif /* NEXT_OBJC_RUNTIME */
}
@@ -4998,7 +4998,8 @@ finish_objc ()
/* Arrange for Objc data structures to be initialized at run time. */
char *init_name = build_module_descriptor ();
- assemble_constructor (init_name);
+ if (init_name)
+ assemble_constructor (init_name);
}
/* dump the string table last */
@@ -5016,14 +5017,15 @@ finish_objc ()
for (chain = cls_ref_chain; chain; chain = TREE_CHAIN (chain))
{
tree decl;
+
#if 0 /* Grossly unportable. */
sprintf (utlbuf, ".reference .objc_class_name_%s",
IDENTIFIER_POINTER (TREE_VALUE (chain)));
assemble_asm (my_build_string (strlen (utlbuf) + 1, utlbuf));
-#endif
+#else
sprintf (utlbuf, ".objc_class_name_%s",
IDENTIFIER_POINTER (TREE_VALUE (chain)));
- assemble_global (utlbuf);
+#endif
/* Make a decl for this name, so we can use its address in a tree. */
decl = build_decl (VAR_DECL, get_identifier (utlbuf), char_type_node);
TREE_EXTERNAL (decl) = 1;
@@ -5032,6 +5034,9 @@ finish_objc ()
pushdecl (decl);
rest_of_decl_compilation (decl, 0, 0, 0);
+ /* Make following constant read-only (why not)? */
+ text_section ();
+
/* Output a constant to reference this address. */
output_constant (build1 (ADDR_EXPR, string_type_node, decl),
int_size_in_bytes (string_type_node));
@@ -5044,8 +5049,9 @@ finish_objc ()
if (TREE_CODE (impent->imp_context) == IMPLEMENTATION_TYPE)
{
-#if 0 /* Grossly unportable. People should know better that to
- assume such things about assembler syntax! */
+#if 0 /* Grossly unportable.
+ People should know better than to assume
+ such things about assembler syntax! */
sprintf (utlbuf, ".objc_class_name_%s=0",
IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)));
assemble_asm (my_build_string (strlen (utlbuf) + 1, utlbuf));