summaryrefslogtreecommitdiff
path: root/gas/symbols.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-06-05 08:29:59 +0000
committerNick Clifton <nickc@redhat.com>2001-06-05 08:29:59 +0000
commit90222110c42cba5eebfe7ad28df1d0d78951056a (patch)
treee58a822ca5ba4026e0a4c317c86a3ea64ac7fb64 /gas/symbols.c
parent5003e7a746768dae1596b8f6eab4cd06826034ac (diff)
downloadbinutils-redhat-90222110c42cba5eebfe7ad28df1d0d78951056a.tar.gz
Do not allow .globl to override .section
Diffstat (limited to 'gas/symbols.c')
-rw-r--r--gas/symbols.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gas/symbols.c b/gas/symbols.c
index 764217dbad..8396dabdee 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1824,6 +1824,17 @@ S_SET_EXTERNAL (s)
/* Let .weak override .global. */
return;
}
+ if (s->bsym->flags & BSF_SECTION_SYM)
+ {
+ char * file;
+ unsigned int line;
+
+ /* Do not reassign section symbols. */
+ as_where (& file, & line);
+ as_warn_where (file, line,
+ _("Section symbols are already global"));
+ return;
+ }
s->bsym->flags |= BSF_GLOBAL;
s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
}