aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Velenko <Alex.Velenko@arm.com>2015-03-05 16:45:21 +0000
committerAlex Velenko <avelenko@gcc.gnu.org>2015-03-05 16:45:21 +0000
commit2755b64ed5855eddc6f7ae554116870735065632 (patch)
treeb6bb9732ee4bccfadbdf805d805b21c22a1bbd92
parenta8eeec27a94869785782a2d98969b437c4c5d62e (diff)
downloadgcc-2755b64ed5855eddc6f7ae554116870735065632.zip
gcc-2755b64ed5855eddc6f7ae554116870735065632.tar.gz
gcc-2755b64ed5855eddc6f7ae554116870735065632.tar.bz2
arm.c (arm_function_in_section_p): Fix predicate to correctly check weak symbol binding.
2015-03-05 Alex Velenko <alex.velenko@arm.com> * config/arm/arm.c (arm_function_in_section_p): Fix predicate to correctly check weak symbol binding. From-SVN: r221220
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/arm.c10
2 files changed, 7 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 368a7d0..73a346a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-05 Alex Velenko <alex.velenko@arm.com>
+
+ * config/arm/arm.c (arm_function_in_section_p): Fix predicate to
+ correctly check weak symbol binding.
+
2015-03-05 Steve Ellcey <sellcey@imgtec.com>
PR middle-end/65315
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index f7063bc..48342d0 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -6396,14 +6396,8 @@ arm_set_default_type_attributes (tree type)
static bool
arm_function_in_section_p (tree decl, section *section)
{
- /* We can only be certain about functions defined in the same
- compilation unit. */
- if (!TREE_STATIC (decl))
- return false;
-
- /* Make sure that SYMBOL always binds to the definition in this
- compilation unit. */
- if (!targetm.binds_local_p (decl))
+ /* We can only be certain about the prevailing symbol definition. */
+ if (!decl_binds_to_current_def_p (decl))
return false;
/* If DECL_SECTION_NAME is set, assume it is trustworthy. */