diff options
author | Geoffrey Keating <geoffk@apple.com> | 2005-12-05 21:38:27 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2005-12-05 21:38:27 +0000 |
commit | 0f9bc2d6bfeb5c89d6f22fa8a1feb5b6e8a2a928 (patch) | |
tree | c23f5fc2f2d9999227274d364e8bff40524b5323 /gcc/config/darwin.c | |
parent | a9b0b82578a7f552e3530e690a147303a592a34e (diff) | |
download | gcc-0f9bc2d6bfeb5c89d6f22fa8a1feb5b6e8a2a928.zip gcc-0f9bc2d6bfeb5c89d6f22fa8a1feb5b6e8a2a928.tar.gz gcc-0f9bc2d6bfeb5c89d6f22fa8a1feb5b6e8a2a928.tar.bz2 |
Index: gcc/ChangeLog
2005-12-05 Geoffrey Keating <geoffk@apple.com>
* config/darwin.c (machopic_select_section): It's not defined
as weak if it's only marked as weak_import.
Index: gcc/testsuite/ChangeLog
2005-12-05 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/darwin-weakimport-3.c: New.
From-SVN: r108076
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r-- | gcc/config/darwin.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 49c4114..54edae4 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1027,7 +1027,10 @@ machopic_select_section (tree exp, int reloc, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { void (*base_function)(void); - bool weak_p = DECL_P (exp) && DECL_WEAK (exp); + bool weak_p = (DECL_P (exp) && DECL_WEAK (exp) + && (lookup_attribute ("weak", DECL_ATTRIBUTES (exp)) + || ! lookup_attribute ("weak_import", + DECL_ATTRIBUTES (exp)))); static void (* const base_funs[][2])(void) = { { text_section, text_coal_section }, { unlikely_text_section, text_unlikely_coal_section }, |