diff options
| author | Geoffrey Keating <geoffk@apple.com> | 2004-10-27 23:02:39 +0000 |
|---|---|---|
| committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2004-10-27 23:02:39 +0000 |
| commit | 005c1a13e5649b1c7a213c8d76f8e0e20d25a891 (patch) | |
| tree | cfb4cd621b8390f148fe008b597f52830668a28b /gcc/config/darwin.c | |
| parent | 9a3137c336cf8e3f34d86a36a8eb76043abec00b (diff) | |
| download | gcc-005c1a13e5649b1c7a213c8d76f8e0e20d25a891.zip gcc-005c1a13e5649b1c7a213c8d76f8e0e20d25a891.tar.gz gcc-005c1a13e5649b1c7a213c8d76f8e0e20d25a891.tar.bz2 | |
Index: fixincludes/ChangeLog
2004-10-27 Geoffrey Keating <geoffk@apple.com>
* inclhack.def (darwin_gcc4_breakage): New.
* fixincl.x: Regenerate.
Index: gcc/ChangeLog
2004-10-27 Geoffrey Keating <geoffk@apple.com>
* config/rs6000/rs6000.c (rs6000_attribute_table): Add
SUBTARGET_ATTRIBUTE_TABLE.
* config/darwin.h (ASM_WEAKEN_DECL): Handle weak_import.
(SUBTARGET_ATTRIBUTE_TABLE): Define.
* config/darwin.c (darwin_handle_weak_import_attribute): New.
(HAVE_DEAD_STRIP): Delete.
(no_dead_strip): Don't test HAVE_DEAD_STRIP.
* config/darwin-protos.h (darwin_handle_weak_import_attribute):
Prototype.
Index: gcc/testsuite/ChangeLog
2004-10-27 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/darwin-weakimport-1.c: New.
From-SVN: r89716
Diffstat (limited to 'gcc/config/darwin.c')
| -rw-r--r-- | gcc/config/darwin.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 0c39fd8..73581f7 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1209,13 +1209,30 @@ darwin_unique_section (tree decl ATTRIBUTE_UNUSED, int reloc ATTRIBUTE_UNUSED) /* Darwin does not use unique sections. */ } -#define HAVE_DEAD_STRIP 0 +/* Handle a "weak_import" attribute; arguments as in + struct attribute_spec.handler. */ + +tree +darwin_handle_weak_import_attribute (tree *node, tree name, + tree ARG_UNUSED (args), + int ARG_UNUSED (flags), + bool * no_add_attrs) +{ + if (TREE_CODE (*node) != FUNCTION_DECL) + { + warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); + *no_add_attrs = true; + } + else + declare_weak (*node); + + return NULL_TREE; +} static void no_dead_strip (FILE *file, const char *lab) { - if (HAVE_DEAD_STRIP) - fprintf (file, ".no_dead_strip %s\n", lab); + fprintf (file, ".no_dead_strip %s\n", lab); } /* Emit a label for an FDE, making it global and/or weak if appropriate. |
