aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-02-26 17:48:57 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-02-26 17:48:57 -0800
commiteadccfbb857dfdac6c286b38bc500154785c5982 (patch)
tree74662ace933747fc88e3af3266270e3c955eae45
parent7fe4a89aedaa72d35e8e19b66ab19db834cff242 (diff)
downloadgcc-eadccfbb857dfdac6c286b38bc500154785c5982.zip
gcc-eadccfbb857dfdac6c286b38bc500154785c5982.tar.gz
gcc-eadccfbb857dfdac6c286b38bc500154785c5982.tar.bz2
alpha.c (alpha_encode_section_info): Examine MODULE_LOCAL_P; improve commentary.
* config/alpha/alpha.c (alpha_encode_section_info): Examine MODULE_LOCAL_P; improve commentary. From-SVN: r50082
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/alpha/alpha.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0541553..dedadf2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-26 Richard Henderson <rth@redhat.com>
+
+ * config/alpha/alpha.c (alpha_encode_section_info): Examine
+ MODULE_LOCAL_P; improve commentary.
+
2002-02-26 Zack Weinberg <zack@codesourcery.com>
* doc/cpp.texi: Clarify documentation of relationship between
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 7710be5..aea7471 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -1566,6 +1566,7 @@ alpha_encode_section_info (decl)
don't know that they exist in this unit of translation. */
if (TREE_PUBLIC (decl))
return;
+
/* Do not mark functions that are not in .text; otherwise we
don't know that they are near enough for a direct branch. */
if (! decl_in_text_section (decl))
@@ -1589,11 +1590,16 @@ alpha_encode_section_info (decl)
/* A variable is considered "local" if it is defined in this module. */
- if (DECL_EXTERNAL (decl))
+ /* Local binding occurs for any non-default visibility. */
+ if (MODULE_LOCAL_P (decl))
+ is_local = true;
+ /* Otherwise, variables defined outside this object may not be local. */
+ else if (DECL_EXTERNAL (decl))
is_local = false;
/* Linkonce and weak data is never local. */
else if (DECL_ONE_ONLY (decl) || DECL_WEAK (decl))
is_local = false;
+ /* Static variables are always local. */
else if (! TREE_PUBLIC (decl))
is_local = true;
/* If PIC, then assume that any global name can be overridden by