stop defining linkrelax in multiple places
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Sat, 14 May 2016 04:34:05 +0000 (00:34 -0400)
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Mon, 16 May 2016 09:01:52 +0000 (05:01 -0400)
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.

gas/ChangeLog
gas/config/tc-mn10300.c
gas/config/tc-msp430.c

index b50994da58e970836b48793a9c83a1accf70b5c9..6e69e950fa856b6bf9f087ef59aae288753ae6ef 100644 (file)
@@ -1,3 +1,9 @@
+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
index 52c37e18a7b08331b281dd57cfe2fb42368d501d..4ce2ee4d49839b020f171863a479143c6ca9a50f 100644 (file)
@@ -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;
index 8e95b1dbfdbdd3623522f0de935e9d433e24f726..d2e9b4e077582bb26f901366dcd5845ac48db00e 100644 (file)
@@ -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.
This page took 0.03781 seconds and 4 git commands to generate.