aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/darwin.c19
2 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e5fd185..12ee0ae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-09 Mike Stump <mrs@apple.com>
+
+ * config/darwin.c (no_dead_strip): Add.
+ (HAVE_DEAD_STRIP): Add.
+ (darwin_emit_unwind_label): Ensure that we don't dead code strip
+ the .eh label.
+
2004-07-09 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* tree-ssa-loop-im.c: New file.
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 17d7fb7..e46690c 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1339,6 +1339,15 @@ darwin_unique_section (tree decl, int reloc ATTRIBUTE_UNUSED)
darwin_make_decl_one_only (decl);
}
+#define HAVE_DEAD_STRIP 0
+
+static void
+no_dead_strip (FILE *file, const char *lab)
+{
+ if (HAVE_DEAD_STRIP)
+ fprintf (file, ".no_dead_strip %s\n", lab);
+}
+
/* Emit a label for an FDE, making it global and/or weak if appropriate.
The third parameter is nonzero if this is for exception handling.
The fourth parameter is nonzero if this is just a placeholder for an
@@ -1388,7 +1397,15 @@ darwin_emit_unwind_label (FILE *file, tree decl, int for_eh, int empty)
fprintf (file, ".weak_definition %s\n", lab);
if (empty)
- fprintf (file, "%s = 0\n", lab);
+ {
+ fprintf (file, "%s = 0\n", lab);
+
+ /* Mark the absolute .eh and .eh1 style labels as needed to
+ ensure that we don't dead code strip them and keep such
+ labels from another instantiation point until we can fix this
+ properly with group comdat support. */
+ no_dead_strip (file, lab);
+ }
else
fprintf (file, "%s:\n", lab);