This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] NDS32/gas: Limit the format of pseudo instruction la.
- From: Kuan-Lin Chen <kuanlinchen at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 27 Jan 2015 06:32:15 -0000
- Subject: [binutils-gdb] NDS32/gas: Limit the format of pseudo instruction la.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=20d79870f35f646e87c43d8c4fee936b4e0ed5a6
commit 20d79870f35f646e87c43d8c4fee936b4e0ed5a6
Author: Kuan-Lin Chen <kuanlinchentw@gmail.com>
Date: Tue Jan 27 11:19:13 2015 +0800
NDS32/gas: Limit the format of pseudo instruction la.
Diff:
---
gas/ChangeLog | 5 +++++
gas/config/tc-nds32.c | 11 ++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6dbdb79..2e7205b 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2015-01-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
+ * config/tc-nds32.c (do_pseudo_la_internal): Limit the second argument
+ of instruction la to a symbol.
+
+2015-01-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
+
* config/tc-nds32.c (nds32_parse_name): Ignore when the input is
section name.
diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c
index 28e90ae..bf537b2 100644
--- a/gas/config/tc-nds32.c
+++ b/gas/config/tc-nds32.c
@@ -2311,9 +2311,18 @@ do_pseudo_bral (int argc, char *argv[], int pv ATTRIBUTE_UNUSED)
}
static void
-do_pseudo_la_internal (const char *arg_reg, const char *arg_label,
+do_pseudo_la_internal (const char *arg_reg, char *arg_label,
const char *line)
{
+ expressionS exp;
+
+ parse_expression (arg_label, &exp);
+ if (exp.X_op != O_symbol)
+ {
+ as_bad (_("la must use with symbol. '%s'"), line);
+ return;
+ }
+
relaxing = TRUE;
/* rt, label */
if (!nds32_pic && !strstr(arg_label, "@"))