diff options
author | Michael Meissner <meissner@the-meissners.org> | 2011-12-09 17:10:27 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2011-12-09 17:10:27 +0000 |
commit | 15ce64af29141facd203687d000e21fe6f877234 (patch) | |
tree | ac24d21fa760d2cf985f1c62a77df7eb471f64e4 /gcc/varasm.c | |
parent | 9820d09c2612ca7d3ab4763593af8da10745fa93 (diff) | |
download | gcc-15ce64af29141facd203687d000e21fe6f877234.tar.gz |
Fix PR51469 (attr-ifunc fails on ppc); Make #pragma GCC target ("...") change macros on PPC
From-SVN: r182169
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 78dc4cd83f0..86134672cbe 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -6911,11 +6911,14 @@ default_binds_local_p_1 (const_tree exp, int shlib) /* A non-decl is an entry in the constant pool. */ if (!DECL_P (exp)) local_p = true; - /* Weakrefs may not bind locally, even though the weakref itself is - always static and therefore local. - FIXME: We can resolve this more curefuly by looking at the weakref - alias. */ - else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp))) + /* Weakrefs may not bind locally, even though the weakref itself is always + static and therefore local. Similarly, the resolver for ifunc functions + might resolve to a non-local function. + FIXME: We can resolve the weakref case more curefuly by looking at the + weakref alias. */ + else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp)) + || (TREE_CODE (exp) == FUNCTION_DECL + && lookup_attribute ("ifunc", DECL_ATTRIBUTES (exp)))) local_p = false; /* Static variables are always local. */ else if (! TREE_PUBLIC (exp)) |