aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorIain Sandoe <iain@codesourcery.com>2013-09-14 15:36:41 +0000
committerIain Sandoe <iains@gcc.gnu.org>2013-09-14 15:36:41 +0000
commitfb5610fbf391182c2fd5e76d19425b4b6b57d219 (patch)
tree37f8cb3b89d7b0c506037785ff7f0325114657cb /gcc/objc
parentafdec9bd067cffe3242fe256e547dc5733006b2c (diff)
downloadgcc-fb5610fbf391182c2fd5e76d19425b4b6b57d219.zip
gcc-fb5610fbf391182c2fd5e76d19425b4b6b57d219.tar.gz
gcc-fb5610fbf391182c2fd5e76d19425b4b6b57d219.tar.bz2
re PR target/48094 (ld: warning: section has unexpectedly large size errors in objc/obj-c++ lto)
gcc: PR target/48094 * config/darwin.c (darwin_objc2_section): Note if ObjC Metadata is seen. (darwin_objc1_section): Likewise. (darwin_file_end): Emit Image Info section when required. gcc/c-family: PR target/48094 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version, fobjc-gc, freplace-objc-classes): Accept for LTO. gcc/objc: PR target/48094 * objc-next-runtime-abi-01.c (generate_objc_image_info): Remove. (objc_generate_v1_next_metadata): Remove generation of ImageInfo. * objc-next-runtime-abi-02.c (generate_v2_objc_image_info): Remove. (objc_generate_v2_next_metadata): Remove generation of ImageInfo. From-SVN: r202593
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog8
-rw-r--r--gcc/objc/objc-next-runtime-abi-01.c33
-rw-r--r--gcc/objc/objc-next-runtime-abi-02.c28
3 files changed, 8 insertions, 61 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 30b6d17..0cdd761 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,11 @@
+2013-09-14 Iain Sandoe <iain@codesourcery.com>
+
+ PR target/48094
+ * objc-next-runtime-abi-01.c (generate_objc_image_info): Remove.
+ (objc_generate_v1_next_metadata): Remove generation of ImageInfo.
+ * objc-next-runtime-abi-02.c (generate_v2_objc_image_info): Remove.
+ (objc_generate_v2_next_metadata): Remove generation of ImageInfo.
+
2013-07-21 Ondřej Bílka <neleai@seznam.cz>
* objc-act.c: Fix typos.
diff --git a/gcc/objc/objc-next-runtime-abi-01.c b/gcc/objc/objc-next-runtime-abi-01.c
index 27ba615..000256d 100644
--- a/gcc/objc/objc-next-runtime-abi-01.c
+++ b/gcc/objc/objc-next-runtime-abi-01.c
@@ -2332,36 +2332,6 @@ generate_classref_translation_entry (tree chain)
return;
}
-
-/* The Fix-and-Continue functionality available in Mac OS X 10.3 and
- later requires that ObjC translation units participating in F&C be
- specially marked. The following routine accomplishes this. */
-
-/* static int _OBJC_IMAGE_INFO[2] = { 0, 1 }; */
-
-static void
-generate_objc_image_info (void)
-{
- tree decl;
- int flags
- = ((flag_replace_objc_classes && imp_count ? 1 : 0)
- | (flag_objc_gc ? 2 : 0));
- vec<constructor_elt, va_gc> *v = NULL;
- tree array_type;
-
- array_type = build_sized_array_type (integer_type_node, 2);
-
- decl = start_var_decl (array_type, "_OBJC_ImageInfo");
-
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, integer_zero_node);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (integer_type_node, flags));
- /* The runtime wants this and refers to it in a manner hidden from the compiler.
- So we must force the output. */
- DECL_PRESERVE_P (decl) = 1;
- OBJCMETA (decl, objc_meta, meta_info);
- finish_var_decl (decl, objc_build_constructor (TREE_TYPE (decl), v));
-}
-
static void
objc_generate_v1_next_metadata (void)
{
@@ -2412,9 +2382,6 @@ objc_generate_v1_next_metadata (void)
attr = build_tree_list (objc_meta, meta_modules);
build_module_descriptor (vers, attr);
- /* This conveys information on GC usage and zero-link. */
- generate_objc_image_info ();
-
/* Dump the class references. This forces the appropriate classes
to be linked into the executable image, preserving unix archive
semantics. */
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index 4bb02c7..0960006 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -3331,31 +3331,6 @@ build_v2_ivar_offset_ref_table (void)
finish_var_decl (ref->decl, ref->offset);
}
-/* static int _OBJC_IMAGE_INFO[2] = { 0, 16 | flags }; */
-
-static void
-generate_v2_objc_image_info (void)
-{
- tree decl, array_type;
- vec<constructor_elt, va_gc> *v = NULL;
- int flags =
- ((flag_replace_objc_classes && imp_count ? 1 : 0)
- | (flag_objc_gc ? 2 : 0));
-
- flags |= 16;
-
- array_type = build_sized_array_type (integer_type_node, 2);
-
- decl = start_var_decl (array_type, "_OBJC_ImageInfo");
-
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, integer_zero_node);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (integer_type_node, flags));
- /* The Runtime wants this. */
- DECL_PRESERVE_P (decl) = 1;
- OBJCMETA (decl, objc_meta, meta_info);
- finish_var_decl (decl, objc_build_constructor (TREE_TYPE (decl), v));
-}
-
static void
objc_generate_v2_next_metadata (void)
{
@@ -3407,9 +3382,6 @@ objc_generate_v2_next_metadata (void)
build_v2_address_table (nonlazy_category_list, "_OBJC_NonLazyCategoryList$",
meta_label_nonlazy_categorylist);
- /* This conveys information on GC usage and zero-link. */
- generate_v2_objc_image_info ();
-
/* Generate catch objects for eh, if any are needed. */
build_v2_eh_catch_objects ();