aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/read.c b/gas/read.c
index ed3be37..8163c5a 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -3604,6 +3604,12 @@ pseudo_set (symbolS *symbolP)
break;
case O_register:
+ if (S_IS_EXTERNAL (symbolP))
+ {
+ as_bad ("can't equate global symbol `%s' with register name",
+ S_GET_NAME (symbolP));
+ return;
+ }
S_SET_SEGMENT (symbolP, reg_section);
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
set_zero_frag (symbolP);