gcc/gcc5-arm-fnsect.patch

26 lines
866 B
Diff

2015-02-19 Richard Henderson <rth@redhat.com>
* config/arm/arm.c (arm_function_in_section_p): Delete bogus
TREE_STATIC check, use decl_binds_to_current_def_p instead of
targetm.binds_local_p.
--- gcc/config/arm/arm.c
+++ gcc/config/arm/arm.c
@@ -6392,14 +6392,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. */