This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] NDS32/gas: Fix md_parse_name hook.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3bd3aeb46126494401e2f265b55fc255d5c5b517

commit 3bd3aeb46126494401e2f265b55fc255d5c5b517
Author: Kuan-Lin Chen <kuanlinchentw@gmail.com>
Date:   Tue Jan 27 11:08:07 2015 +0800

    NDS32/gas: Fix md_parse_name hook.

Diff:
---
 gas/ChangeLog         | 5 +++++
 gas/config/tc-nds32.c | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6da11bb..6dbdb79 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-27  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
+
+	* config/tc-nds32.c (nds32_parse_name): Ignore when the input is
+	section name.
+
 2015-01-19  Alan Modra  <amodra@gmail.com>
 
 	* read.c (s_reloc): Match BFD_RELOC_NONE, BFD_RELOC{8,16,32,64}.
diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c
index 7a23721..28e90ae 100644
--- a/gas/config/tc-nds32.c
+++ b/gas/config/tc-nds32.c
@@ -6541,6 +6541,8 @@ nds32_parse_name (char const *name, expressionS *exprP,
 		  enum expr_mode mode ATTRIBUTE_UNUSED,
 		  char *nextcharP ATTRIBUTE_UNUSED)
 {
+  segT segment;
+
   exprP->X_op_symbol = NULL;
   exprP->X_md = BFD_RELOC_UNUSED;
 
@@ -6548,6 +6550,11 @@ nds32_parse_name (char const *name, expressionS *exprP,
   exprP->X_op = O_symbol;
   exprP->X_add_number = 0;
 
+  /* Check the specail name if a symbol.  */
+  segment = S_GET_SEGMENT (exprP->X_add_symbol);
+  if (segment != undefined_section)
+    return 0;
+
   if (strcmp (name, GOT_NAME) == 0 && *nextcharP != '@')
     {
       /* Set for _GOT_OFFSET_TABLE_.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]