diff options
author | Nick Clifton <nickc@redhat.com> | 2001-06-05 08:29:59 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-06-05 08:29:59 +0000 |
commit | 4d7c34bfcea874414fc339fcd3a890b9ca9e124b (patch) | |
tree | 9aecd2c7f44311454436efbf2a0902951d95d55c /gas | |
parent | cbb1fd505210e40b9085227ec54f602fa62ce457 (diff) | |
download | gdb-4d7c34bfcea874414fc339fcd3a890b9ca9e124b.zip gdb-4d7c34bfcea874414fc339fcd3a890b9ca9e124b.tar.gz gdb-4d7c34bfcea874414fc339fcd3a890b9ca9e124b.tar.bz2 |
Do not allow .globl to override .section
Diffstat (limited to 'gas')
-rw-r--r-- | gas/symbols.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gas/symbols.c b/gas/symbols.c index 764217d..8396dab 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); } |