diff options
Diffstat (limited to 'gas/symbols.c')
-rw-r--r-- | gas/symbols.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/symbols.c b/gas/symbols.c index b631a1d6aa..252cfcef4e 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -2184,6 +2184,12 @@ S_SET_EXTERNAL (symbolS *s) _("section symbols are already global")); return; } + if (S_GET_SEGMENT (s) == reg_section) + { + as_bad ("can't make register symbol `%s' global", + S_GET_NAME (s)); + return; + } s->bsym->flags |= BSF_GLOBAL; s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK); |