darwin.c (no_dead_strip): Add.

* 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.
Radar 3668092

From-SVN: r84444
This commit is contained in:
Mike Stump 2004-07-10 05:54:27 +00:00 committed by Mike Stump
parent d3ecb597b3
commit 45cc478337
2 changed files with 25 additions and 1 deletions

View File

@ -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.

View File

@ -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);