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] stop defining linkrelax in multiple places


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

commit 9117cd3e10673e8f80fc0c64f1a32215d9638fc2
Author: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Date:   Sat May 14 00:34:05 2016 -0400

    stop defining linkrelax in multiple places
    
    Defining linkrelax to have different values in as.c and tc-msp430.c /
    tc-mn10300.c is at least rather tricky, and seems fragile, when we can just set
    it in md_begin instead.
    
    gas/ChangeLog:
    
    2016-05-16  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
    
    	* config/tc-mn10300.c (md_begin): set linkrelax here instead of
    	defining it.
    	* config/tc-msp430.c (md_begin): Likewise.

Diff:
---
 gas/ChangeLog           | 6 ++++++
 gas/config/tc-mn10300.c | 6 +++---
 gas/config/tc-msp430.c  | 6 +++---
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index b50994d..6e69e95 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
 2016-05-16  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
 
+	* config/tc-mn10300.c (md_begin): set linkrelax here instead of
+	defining it.
+	* config/tc-msp430.c (md_begin): Likewise.
+
+2016-05-16  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
 	* config/tc-m68hc11.c (fixup8): Change variables type from int to
 	bfd_reloc_code_real_type where appropriate.
 	(fixup16): Likewise.
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index 52c37e1..4ce2ee4 100644
--- a/gas/config/tc-mn10300.c
+++ b/gas/config/tc-mn10300.c
@@ -89,9 +89,6 @@ const relax_typeS md_relax_table[] =
 
 };
 
-/*  Set linkrelax here to avoid fixups in most sections.  */
-int linkrelax = 1;
-
 static int current_machine;
 
 /* Fixups.  */
@@ -944,6 +941,9 @@ md_begin (void)
 
   current_machine = MN103;
 #endif
+
+  /*  Set linkrelax here to avoid fixups in most sections.  */
+  linkrelax = 1;
 }
 
 static symbolS *GOT_symbol;
diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c
index 8e95b1d..d2e9b4e 100644
--- a/gas/config/tc-msp430.c
+++ b/gas/config/tc-msp430.c
@@ -69,9 +69,6 @@
 int msp430_enable_relax;
 int msp430_enable_polys;
 
-/*  Set linkrelax here to avoid fixups in most sections.  */
-int linkrelax = 1;
-
 /* GCC uses the some condition codes which we'll
    implement as new polymorph instructions.
 
@@ -1647,6 +1644,9 @@ md_begin (void)
 
   bfd_set_arch_mach (stdoutput, TARGET_ARCH,
 		     target_is_430x () ? bfd_mach_msp430x : bfd_mach_msp11);
+
+  /*  Set linkrelax here to avoid fixups in most sections.  */
+  linkrelax = 1;
 }
 
 /* Returns the register number equivalent to the string T.


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