aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-03-03 15:28:58 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-03-03 15:28:58 +0000
commitd0548f348f221abbc1241e30f3e346b2c96cc8ad (patch)
treef485ff2e3e6a2f3fdb34bca5fec55e4a1720f7b8 /gas/read.c
parentfa4727a64f112282dc798744b98b0f39bd3458e8 (diff)
downloadgdb-d0548f348f221abbc1241e30f3e346b2c96cc8ad.zip
gdb-d0548f348f221abbc1241e30f3e346b2c96cc8ad.tar.gz
gdb-d0548f348f221abbc1241e30f3e346b2c96cc8ad.tar.bz2
gas/
2008-03-03 Denys Vlasenko <vda.linux@googlemail.com> H.J. Lu <hongjiu.lu@intel.com> PR gas/5543 * read.c (pseudo_set): Don't allow global register symbol. * symbols.c (S_SET_EXTERNAL): Don't allow register symbol global. 2008-03-03 H.J. Lu <hongjiu.lu@intel.com> PR gas/5543 * write.c (write_object_file): Don't allow symbols which were equated to register. Stop if there is an error. gas/testsuite/ 2008-03-03 H.J. Lu <hongjiu.lu@intel.com> PR gas/5543 * gas/i386/i386.exp: Run inval-equ-1 and inval-equ-2. * gas/i386/inval-equ-1.l: New. * gas/i386/inval-equ-1.s: Likewise. * gas/i386/inval-equ-2.l: Likewise. * gas/i386/inval-equ-2.s: Likewise.
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);