Rearrange symbol_create parameters
authorAlan Modra <amodra@gmail.com>
Thu, 20 Aug 2020 23:47:53 +0000 (09:17 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 21 Aug 2020 08:56:35 +0000 (18:26 +0930)
These functions take an offset within frag, frag within section, and
section parameter.  So it makes sense to order the parameters as
section, frag, offset.

* symbols.h (symbol_new, symbol_create, local_symbol_make),
(symbol_temp_new): Arrange params as section, frag, offset.
* symbols.c: Adjust to suit.
* as.c: Likewise.
* cgen.c: Likewise.
* dwarf2dbg.c: Likewise.
* ecoff.c: Likewise.
* expr.c: Likewise.
* itbl-ops.c: Likewise.
* read.c: Likewise.
* stabs.c: Likewise.
* subsegs.c: Likewise.
* config/obj-coff.c: Likewise.
* config/obj-elf.c: Likewise.
* config/obj-macho.c: Likewise.
* config/tc-aarch64.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-cris.c: Likewise.
* config/tc-csky.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-hppa.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-m32r.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-mmix.c: Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-nds32.c: Likewise.
* config/tc-nios2.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-riscv.c: Likewise.
* config/tc-s390.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-xtensa.c: Likewise.

42 files changed:
gas/ChangeLog
gas/as.c
gas/cgen.c
gas/config/obj-coff.c
gas/config/obj-elf.c
gas/config/obj-macho.c
gas/config/tc-aarch64.c
gas/config/tc-alpha.c
gas/config/tc-arc.c
gas/config/tc-arm.c
gas/config/tc-avr.c
gas/config/tc-cr16.c
gas/config/tc-cris.c
gas/config/tc-csky.c
gas/config/tc-dlx.c
gas/config/tc-hppa.c
gas/config/tc-i386.c
gas/config/tc-ia64.c
gas/config/tc-m32r.c
gas/config/tc-m68k.c
gas/config/tc-mips.c
gas/config/tc-mmix.c
gas/config/tc-mn10200.c
gas/config/tc-mn10300.c
gas/config/tc-nds32.c
gas/config/tc-nios2.c
gas/config/tc-ppc.c
gas/config/tc-riscv.c
gas/config/tc-s390.c
gas/config/tc-sh.c
gas/config/tc-tic4x.c
gas/config/tc-tic54x.c
gas/config/tc-xtensa.c
gas/dwarf2dbg.c
gas/ecoff.c
gas/expr.c
gas/itbl-ops.c
gas/read.c
gas/stabs.c
gas/subsegs.c
gas/symbols.c
gas/symbols.h

index 94ad709568faa7331b55f8713967d7a616d76c24..341530fdaf0de05cdf446ebbd6cae67c69457d55 100644 (file)
@@ -1,3 +1,48 @@
+2020-08-21  Alan Modra  <amodra@gmail.com>
+
+       * symbols.h (symbol_new, symbol_create, local_symbol_make),
+       (symbol_temp_new): Arrange params as section, frag, offset.
+       * symbols.c: Adjust to suit.
+       * as.c: Likewise.
+       * cgen.c: Likewise.
+       * dwarf2dbg.c: Likewise.
+       * ecoff.c: Likewise.
+       * expr.c: Likewise.
+       * itbl-ops.c: Likewise.
+       * read.c: Likewise.
+       * stabs.c: Likewise.
+       * subsegs.c: Likewise.
+       * config/obj-coff.c: Likewise.
+       * config/obj-elf.c: Likewise.
+       * config/obj-macho.c: Likewise.
+       * config/tc-aarch64.c: Likewise.
+       * config/tc-alpha.c: Likewise.
+       * config/tc-arc.c: Likewise.
+       * config/tc-arm.c: Likewise.
+       * config/tc-avr.c: Likewise.
+       * config/tc-cr16.c: Likewise.
+       * config/tc-cris.c: Likewise.
+       * config/tc-csky.c: Likewise.
+       * config/tc-dlx.c: Likewise.
+       * config/tc-hppa.c: Likewise.
+       * config/tc-i386.c: Likewise.
+       * config/tc-ia64.c: Likewise.
+       * config/tc-m32r.c: Likewise.
+       * config/tc-m68k.c: Likewise.
+       * config/tc-mips.c: Likewise.
+       * config/tc-mmix.c: Likewise.
+       * config/tc-mn10200.c: Likewise.
+       * config/tc-mn10300.c: Likewise.
+       * config/tc-nds32.c: Likewise.
+       * config/tc-nios2.c: Likewise.
+       * config/tc-ppc.c: Likewise.
+       * config/tc-riscv.c: Likewise.
+       * config/tc-s390.c: Likewise.
+       * config/tc-sh.c: Likewise.
+       * config/tc-tic4x.c: Likewise.
+       * config/tc-tic54x.c: Likewise.
+       * config/tc-xtensa.c: Likewise.
+
 2020-08-21  Cooper Qu  <cooper.qu@linux.alibaba.com>
 
        * config/tc-csky.c (csky_insn_info): Add member last_isize.
index c8d7c55d6f53a2c0aef90733bcdd436b46de8037..a703d7a67273508e55a504174113902318b46c9b 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -1368,7 +1368,7 @@ main (int argc, char ** argv)
   dwarf2_init ();
 
   local_symbol_make (".gasversion.", absolute_section,
-                    BFD_VERSION / 10000UL, &predefined_address_frag);
+                    &predefined_address_frag, BFD_VERSION / 10000UL);
 
   /* Now that we have fully initialized, and have created the output
      file, define any symbols requested by --defsym command line
@@ -1378,8 +1378,8 @@ main (int argc, char ** argv)
       symbolS *sym;
       struct defsym_list *next;
 
-      sym = symbol_new (defsyms->name, absolute_section, defsyms->value,
-                       &zero_address_frag);
+      sym = symbol_new (defsyms->name, absolute_section,
+                       &zero_address_frag, defsyms->value);
       /* Make symbols defined on the command line volatile, so that they
         can be redefined inside a source file.  This makes this assembler's
         behaviour compatible with earlier versions, but it may not be
index 8d1867b731147811228185e86f1b802d34b35dca..0bc44f6c08c2881602772c7904170a6035ef9f73 100644 (file)
@@ -61,7 +61,7 @@ cgen_asm_record_register (char *name, int number)
   /* Use symbol_create here instead of symbol_new so we don't try to
      output registers into the object file's symbol table.  */
   symbol_table_insert (symbol_create (name, reg_section,
-                                     number, &zero_address_frag));
+                                     &zero_address_frag, number));
 }
 
 /* We need to keep a list of fixups.  We can't simply generate them as
@@ -437,8 +437,8 @@ gas_cgen_parse_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
                 prematurely dives into the symbol evaluator, and in this
                 case it gets a bad answer, so we manually create the
                 expression symbol we want here.  */
-             stmp = symbol_create (FAKE_LABEL_NAME, expr_section, 0,
-                                   & zero_address_frag);
+             stmp = symbol_create (FAKE_LABEL_NAME, expr_section,
+                                   &zero_address_frag, 0);
              symbol_set_value_expression (stmp, & exp);
            }
          else
index d0d128f30016e1b34e74837306a0e3fc1977acf4..7e26e58cb9557541ad0ddbb9ea730fd9eab0f05d 100644 (file)
@@ -144,8 +144,7 @@ tag_find_or_make (char *name)
 
   if ((symbolP = tag_find (name)) == NULL)
     {
-      symbolP = symbol_new (name, undefined_section,
-                           0, &zero_address_frag);
+      symbolP = symbol_new (name, undefined_section, &zero_address_frag, 0);
 
       tag_insert (S_GET_NAME (symbolP), symbolP);
       symbol_table_insert (symbolP);
@@ -324,7 +323,7 @@ c_dot_file_symbol (const char *filename, int appfile ATTRIBUTE_UNUSED)
 
   /* BFD converts filename to a .file symbol with an aux entry.  It
      also handles chaining.  */
-  symbolP = symbol_new (filename, bfd_abs_section_ptr, 0, &zero_address_frag);
+  symbolP = symbol_new (filename, bfd_abs_section_ptr, &zero_address_frag, 0);
 
   S_SET_STORAGE_CLASS (symbolP, C_FILE);
   S_SET_NUMBER_AUXILIARY (symbolP, 1);
index ba93770ac1a7e5d6e2cecc293795d7f615f8baf7..f1691877c42ca87cdc22514773447ac9edfee6a8 100644 (file)
@@ -271,8 +271,7 @@ elf_file_symbol (const char *s, int appfile)
       symbolS *sym;
       size_t name_length;
 
-      sym = symbol_new (s, absolute_section, 0, NULL);
-      symbol_set_frag (sym, &zero_address_frag);
+      sym = symbol_new (s, absolute_section, &zero_address_frag, 0);
 
       name_length = strlen (s);
       if (name_length > strlen (S_GET_NAME (sym)))
@@ -2724,7 +2723,7 @@ elf_adjust_symtab (void)
       if (!sy || !symbol_on_chain (sy, symbol_rootP, symbol_lastP))
        {
          /* Create the symbol now.  */
-         sy = symbol_new (group_name, now_seg, (valueT) 0, frag_now);
+         sy = symbol_new (group_name, now_seg, frag_now, 0);
 #ifdef TE_SOLARIS
          /* Before Solaris 11 build 154, Sun ld rejects local group
             signature symbols, so make them weak hidden instead.  */
index 3788f82f5f0dde1fcd9d9e733f1ffd3addd24ceb..4b54a667a0381cc081c288d27a2097254572acdf 100644 (file)
@@ -1522,15 +1522,15 @@ obj_mach_o_process_stab (int what, const char *string,
   switch (what)
     {
       case 'd':
-       symbolP = symbol_new ("", now_seg, frag_now_fix (), frag_now);
+       symbolP = symbol_new ("", now_seg, frag_now, frag_now_fix ());
        /* Special stabd NULL name indicator.  */
        S_SET_NAME (symbolP, NULL);
        break;
 
       case 'n':
       case 's':
-       symbolP = symbol_new (string, undefined_section, (valueT) 0,
-                             &zero_address_frag);
+       symbolP = symbol_new (string, undefined_section,
+                             &zero_address_frag, 0);
        pseudo_set (symbolP);
        break;
 
index 301b499a7446babc609588718f558ababdf539e7..c7cae1abfec7ca86ddc3f196721b29ffea429777 100644 (file)
@@ -1535,7 +1535,7 @@ make_mapping_symbol (enum mstate state, valueT value, fragS * frag)
       abort ();
     }
 
-  symbolP = symbol_new (symname, now_seg, value, frag);
+  symbolP = symbol_new (symname, now_seg, frag, value);
   symbol_get_bfdsym (symbolP)->flags |= type | BSF_LOCAL;
 
   /* Save the mapping symbols for future reference.  Also check that
@@ -1742,7 +1742,7 @@ find_or_make_literal_pool (int size)
   if (pool->symbol == NULL)
     {
       pool->symbol = symbol_create (FAKE_LABEL_NAME, undefined_section,
-                                   (valueT) 0, &zero_address_frag);
+                                   &zero_address_frag, 0);
       pool->id = latest_pool_num++;
     }
 
@@ -7562,7 +7562,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
            as_bad (_("GOT already in the symbol table"));
 
          GOT_symbol = symbol_new (name, undefined_section,
-                                  (valueT) 0, &zero_address_frag);
+                                  &zero_address_frag, 0);
        }
 
       return GOT_symbol;
index d844fcf2cd7ca25f969f377dcf2db13adbf06177..481073496ae19b6757adb4e99900728b6a620e6c 100644 (file)
@@ -3403,8 +3403,7 @@ add_to_link_pool (symbolS *sym, offsetT addend)
 
   /* Not found, add a new entry.  */
   subseg_set (alpha_link_section, 0);
-  linksym = symbol_new
-    (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
+  linksym = symbol_new (FAKE_LABEL_NAME, now_seg, frag_now, frag_now_fix ());
   p = frag_more (8);
   memset (p, 0, 8);
 
@@ -3903,8 +3902,8 @@ s_alpha_prologue (int ignore ATTRIBUTE_UNUSED)
 
   arg = get_absolute_expression ();
   demand_empty_rest_of_line ();
-  alpha_prologue_label = symbol_new
-    (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
+  alpha_prologue_label = symbol_new (FAKE_LABEL_NAME, now_seg, frag_now,
+                                    frag_now_fix ());
 
   if (ECOFF_DEBUGGING)
     sym = ecoff_get_cur_proc_sym ();
@@ -4055,8 +4054,8 @@ alpha_elf_md_end (void)
        /* Create a temporary symbol at the same location as our
           function symbol.  This prevents problems with globals.  */
        cfi_new_fde (symbol_temp_new (S_GET_SEGMENT (p->func_sym),
-                                     S_GET_VALUE (p->func_sym),
-                                     symbol_get_frag (p->func_sym)));
+                                     symbol_get_frag (p->func_sym),
+                                     S_GET_VALUE (p->func_sym)));
 
        cfi_set_sections ();
        cfi_set_return_column (p->ra_regno);
@@ -4469,8 +4468,8 @@ static void
 s_alpha_prologue (int ignore ATTRIBUTE_UNUSED)
 {
   demand_empty_rest_of_line ();
-  alpha_prologue_label = symbol_new
-    (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
+  alpha_prologue_label = symbol_new (FAKE_LABEL_NAME, now_seg, frag_now,
+                                    frag_now_fix ());
 }
 
 /* Parse .pdesc <entry_name>,{null|stack|reg}
@@ -4705,8 +4704,8 @@ s_alpha_linkage (int ignore ATTRIBUTE_UNUSED)
         BFD_RELOC_ALPHA_LINKAGE);
 
       if (alpha_insn_label == NULL)
-       alpha_insn_label = symbol_new
-         (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now);
+       alpha_insn_label = symbol_new (FAKE_LABEL_NAME, now_seg, frag_now,
+                                      frag_now_fix ());
 
       /* Create a linkage element.  */
       linkage_fixup = XNEW (struct alpha_linkage_fixups);
@@ -5470,8 +5469,8 @@ md_begin (void)
       char name[4];
 
       sprintf (name, "$%d", i);
-      alpha_register_table[i] = symbol_create (name, reg_section, i,
-                                              &zero_address_frag);
+      alpha_register_table[i] = symbol_create (name, reg_section,
+                                              &zero_address_frag, i);
     }
 
   for (; i < 64; ++i)
@@ -5479,8 +5478,8 @@ md_begin (void)
       char name[5];
 
       sprintf (name, "$f%d", i - 32);
-      alpha_register_table[i] = symbol_create (name, reg_section, i,
-                                              &zero_address_frag);
+      alpha_register_table[i] = symbol_create (name, reg_section,
+                                              &zero_address_frag, i);
     }
 
   /* Create the special symbols and sections we'll be using.  */
@@ -5493,8 +5492,8 @@ md_begin (void)
 
   /* For handling the GP, create a symbol that won't be output in the
      symbol table.  We'll edit it out of relocs later.  */
-  alpha_gp_symbol = symbol_create ("<GP value>", alpha_lita_section, 0x8000,
-                                  &zero_address_frag);
+  alpha_gp_symbol = symbol_create ("<GP value>", alpha_lita_section,
+                                  &zero_address_frag, 0x8000);
 #endif
 
 #ifdef OBJ_EVAX
index 5fa0ccb1fe0eb59bdd9e26caa6e17c07e1b151fb..0232b3db9538929944a9af02f8d32227d936ae6c 100644 (file)
@@ -2550,7 +2550,7 @@ static void
 declare_register (const char *name, int number)
 {
   symbolS *regS = symbol_create (name, reg_section,
-                                number, &zero_address_frag);
+                                &zero_address_frag, number);
 
   str_hash_insert (arc_reg_hash, S_GET_NAME (regS), (void *) regS);
 }
@@ -2581,7 +2581,7 @@ static void
 declare_addrtype (const char *name, int number)
 {
   symbolS *addrtypeS = symbol_create (name, undefined_section,
-                                      number, &zero_address_frag);
+                                     &zero_address_frag, number);
 
   str_hash_insert (arc_addrtype_hash, S_GET_NAME (addrtypeS),
                   (void *) addrtypeS);
@@ -3350,7 +3350,7 @@ md_undefined_symbol (char *name)
            as_bad ("GOT already in symbol table");
 
          GOT_symbol = symbol_new (GLOBAL_OFFSET_TABLE_NAME, undefined_section,
-                                  (valueT) 0, &zero_address_frag);
+                                  &zero_address_frag, 0);
        };
       return GOT_symbol;
     }
index 3b17e20d4d397fe3085bd7aa9ff5a318a9fa3f15..ce2dd0e1c289700136d17561250278d22ba02186 100644 (file)
@@ -2971,7 +2971,7 @@ make_mapping_symbol (enum mstate state, valueT value, fragS *frag)
       abort ();
     }
 
-  symbolP = symbol_new (symname, now_seg, value, frag);
+  symbolP = symbol_new (symname, now_seg, frag, value);
   symbol_get_bfdsym (symbolP)->flags |= type | BSF_LOCAL;
 
   switch (state)
@@ -3310,12 +3310,12 @@ s_thumb_set (int equiv)
          memset (dummy_frag, 0, sizeof (fragS));
          dummy_frag->fr_type = rs_fill;
          dummy_frag->line = listing_tail;
-         symbolP = symbol_new (name, undefined_section, 0, dummy_frag);
+         symbolP = symbol_new (name, undefined_section, dummy_frag, 0);
          dummy_frag->fr_symbol = symbolP;
        }
       else
 #endif
-       symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+       symbolP = symbol_new (name, undefined_section, &zero_address_frag, 0);
 
 #ifdef OBJ_COFF
       /* "set" symbols are local unless otherwise specified.  */
@@ -3543,7 +3543,7 @@ find_or_make_literal_pool (void)
   if (pool->symbol == NULL)
     {
       pool->symbol = symbol_create (FAKE_LABEL_NAME, undefined_section,
-                                   (valueT) 0, &zero_address_frag);
+                                   &zero_address_frag, 0);
       pool->id = latest_pool_num ++;
     }
 
@@ -28025,7 +28025,7 @@ md_undefined_symbol (char * name ATTRIBUTE_UNUSED)
            as_bad (_("GOT already in the symbol table"));
 
          GOT_symbol = symbol_new (name, undefined_section,
-                                  (valueT) 0, & zero_address_frag);
+                                  &zero_address_frag, 0);
        }
 
       return GOT_symbol;
index ae0672775a586ac600bf2bb5b60312ae787854bb..157eb9ba4ca93d3a6f5180e4c1d8e3516949e8fd 100644 (file)
@@ -780,7 +780,7 @@ avr_undefined_symbol (char *name)
          char xname[30];
          sprintf (xname, "%s.%03u", name, (++suffix) % 1000);
          avr_isr.sym_n_pushed = symbol_new (xname, undefined_section,
-                                            (valueT) 0, &zero_address_frag);
+                                            &zero_address_frag, (valueT) 0);
        }
       return avr_isr.sym_n_pushed;
     }
index c95d724bbbaca7d84fa02d5ad6fed5ff745f4e28..e5db874078c02c63f8be55c193f7c0adf974bbc9 100644 (file)
@@ -689,16 +689,16 @@ md_undefined_symbol (char *name)
 {
   if (*name == '_' && *(name + 1) == 'G'
       && strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
-   {
-     if (!GOT_symbol)
-       {
-         if (symbol_find (name))
-             as_bad (_("GOT already in symbol table"));
-          GOT_symbol = symbol_new (name, undefined_section,
-                                   (valueT) 0, &zero_address_frag);
-       }
-     return GOT_symbol;
-   }
+    {
+      if (!GOT_symbol)
+       {
+         if (symbol_find (name))
+           as_bad (_("GOT already in symbol table"));
+         GOT_symbol = symbol_new (name, undefined_section,
+                                  &zero_address_frag, 0);
+       }
+      return GOT_symbol;
+    }
   return 0;
 }
 
index ea8890f488bda47153bb93bb7b336db1cbeb8996..1231084feed75aa62216f98a626d34ec78725004 100644 (file)
@@ -1196,19 +1196,19 @@ md_begin (void)
   /* Enable use of ".if ..asm.arch.cris.v32"
      and ".if ..asm.arch.cris.common_v10_v32" and a few others.  */
   symbol_table_insert (symbol_new ("..asm.arch.cris.v32", absolute_section,
-                                  (cris_arch == arch_crisv32),
-                                  &zero_address_frag));
+                                  &zero_address_frag,
+                                  cris_arch == arch_crisv32));
   symbol_table_insert (symbol_new ("..asm.arch.cris.v10", absolute_section,
-                                  (cris_arch == arch_crisv10),
-                                  &zero_address_frag));
+                                  &zero_address_frag,
+                                  cris_arch == arch_crisv10));
   symbol_table_insert (symbol_new ("..asm.arch.cris.common_v10_v32",
                                   absolute_section,
-                                  (cris_arch == arch_cris_common_v10_v32),
-                                  &zero_address_frag));
+                                  &zero_address_frag,
+                                  cris_arch == arch_cris_common_v10_v32));
   symbol_table_insert (symbol_new ("..asm.arch.cris.any_v0_v10",
                                   absolute_section,
-                                  (cris_arch == arch_cris_any_v0_v10),
-                                  &zero_address_frag));
+                                  &zero_address_frag,
+                                  cris_arch == arch_cris_any_v0_v10));
 
   while (cris_opcodes[i].name != NULL)
     {
index 49a52d442a056ab773ad44ef0e9d76a80aee35d1..ec1ea944a0fb4d0fe907b8a0c37f0475a58aa97b 100644 (file)
@@ -1399,7 +1399,7 @@ make_mapping_symbol (map_state state, valueT value, fragS *frag)
       abort ();
     }
 
-  symbolP = symbol_new (symname, now_seg, value, frag);
+  symbolP = symbol_new (symname, now_seg, frag, value);
   symbol_get_bfdsym (symbolP)->flags |= type | BSF_LOCAL;
 }
 
index f08f44228728cbb64be383584f9ecf78d5e6be2f..51e7065ba71f8710e5ab1f8b18edacee2360ac82 100644 (file)
@@ -92,14 +92,14 @@ insert_sreg (const char *regname, int regnum)
   char buf[80];
   int i;
 
-  symbol_table_insert (symbol_new (regname, reg_section, (valueT) regnum,
-                                  &zero_address_frag));
+  symbol_table_insert (symbol_new (regname, reg_section,
+                                  &zero_address_frag, regnum));
   for (i = 0; regname[i]; i++)
     buf[i] = ISLOWER (regname[i]) ? TOUPPER (regname[i]) : regname[i];
   buf[i] = '\0';
 
-  symbol_table_insert (symbol_new (buf, reg_section, (valueT) regnum,
-                                  &zero_address_frag));
+  symbol_table_insert (symbol_new (buf, reg_section,
+                                  &zero_address_frag, regnum));
 }
 
 /* Install symbol definitions for assorted special registers.
index 272605b26f8b4697961ab26ffed33091e6092239..1feebc822c512868fc97896dfac7b6dbfd67de6d 100644 (file)
@@ -5989,8 +5989,8 @@ pa_build_unwind_subspace (struct call_info *call_info)
   else
     {
       symbolP = symbol_new (name, now_seg,
-                           S_GET_VALUE (call_info->start_symbol),
-                           symbol_get_frag (call_info->start_symbol));
+                           symbol_get_frag (call_info->start_symbol),
+                           S_GET_VALUE (call_info->start_symbol));
       gas_assert (symbolP);
       S_CLEAR_EXTERNAL (symbolP);
       symbol_table_insert (symbolP);
@@ -6439,8 +6439,7 @@ hppa_elf_mark_end_of_function (void)
     {
       /* symbol value should be the offset of the
         last instruction of the function */
-      symbolP = symbol_new (name, now_seg, (valueT) (frag_now_fix () - 4),
-                           frag_now);
+      symbolP = symbol_new (name, now_seg, frag_now, frag_now_fix () - 4);
 
       gas_assert (symbolP);
       S_CLEAR_EXTERNAL (symbolP);
index 752a98b4ef1e33e7c9adfc285c3e9f1fa0fb54e9..43eb3659bad7670290b3718d3e48fad8cf27c2bf 100644 (file)
@@ -13798,7 +13798,7 @@ md_undefined_symbol (char *name)
          if (symbol_find (name))
            as_bad (_("GOT already in symbol table"));
          GOT_symbol = symbol_new (name, undefined_section,
-                                  (valueT) 0, &zero_address_frag);
+                                  &zero_address_frag, 0);
        };
       return GOT_symbol;
     }
index 1686579b1b5037a561bf16f084166f3960398b20..ed4636bbbd3d58e3a3c31a918f5ba4971aafd5b8 100644 (file)
@@ -4435,9 +4435,10 @@ dot_endp (int dummy ATTRIBUTE_UNUSED)
       e.X_add_number = 0;
       if (!S_IS_LOCAL (unwind.proc_pending.sym)
          && S_IS_DEFINED (unwind.proc_pending.sym))
-       e.X_add_symbol = symbol_temp_new (S_GET_SEGMENT (unwind.proc_pending.sym),
-                                         S_GET_VALUE (unwind.proc_pending.sym),
-                                         symbol_get_frag (unwind.proc_pending.sym));
+       e.X_add_symbol
+         = symbol_temp_new (S_GET_SEGMENT (unwind.proc_pending.sym),
+                            symbol_get_frag (unwind.proc_pending.sym),
+                            S_GET_VALUE (unwind.proc_pending.sym));
       else
        e.X_add_symbol = unwind.proc_pending.sym;
       ia64_cons_fix_new (frag_now, where, bytes_per_address, &e,
@@ -4487,7 +4488,7 @@ dot_endp (int dummy ATTRIBUTE_UNUSED)
                      symbol_get_obj (sym)->size->X_op = O_subtract;
                      symbol_get_obj (sym)->size->X_add_symbol
                        = symbol_new (FAKE_LABEL_NAME, now_seg,
-                                     frag_now_fix (), frag_now);
+                                     frag_now, frag_now_fix ());
                      symbol_get_obj (sym)->size->X_op_symbol = sym;
                      symbol_get_obj (sym)->size->X_add_number = 0;
                    }
@@ -5371,7 +5372,7 @@ declare_register (const char *name, unsigned int regnum)
 {
   symbolS *sym;
 
-  sym = symbol_create (name, reg_section, regnum, &zero_address_frag);
+  sym = symbol_create (name, reg_section, &zero_address_frag, regnum);
 
   str_hash_insert (md.reg_hash, S_GET_NAME (sym), (void *) sym);
 
@@ -7244,77 +7245,77 @@ md_begin (void)
   secalias_name_hash = str_htab_create ();
 
   pseudo_func[FUNC_DTP_MODULE].u.sym =
-    symbol_new (".<dtpmod>", undefined_section, FUNC_DTP_MODULE,
-               &zero_address_frag);
+    symbol_new (".<dtpmod>", undefined_section,
+               &zero_address_frag, FUNC_DTP_MODULE);
 
   pseudo_func[FUNC_DTP_RELATIVE].u.sym =
-    symbol_new (".<dtprel>", undefined_section, FUNC_DTP_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<dtprel>", undefined_section,
+               &zero_address_frag, FUNC_DTP_RELATIVE);
 
   pseudo_func[FUNC_FPTR_RELATIVE].u.sym =
-    symbol_new (".<fptr>", undefined_section, FUNC_FPTR_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<fptr>", undefined_section,
+               &zero_address_frag, FUNC_FPTR_RELATIVE);
 
   pseudo_func[FUNC_GP_RELATIVE].u.sym =
-    symbol_new (".<gprel>", undefined_section, FUNC_GP_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<gprel>", undefined_section,
+               &zero_address_frag, FUNC_GP_RELATIVE);
 
   pseudo_func[FUNC_LT_RELATIVE].u.sym =
-    symbol_new (".<ltoff>", undefined_section, FUNC_LT_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<ltoff>", undefined_section,
+               &zero_address_frag, FUNC_LT_RELATIVE);
 
   pseudo_func[FUNC_LT_RELATIVE_X].u.sym =
-    symbol_new (".<ltoffx>", undefined_section, FUNC_LT_RELATIVE_X,
-               &zero_address_frag);
+    symbol_new (".<ltoffx>", undefined_section,
+               &zero_address_frag, FUNC_LT_RELATIVE_X);
 
   pseudo_func[FUNC_PC_RELATIVE].u.sym =
-    symbol_new (".<pcrel>", undefined_section, FUNC_PC_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<pcrel>", undefined_section,
+               &zero_address_frag, FUNC_PC_RELATIVE);
 
   pseudo_func[FUNC_PLT_RELATIVE].u.sym =
-    symbol_new (".<pltoff>", undefined_section, FUNC_PLT_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<pltoff>", undefined_section,
+               &zero_address_frag, FUNC_PLT_RELATIVE);
 
   pseudo_func[FUNC_SEC_RELATIVE].u.sym =
-    symbol_new (".<secrel>", undefined_section, FUNC_SEC_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<secrel>", undefined_section,
+               &zero_address_frag, FUNC_SEC_RELATIVE);
 
   pseudo_func[FUNC_SEG_RELATIVE].u.sym =
-    symbol_new (".<segrel>", undefined_section, FUNC_SEG_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<segrel>", undefined_section,
+               &zero_address_frag, FUNC_SEG_RELATIVE);
 
   pseudo_func[FUNC_TP_RELATIVE].u.sym =
-    symbol_new (".<tprel>", undefined_section, FUNC_TP_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<tprel>", undefined_section,
+               &zero_address_frag, FUNC_TP_RELATIVE);
 
   pseudo_func[FUNC_LTV_RELATIVE].u.sym =
-    symbol_new (".<ltv>", undefined_section, FUNC_LTV_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<ltv>", undefined_section,
+               &zero_address_frag, FUNC_LTV_RELATIVE);
 
   pseudo_func[FUNC_LT_FPTR_RELATIVE].u.sym =
-    symbol_new (".<ltoff.fptr>", undefined_section, FUNC_LT_FPTR_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<ltoff.fptr>", undefined_section,
+               &zero_address_frag, FUNC_LT_FPTR_RELATIVE);
 
   pseudo_func[FUNC_LT_DTP_MODULE].u.sym =
-    symbol_new (".<ltoff.dtpmod>", undefined_section, FUNC_LT_DTP_MODULE,
-               &zero_address_frag);
+    symbol_new (".<ltoff.dtpmod>", undefined_section,
+               &zero_address_frag, FUNC_LT_DTP_MODULE);
 
   pseudo_func[FUNC_LT_DTP_RELATIVE].u.sym =
-    symbol_new (".<ltoff.dptrel>", undefined_section, FUNC_LT_DTP_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<ltoff.dptrel>", undefined_section,
+               &zero_address_frag, FUNC_LT_DTP_RELATIVE);
 
   pseudo_func[FUNC_LT_TP_RELATIVE].u.sym =
-    symbol_new (".<ltoff.tprel>", undefined_section, FUNC_LT_TP_RELATIVE,
-               &zero_address_frag);
+    symbol_new (".<ltoff.tprel>", undefined_section,
+               &zero_address_frag, FUNC_LT_TP_RELATIVE);
 
   pseudo_func[FUNC_IPLT_RELOC].u.sym =
-    symbol_new (".<iplt>", undefined_section, FUNC_IPLT_RELOC,
-               &zero_address_frag);
+    symbol_new (".<iplt>", undefined_section,
+               &zero_address_frag, FUNC_IPLT_RELOC);
 
 #ifdef TE_VMS
   pseudo_func[FUNC_SLOTCOUNT_RELOC].u.sym =
-    symbol_new (".<slotcount>", undefined_section, FUNC_SLOTCOUNT_RELOC,
-               &zero_address_frag);
+    symbol_new (".<slotcount>", undefined_section,
+               &zero_address_frag, FUNC_SLOTCOUNT_RELOC);
 #endif
 
  if (md.tune != itanium1)
@@ -11964,7 +11965,7 @@ ia64_vms_note (void)
   /* This symbol should be passed on the command line and be variable
      according to language.  */
   sym = symbol_new ("__gnat_vms_display_name@gnat_demangler_rtl",
-                   absolute_section, 0, &zero_address_frag);
+                   absolute_section, &zero_address_frag, 0);
   symbol_table_insert (sym);
   symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING | BSF_DYNAMIC;
 
index 824f67c124b2247d223852445608dd5aacb88994..18bd667ebd6a647ce0665ed61101d077c7707495 100644 (file)
@@ -574,7 +574,7 @@ debug_sym (int ignore ATTRIBUTE_UNUSED)
 
   if ((symbolP = symbol_find (name)) == NULL
       && (symbolP = md_undefined_symbol (name)) == NULL)
-    symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+    symbolP = symbol_new (name, undefined_section, &zero_address_frag, 0);
 
   symbol_table_insert (symbolP);
   if (S_IS_DEFINED (symbolP) && (S_GET_SEGMENT (symbolP) != reg_section
index 6542d273997fec609c891741cd62aae69253f882..241665224b84dfc4ef72d260fffa70f0e0b74792 100644 (file)
@@ -3959,15 +3959,15 @@ insert_reg (const char *regname, int regnum)
     }
 #endif
 
-  symbol_table_insert (symbol_new (regname, reg_section, regnum,
-                                  &zero_address_frag));
+  symbol_table_insert (symbol_new (regname, reg_section,
+                                  &zero_address_frag, regnum));
 
   for (i = 0; regname[i]; i++)
     buf[i] = TOUPPER (regname[i]);
   buf[i] = '\0';
 
-  symbol_table_insert (symbol_new (buf, reg_section, regnum,
-                                  &zero_address_frag));
+  symbol_table_insert (symbol_new (buf, reg_section,
+                                  &zero_address_frag, regnum));
 }
 
 struct init_entry
index f521d48a43fadf032f38e4583759875b12988981..ebcc633dd81aaf0cc573570c8d252718e0b0f6d5 100644 (file)
@@ -3789,18 +3789,18 @@ md_begin (void)
      helps us detect invalid uses of them.  */
   for (i = 0; reg_names[i].name; i++)
     symbol_table_insert (symbol_new (reg_names[i].name, reg_section,
-                                    reg_names[i].num, /* & RNUM_MASK, */
-                                    &zero_address_frag));
+                                    &zero_address_frag,
+                                    reg_names[i].num));
   if (HAVE_NEWABI)
     for (i = 0; reg_names_n32n64[i].name; i++)
       symbol_table_insert (symbol_new (reg_names_n32n64[i].name, reg_section,
-                                      reg_names_n32n64[i].num, /* & RNUM_MASK, */
-                                      &zero_address_frag));
+                                      &zero_address_frag,
+                                      reg_names_n32n64[i].num));
   else
     for (i = 0; reg_names_o32[i].name; i++)
       symbol_table_insert (symbol_new (reg_names_o32[i].name, reg_section,
-                                      reg_names_o32[i].num, /* & RNUM_MASK, */
-                                      &zero_address_frag));
+                                      &zero_address_frag,
+                                      reg_names_o32[i].num));
 
   for (i = 0; i < 32; i++)
     {
@@ -3809,17 +3809,17 @@ md_begin (void)
       /* R5900 VU0 floating-point register.  */
       sprintf (regname, "$vf%d", i);
       symbol_table_insert (symbol_new (regname, reg_section,
-                                      RTYPE_VF | i, &zero_address_frag));
+                                      &zero_address_frag, RTYPE_VF | i));
 
       /* R5900 VU0 integer register.  */
       sprintf (regname, "$vi%d", i);
       symbol_table_insert (symbol_new (regname, reg_section,
-                                      RTYPE_VI | i, &zero_address_frag));
+                                      &zero_address_frag, RTYPE_VI | i));
 
       /* MSA register.  */
       sprintf (regname, "$w%d", i);
       symbol_table_insert (symbol_new (regname, reg_section,
-                                      RTYPE_MSA | i, &zero_address_frag));
+                                      &zero_address_frag, RTYPE_MSA | i));
     }
 
   obstack_init (&mips_operand_tokens);
@@ -18876,7 +18876,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
            }
 
          /* Make a label at the end for use with the branch.  */
-         l = symbol_new (micromips_label_name (), asec, fragp->fr_fix, fragp);
+         l = symbol_new (micromips_label_name (), asec, fragp, fragp->fr_fix);
          micromips_label_inc ();
          S_SET_OTHER (l, ELF_ST_SET_MICROMIPS (S_GET_OTHER (l)));
 
index fb1f3d279200b4a3f54a609439f8154d3840884e..82a69f1674699e59d617a3eb132e0da788c163a2 100644 (file)
@@ -785,8 +785,8 @@ mmix_md_begin (void)
       /* Alternatively, we could diddle with '$' and the following number,
         but keeping the registers as symbols helps keep parsing simple.  */
       sprintf (buf, "$%d", i);
-      symbol_table_insert (symbol_new (buf, reg_section, i,
-                                      &zero_address_frag));
+      symbol_table_insert (symbol_new (buf, reg_section,
+                                      &zero_address_frag, i));
     }
 
   /* Insert mmixal built-in names if allowed.  */
@@ -795,21 +795,21 @@ mmix_md_begin (void)
       for (i = 0; mmix_spec_regs[i].name != NULL; i++)
        symbol_table_insert (symbol_new (mmix_spec_regs[i].name,
                                         reg_section,
-                                        mmix_spec_regs[i].number + 256,
-                                        &zero_address_frag));
+                                        &zero_address_frag,
+                                        mmix_spec_regs[i].number + 256));
 
       /* FIXME: Perhaps these should be recognized as specials; as field
         names for those instructions.  */
-      symbol_table_insert (symbol_new ("ROUND_CURRENT", reg_section, 512,
-                                      &zero_address_frag));
-      symbol_table_insert (symbol_new ("ROUND_OFF", reg_section, 512 + 1,
-                                      &zero_address_frag));
-      symbol_table_insert (symbol_new ("ROUND_UP", reg_section, 512 + 2,
-                                      &zero_address_frag));
-      symbol_table_insert (symbol_new ("ROUND_DOWN", reg_section, 512 + 3,
-                                      &zero_address_frag));
-      symbol_table_insert (symbol_new ("ROUND_NEAR", reg_section, 512 + 4,
-                                      &zero_address_frag));
+      symbol_table_insert (symbol_new ("ROUND_CURRENT", reg_section,
+                                      &zero_address_frag, 512));
+      symbol_table_insert (symbol_new ("ROUND_OFF", reg_section,
+                                      &zero_address_frag, 512 + 1));
+      symbol_table_insert (symbol_new ("ROUND_UP", reg_section,
+                                      &zero_address_frag, 512 + 2));
+      symbol_table_insert (symbol_new ("ROUND_DOWN", reg_section,
+                                      &zero_address_frag, 512 + 3));
+      symbol_table_insert (symbol_new ("ROUND_NEAR", reg_section,
+                                      &zero_address_frag, 512 + 4));
     }
 }
 
@@ -3520,8 +3520,8 @@ mmix_md_end (void)
       sprintf (locsymbol, ":%s%s", MMIX_LOC_SECTION_START_SYMBOL_PREFIX,
               ".text");
       symbolP
-       = symbol_new (locsymbol, absolute_section, lowest_text_loc,
-                     &zero_address_frag);
+       = symbol_new (locsymbol, absolute_section, &zero_address_frag,
+                     lowest_text_loc);
       S_SET_EXTERNAL (symbolP);
     }
 
@@ -3536,8 +3536,8 @@ mmix_md_end (void)
       sprintf (locsymbol, ":%s%s", MMIX_LOC_SECTION_START_SYMBOL_PREFIX,
               ".data");
       symbolP
-       = symbol_new (locsymbol, absolute_section, lowest_data_loc,
-                     &zero_address_frag);
+       = symbol_new (locsymbol, absolute_section, &zero_address_frag,
+                     lowest_data_loc);
       S_SET_EXTERNAL (symbolP);
     }
 
@@ -3845,9 +3845,8 @@ mmix_parse_predefined_name (char *name, expressionS *expP)
         script.  */
       symp = symbol_find (name);
       if (symp == NULL)
-       symp = symbol_new (name, text_section,
-                          0x10 * (handler_charp + 1 - handler_chars),
-                          &zero_address_frag);
+       symp = symbol_new (name, text_section, &zero_address_frag,
+                          0x10 * (handler_charp + 1 - handler_chars));
     }
   else
     {
@@ -3906,8 +3905,8 @@ mmix_parse_predefined_name (char *name, expressionS *expP)
          {
            symbol_table_insert (symbol_new (predefined_abs_syms[i].name,
                                             absolute_section,
-                                            predefined_abs_syms[i].val,
-                                            &zero_address_frag));
+                                            &zero_address_frag,
+                                            predefined_abs_syms[i].val));
 
            /* Let gas find the symbol we just created, through its
                ordinary lookup.  */
index 6ce1c59e103a198e69d5f34560b813f47596761e..19cfc398b7d2e51547cc02844552dde06fc221aa 100644 (file)
@@ -382,7 +382,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 1, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
@@ -439,7 +439,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 1, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
@@ -528,7 +528,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 2, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
@@ -609,7 +609,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 2, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
index bcd76cc5444d8ba3533fadc2660bedf9f523a3ca..ae5ad9de4d4c159cbd81a6b1939868527360d73d 100644 (file)
@@ -520,7 +520,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 1, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset + 1, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
@@ -577,7 +577,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 1, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset + 1, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
@@ -623,7 +623,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 2, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset + 2, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
@@ -659,7 +659,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 2, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset + 2, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
@@ -813,7 +813,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 2, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset + 2, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
@@ -882,7 +882,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
       /* Create a fixup for the reversed conditional branch.  */
       sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 2, 1,
-              symbol_new (buf, sec, 0, fragP->fr_next),
+              symbol_new (buf, sec, fragP->fr_next, 0),
               fragP->fr_offset + 2, 1, BFD_RELOC_8_PCREL);
 
       /* Now create the unconditional branch + fixup to the
index cda673fcc8838d0fb078b0acea33ebd4c4d86fe5..900f71569e9a7d78e2a22179bcb3edfd81cbbfb0 100644 (file)
@@ -4002,7 +4002,7 @@ make_mapping_symbol (enum mstate state, valueT value, fragS * frag, unsigned int
       abort ();
     }
 
-  symbol_p = symbol_new (symbol_name, now_seg, value, frag);
+  symbol_p = symbol_new (symbol_name, now_seg, frag, value);
   /* local scope attribute  */
   symbol_get_bfdsym (symbol_p)->flags |= BSF_NO_FLAGS | BSF_LOCAL;
 }
@@ -6088,8 +6088,9 @@ nds32_elf_append_relax_relocs (const char *key, void *value)
                    {
                      ptr_offset =
                        pattern_temp->where - pattern_temp->frag->fr_literal;
-                     exp.X_add_symbol = symbol_temp_new (now_seg, ptr_offset,
-                                                         pattern_temp->frag);
+                     exp.X_add_symbol = symbol_temp_new (now_seg,
+                                                         pattern_temp->frag,
+                                                         ptr_offset);
                      exp.X_add_number = 0;
                      fixP =
                        fix_new_exp (fragP, where - fragP->fr_literal,
@@ -6186,8 +6187,9 @@ nds32_elf_append_relax_relocs (const char *key, void *value)
                    {
                      ptr_offset = next_pattern->where
                        - next_pattern->frag->fr_literal;
-                     exp.X_add_symbol = symbol_temp_new (now_seg, ptr_offset,
-                                                         next_pattern->frag);
+                     exp.X_add_symbol = symbol_temp_new (now_seg,
+                                                         next_pattern->frag,
+                                                         ptr_offset);
                      exp.X_add_number = 0;
                      fixP = fix_new_exp (fragP, where - fragP->fr_literal,
                                          fixup_size, &exp, 0,
@@ -6218,8 +6220,8 @@ nds32_elf_append_relax_relocs (const char *key, void *value)
                              ptr_offset = next_insn->where
                                - next_insn->frag->fr_literal;
                              exp.X_add_symbol = symbol_temp_new (now_seg,
-                                                                 ptr_offset,
-                                                                 next_insn->frag);
+                                                                 next_insn->frag,
+                                                                 ptr_offset);
                              exp.X_add_number = 0;
                              fixP = fix_new_exp (fragP,
                                                  where - fragP->fr_literal,
@@ -7191,14 +7193,14 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragP)
          if ((fixup_info[i].ramp & NDS32_CREATE_LABEL) != 0)
            {
              /* This is a reverse branch.  */
-             exp.X_add_symbol = symbol_temp_new (sec, 0, fragP->fr_next);
+             exp.X_add_symbol = symbol_temp_new (sec, fragP->fr_next, 0);
              exp.X_add_number = 0;
            }
          else if ((fixup_info[i].ramp & NDS32_PTR) != 0)
            {
              /* This relocation has to point to another instruction.  */
              branch_size = fr_where + code_size - 4;
-             exp.X_add_symbol = symbol_temp_new (sec, branch_size, fragP);
+             exp.X_add_symbol = symbol_temp_new (sec, fragP, branch_size);
              exp.X_add_number = 0;
            }
          else if ((fixup_info[i].ramp & NDS32_ABS) != 0)
index eb7a1a585b4b65829b02ee34f53af461fc3258b5..a8bbe5bf1b626357d8e6c3fdc5b587e9e253495e 100644 (file)
@@ -3907,7 +3907,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
            as_bad ("GOT already in the symbol table");
 
          GOT_symbol = symbol_new (name, undefined_section,
-                                  (valueT) 0, &zero_address_frag);
+                                  &zero_address_frag, 0);
        }
 
       return GOT_symbol;
index 9149e71e6195695536d9713f4305a83965534439..052f64a7cb78ab94c7e5fce6e8b622046bc7706f 100644 (file)
@@ -4902,8 +4902,9 @@ ppc_function (int ignore ATTRIBUTE_UNUSED)
            {
              /* The fifth argument is the function size.  */
              ++input_line_pointer;
-             symbol_get_tc (ext_sym)->u.size = symbol_new
-                ("L0\001", absolute_section,(valueT) 0, &zero_address_frag);
+             symbol_get_tc (ext_sym)->u.size
+               = symbol_new ("L0\001", absolute_section,
+                             &zero_address_frag, 0);
              pseudo_set (symbol_get_tc (ext_sym)->u.size);
            }
        }
@@ -5877,7 +5878,7 @@ ppc_adjust_symtab (void)
        continue;
 
       csect = symbol_create (".abs[XO]", absolute_section,
-                            S_GET_VALUE (sym), &zero_address_frag);
+                            &zero_address_frag, S_GET_VALUE (sym));
       symbol_get_bfdsym (csect)->value = S_GET_VALUE (sym);
       S_SET_STORAGE_CLASS (csect, C_HIDEXT);
       i = S_GET_NUMBER_AUXILIARY (csect);
index c575c0753ffc42f22246f493a9fe7d1a40948d12..82b681ef58951a3edb28a1af18f5210d0ab60e42 100644 (file)
@@ -1266,8 +1266,8 @@ check_absolute_expr (struct riscv_cl_insn *ip, expressionS *ex,
 static symbolS *
 make_internal_label (void)
 {
-  return (symbolS *) local_symbol_make (FAKE_LABEL_NAME, now_seg,
-                                       (valueT) frag_now_fix (), frag_now);
+  return (symbolS *) local_symbol_make (FAKE_LABEL_NAME, now_seg, frag_now,
+                                       frag_now_fix ());
 }
 
 /* Load an entry from the GOT.  */
index 7e84212b226eb2756c025f813c0b470b09133a63..f66e90e2446c2d59e05bac4b3457fedb7ceb4df8 100644 (file)
@@ -2105,7 +2105,7 @@ md_undefined_symbol (char *name)
          if (symbol_find (name))
            as_bad (_("GOT already in symbol table"));
          GOT_symbol = symbol_new (name, undefined_section,
-                                  (valueT) 0, &zero_address_frag);
+                                  &zero_address_frag, 0);
        }
       return GOT_symbol;
     }
index e9274101aae9a479d3ebefa9910928bac6e7feea..db5a7b9e145557101aeedc0d5eeae9a0db603129 100644 (file)
@@ -1920,7 +1920,7 @@ insert_loop_bounds (char *output, sh_operand_info *operand)
       /* A REPEAT takes 6 bytes.  The SH has a 32 bit address space.
         Hence a 9 digit number should be enough to count all REPEATs.  */
       sprintf (name, "_R%x", count++ & 0x3fffffff);
-      end_sym = symbol_new (name, undefined_section, 0, &zero_address_frag);
+      end_sym = symbol_new (name, undefined_section, &zero_address_frag, 0);
       /* Make this a local symbol.  */
 #ifdef OBJ_COFF
       SF_SET_LOCAL (end_sym);
index 5a2673dbf6825d2a6c7d247e1e6a752c650a250c..a6db99091d5beb2d4a7a639c76c71adf5eb65af8 100644 (file)
@@ -621,14 +621,14 @@ tic4x_insert_reg (const char *regname, int regnum)
   char buf[32];
   int i;
 
-  symbol_table_insert (symbol_new (regname, reg_section, (valueT) regnum,
-                                  &zero_address_frag));
+  symbol_table_insert (symbol_new (regname, reg_section,
+                                  &zero_address_frag, regnum));
   for (i = 0; regname[i]; i++)
     buf[i] = ISLOWER (regname[i]) ? TOUPPER (regname[i]) : regname[i];
   buf[i] = '\0';
 
-  symbol_table_insert (symbol_new (buf, reg_section, (valueT) regnum,
-                                  &zero_address_frag));
+  symbol_table_insert (symbol_new (buf, reg_section,
+                                  &zero_address_frag, regnum));
 }
 
 static void
@@ -637,7 +637,7 @@ tic4x_insert_sym (const char *symname, int value)
   symbolS *symbolP;
 
   symbolP = symbol_new (symname, absolute_section,
-                       (valueT) value, &zero_address_frag);
+                       &zero_address_frag, value);
   SF_SET_LOCAL (symbolP);
   symbol_table_insert (symbolP);
 }
index 93586b376a2c2084f94d28b4b75b7a24a88f11e2..6412d389f4fbe5303c530273d561e5604985346a 100644 (file)
@@ -416,8 +416,7 @@ tic54x_eval (int x ATTRIBUTE_UNUSED)
       ignore_rest_of_line ();
       return;
     }
-  symbolP = symbol_new (name, absolute_section,
-                       (valueT) value, &zero_address_frag);
+  symbolP = symbol_new (name, absolute_section, &zero_address_frag, value);
   SF_SET_LOCAL (symbolP);
   symbol_table_insert (symbolP);
 
@@ -556,10 +555,9 @@ stag_add_field_symbols (struct stag *stag,
       if (rootsym == NULL)
        {
          symbolS *sym;
-         sym = symbol_new (name, absolute_section,
-                           (field->stag ? field->offset :
-                            (valueT) (base_offset + field->offset)),
-                           &zero_address_frag);
+         sym = symbol_new (name, absolute_section, &zero_address_frag,
+                           (field->stag ? field->offset
+                            : base_offset + field->offset));
          SF_SET_LOCAL (sym);
          symbol_table_insert (sym);
        }
@@ -611,8 +609,8 @@ stag_add_field (struct stag *parent,
   /* Only create a symbol for this field if the parent has no name.  */
   if (!strncmp (".fake", parent->name, 5))
     {
-      symbolS *sym = symbol_new (name, absolute_section,
-                                (valueT) offset, &zero_address_frag);
+      symbolS *sym = symbol_new (name, absolute_section, &zero_address_frag,
+                                offset);
       SF_SET_LOCAL (sym);
       symbol_table_insert (sym);
     }
@@ -675,16 +673,16 @@ tic54x_struct (int arg)
       char fake[] = ".fake_stagNNNNNNN";
       sprintf (fake, ".fake_stag%d", struct_count++);
       current_stag->sym = symbol_new (fake, absolute_section,
-                                     (valueT) abs_section_offset,
-                                     &zero_address_frag);
+                                     &zero_address_frag,
+                                     abs_section_offset);
     }
   else
     {
       char * label = xstrdup (S_GET_NAME (line_label));
       current_stag->sym = symbol_new (label,
                                      absolute_section,
-                                     (valueT) abs_section_offset,
-                                     &zero_address_frag);
+                                     &zero_address_frag,
+                                     abs_section_offset);
       free (label);
     }
   current_stag->name = S_GET_NAME (current_stag->sym);
@@ -1459,7 +1457,7 @@ set_cpu (enum cpu_version version)
   if (version == V545LP || version == V546LP)
     {
       symbolS *symbolP = symbol_new ("__allow_lp", absolute_section,
-                                    (valueT) 1, &zero_address_frag);
+                                    &zero_address_frag, 1);
       SF_SET_LOCAL (symbolP);
       symbol_table_insert (symbolP);
     }
@@ -2016,7 +2014,7 @@ tic54x_mmregs (int ignored ATTRIBUTE_UNUSED)
   for (sym = (tic54x_symbol *) mmregs; sym->name; sym++)
     {
       symbolS *symbolP = symbol_new (sym->name, absolute_section,
-                                    (valueT) sym->value, &zero_address_frag);
+                                    &zero_address_frag, sym->value);
       SF_SET_LOCAL (symbolP);
       symbol_table_insert (symbolP);
     }
@@ -2070,7 +2068,7 @@ set_address_mode (int mode)
   if (mode == far_mode)
     {
       symbolS *symbolP = symbol_new ("__allow_far", absolute_section,
-                                    (valueT) 1, &zero_address_frag);
+                                    &zero_address_frag, 1);
       SF_SET_LOCAL (symbolP);
       symbol_table_insert (symbolP);
     }
@@ -2176,7 +2174,7 @@ tic54x_set (int ignore ATTRIBUTE_UNUSED)
   if ((symbolP = symbol_find (name)) == NULL
       && (symbolP = md_undefined_symbol (name)) == NULL)
     {
-      symbolP = symbol_new (name, absolute_section, 0, &zero_address_frag);
+      symbolP = symbol_new (name, absolute_section, &zero_address_frag, 0);
       S_SET_STORAGE_CLASS (symbolP, C_STAT);
     }
   free (name);
@@ -3010,7 +3008,7 @@ md_begin (void)
     {
       /* Add basic registers to the symbol table.  */
       symbolS *symbolP = symbol_new (sym->name, absolute_section,
-                                    (valueT) sym->value, &zero_address_frag);
+                                    &zero_address_frag, sym->value);
       SF_SET_LOCAL (symbolP);
       symbol_table_insert (symbolP);
       str_hash_insert (reg_hash, sym->name, (char *) sym);
@@ -5015,18 +5013,15 @@ tic54x_undefined_symbol (char *name)
       (sym = (tic54x_symbol *) str_hash_find (misc_symbol_hash, name)) != NULL ||
       (sym = (tic54x_symbol *) str_hash_find (sbit_hash, name)) != NULL)
     {
-      return symbol_new (name, reg_section,
-                        (valueT) sym->value,
-                        &zero_address_frag);
+      return symbol_new (name, reg_section, &zero_address_frag, sym->value);
     }
 
   if ((sym = (tic54x_symbol *) str_hash_find (reg_hash, name)) != NULL ||
       (sym = (tic54x_symbol *) str_hash_find (mmreg_hash, name)) != NULL ||
       !strcasecmp (name, "a") || !strcasecmp (name, "b"))
     {
-      return symbol_new (name, reg_section,
-                        (valueT) sym ? sym->value : 0,
-                        &zero_address_frag);
+      return symbol_new (name, reg_section, &zero_address_frag,
+                        sym ? sym->value : 0);
     }
 
   return NULL;
index e4a234abb17abc5585706bea6e30e124da123740..82ec43933220c42b4d12e1be305500782853d484 100644 (file)
@@ -4193,12 +4193,12 @@ xtensa_create_literal_symbol (segT sec, fragS *frag)
      symbol will be in the output file.  */
   if (get_is_linkonce_section (stdoutput, sec))
     {
-      symbolP = symbol_new (name, sec, 0, frag);
+      symbolP = symbol_new (name, sec, frag, 0);
       S_CLEAR_EXTERNAL (symbolP);
       /* symbolP->local = 1; */
     }
   else
-    symbolP = symbol_new (name, sec, 0, frag);
+    symbolP = symbol_new (name, sec, frag, 0);
 
   xtensa_add_literal_sym (symbolP);
 
@@ -10210,7 +10210,7 @@ init_trampoline_frag (fragS *fp)
       char label[10 + 2 * sizeof(fp)];
 
       sprintf (label, ".L0_TR_%p", fp);
-      lsym = (symbolS *)local_symbol_make (label, now_seg, 0, fp);
+      lsym = (symbolS *) local_symbol_make (label, now_seg, fp, 0);
       fp->fr_symbol = lsym;
       if (fp->tc_frag_data.needs_jump_around)
         {
@@ -10832,9 +10832,9 @@ convert_frag_immed (segT segP,
                  target_offset += unreach->tc_frag_data.text_expansion[0];
                }
              gas_assert (gen_label == NULL);
-             gen_label = symbol_new (FAKE_LABEL_NAME, now_seg,
+             gen_label = symbol_new (FAKE_LABEL_NAME, now_seg, fragP,
                                      fr_opcode - fragP->fr_literal
-                                     + target_offset, fragP);
+                                     + target_offset);
              break;
 
            case ITYPE_INSN:
@@ -11137,8 +11137,7 @@ xg_promote_candidate_litpool (struct litpool_seg *lps,
   /* Create a local symbol pointing to the
      end of the pool.  */
   sprintf (label, ".L0_LT_%p", poolbeg);
-  lsym = (symbolS *)local_symbol_make (label, lps->seg,
-                                      0, poolend);
+  lsym = (symbolS *) local_symbol_make (label, lps->seg, poolend, 0);
   poolbeg->fr_symbol = lsym;
   /* Rest is done in xtensa_relax_frag.  */
 }
index a95c29736f0b6d33a03255788415023fb4d6636a..e4ba56d82ba523ec026bb735cbd18fe0c12a37d0 100644 (file)
@@ -546,10 +546,10 @@ dwarf2_gen_line_info (addressT ofs, struct dwarf2_line_info *loc)
       /* Use a non-fake name for the line number location,
         so that it can be referred to by relocations.  */
       sprintf (name, ".Loc.%u.%u", line, filenum);
-      sym = symbol_new (name, now_seg, ofs, frag_now);
+      sym = symbol_new (name, now_seg, frag_now, ofs);
     }
   else
-    sym = symbol_temp_new (now_seg, ofs, frag_now);
+    sym = symbol_temp_new (now_seg, frag_now, ofs);
   dwarf2_gen_line_info_1 (sym, loc);
 }
 
@@ -1245,8 +1245,8 @@ dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED)
                sym = force_reset_view;
              else
                {
-                 sym = symbol_temp_new (absolute_section, value,
-                                        &zero_address_frag);
+                 sym = symbol_temp_new (absolute_section, &zero_address_frag,
+                                        value);
                  if (force_reset)
                    force_reset_view = sym;
                }
@@ -1962,7 +1962,7 @@ process_entries (segT seg, struct line_entry *e)
     out_inc_line_addr (INT_MAX, frag_ofs - last_frag_ofs);
   else
     {
-      lab = symbol_temp_new (seg, frag_ofs, frag);
+      lab = symbol_temp_new (seg, frag, frag_ofs);
       relax_inc_line_addr (INT_MAX, lab, last_lab);
     }
 }
@@ -2326,11 +2326,11 @@ out_debug_ranges (segT ranges_seg)
       symbolS *beg, *end;
 
       frag = first_frag_for_seg (s->seg);
-      beg = symbol_temp_new (s->seg, 0, frag);
+      beg = symbol_temp_new (s->seg, frag, 0);
       s->text_start = beg;
 
       frag = last_frag_for_seg (s->seg);
-      end = symbol_temp_new (s->seg, get_frag_fix (frag, s->seg), frag);
+      end = symbol_temp_new (s->seg, frag, get_frag_fix (frag, s->seg));
       s->text_end = end;
 
       exp.X_op = O_symbol;
@@ -2395,11 +2395,11 @@ out_debug_aranges (segT aranges_seg, segT info_seg)
       symbolS *beg, *end;
 
       frag = first_frag_for_seg (s->seg);
-      beg = symbol_temp_new (s->seg, 0, frag);
+      beg = symbol_temp_new (s->seg, frag, 0);
       s->text_start = beg;
 
       frag = last_frag_for_seg (s->seg);
-      end = symbol_temp_new (s->seg, get_frag_fix (frag, s->seg), frag);
+      end = symbol_temp_new (s->seg, frag, get_frag_fix (frag, s->seg));
       s->text_end = end;
 
       exp.X_op = O_symbol;
index 5ec999e21581a6cc5bab3226d1f8c69c41dc095b..8f884bb0042b017710a01927f16fcb840ef2d885 100644 (file)
@@ -2219,8 +2219,7 @@ add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
     {
       (void) add_ecoff_symbol (file_name, st_Nil, sc_Nil,
                               symbol_new (FAKE_LABEL_NAME, now_seg,
-                                          (valueT) frag_now_fix (),
-                                          frag_now),
+                                          frag_now, frag_now_fix ()),
                               (bfd_vma) 0, 0, ECOFF_MARK_STAB (N_SOL));
       return;
     }
@@ -3010,8 +3009,7 @@ ecoff_directive_end (int ignore ATTRIBUTE_UNUSED)
   else
     (void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text,
                             symbol_new (FAKE_LABEL_NAME, now_seg,
-                                        (valueT) frag_now_fix (),
-                                        frag_now),
+                                        frag_now, frag_now_fix ()),
                             (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
 
 #ifdef md_flush_pending_output
@@ -3254,8 +3252,7 @@ ecoff_directive_loc (int ignore ATTRIBUTE_UNUSED)
     {
       (void) add_ecoff_symbol ((char *) NULL, st_Label, sc_Text,
                               symbol_new (FAKE_LABEL_NAME, now_seg,
-                                          (valueT) frag_now_fix (),
-                                          frag_now),
+                                          frag_now, frag_now_fix ()),
                               (bfd_vma) 0, 0, lineno);
       return;
     }
index 6f8ccb823031f737e0472ff1f674e19c7d763855..23a6a003b9c82ac9a3ed42682c0e2bf845564be3 100644 (file)
@@ -102,7 +102,7 @@ make_expr_symbol (expressionS *expressionP)
                            : expressionP->X_op == O_register
                              ? reg_section
                              : expr_section),
-                          0, &zero_address_frag);
+                          &zero_address_frag, 0);
   symbol_set_value_expression (symbolP, expressionP);
 
   if (expressionP->X_op == O_constant)
index e5d48e48ddc9d4c6d5951351562b4533af307af3..aa91007d99846f51cda006da727de69f1d60c7a2 100644 (file)
@@ -272,7 +272,7 @@ itbl_init (void)
        for (e = *es; e; e = e->next)
          {
            symbol_table_insert (symbol_create (e->name, reg_section,
-                                               e->value, &zero_address_frag));
+                                               &zero_address_frag, e->value));
          }
       }
   append_insns_as_macros ();
index a65e56d16f99854ee6e49e96889ab36caaed0e0f..a2ad4b6ecfe4f4b94a33e53283f0c6fe2d752e2d 100644 (file)
@@ -1002,8 +1002,7 @@ read_a_source_file (const char *name)
                      else
                        line_label = symbol_create (line_start,
                                                    absolute_section,
-                                                   (valueT) 0,
-                                                   &zero_address_frag);
+                                                   &zero_address_frag, 0);
 
                      next_char = restore_line_pointer (nul_char);
                      if (next_char == ':')
index c962bb4fdf78a5c685281976f6bd7609b14b7d61..1ba9926b34d21bf20540a47411e6ca06182eadb6 100644 (file)
@@ -144,8 +144,7 @@ aout_process_stab (int what, const char *string, int type, int other, int desc)
      symbol chain.  This is to avoid "continuation symbols" (where one
      ends in "\" and the debug info is continued in the next .stabs
      directive) from being separated by other random symbols.  */
-  symbol = symbol_create (string, undefined_section, 0,
-                         &zero_address_frag);
+  symbol = symbol_create (string, undefined_section, &zero_address_frag, 0);
   if (what == 's' || what == 'n')
     {
       /* Pick up the value from the input line.  */
@@ -378,7 +377,7 @@ s_stab_generic (int what,
          expressionS exp;
 
          /* Arrange for a value representing the current location.  */
-         symbol = symbol_temp_new (saved_seg, dot, saved_frag);
+         symbol = symbol_temp_new (saved_seg, saved_frag, dot);
 
          exp.X_op = O_symbol;
          exp.X_add_symbol = symbol;
index 1b72948abadbac4cee0e5580573bdb469a2c5d81..e07cef0595bdd9231766fda4ddccacabd6ae5b04 100644 (file)
@@ -222,7 +222,7 @@ section_symbol (segT sec)
   if (! EMIT_SECTION_SYMBOLS || symbol_table_frozen)
     {
       /* Here we know it won't be going into the symbol table.  */
-      s = symbol_create (sec->symbol->name, sec, 0, &zero_address_frag);
+      s = symbol_create (sec->symbol->name, sec, &zero_address_frag, 0);
     }
   else
     {
@@ -233,7 +233,7 @@ section_symbol (segT sec)
       if (s == NULL
          || ((seg = S_GET_SEGMENT (s)) != sec
              && seg != undefined_section))
-       s = symbol_new (sec->symbol->name, sec, 0, &zero_address_frag);
+       s = symbol_new (sec->symbol->name, sec, &zero_address_frag, 0);
       else if (seg == undefined_section)
        {
          S_SET_SEGMENT (s, sec);
index 587d3b7efe30232548f75cb6eb83787fb8406e63..092c9450761134e2e7068547343076ed095e2451 100644 (file)
@@ -268,9 +268,9 @@ static void print_binary (FILE *, const char *, expressionS *);
    output file, you can call symbol_create.  */
 
 symbolS *
-symbol_new (const char *name, segT segment, valueT valu, fragS *frag)
+symbol_new (const char *name, segT segment, fragS *frag, valueT valu)
 {
-  symbolS *symbolP = symbol_create (name, segment, valu, frag);
+  symbolS *symbolP = symbol_create (name, segment, frag, valu);
 
   /* Link to end of symbol chain.  */
   {
@@ -312,11 +312,10 @@ save_symbol_name (const char *name)
   return ret;
 }
 
+/* Create a symbol.  NAME is copied, the caller can destroy/modify.  */
+
 symbolS *
-symbol_create (const char *name, /* It is copied, the caller can destroy/modify.  */
-              segT segment,    /* Segment identifier (SEG_<something>).  */
-              valueT valu,     /* Symbol value.  */
-              fragS *frag      /* Associated fragment.  */)
+symbol_create (const char *name, segT segment, fragS *frag, valueT valu)
 {
   const char *preserved_copy_of_name;
   symbolS *symbolP;
@@ -374,7 +373,7 @@ static unsigned long local_symbol_conversion_count;
 /* Create a local symbol and insert it into the local hash table.  */
 
 struct local_symbol *
-local_symbol_make (const char *name, segT section, valueT val, fragS *frag)
+local_symbol_make (const char *name, segT section, fragS *frag, valueT val)
 {
   const char *name_copy;
   struct local_symbol *ret;
@@ -410,8 +409,8 @@ local_symbol_convert (struct local_symbol *locsym)
 
   ++local_symbol_conversion_count;
 
-  ret = symbol_new (locsym->lsy_name, locsym->lsy_section, locsym->lsy_value,
-                   local_symbol_get_frag (locsym));
+  ret = symbol_new (locsym->lsy_name, locsym->lsy_section,
+                   local_symbol_get_frag (locsym), locsym->lsy_value);
 
   if (local_symbol_resolved_p (locsym))
     ret->sy_flags.sy_resolved = 1;
@@ -626,14 +625,12 @@ colon (/* Just seen "x:" - rattle symbols & frags.  */
     }
   else if (! flag_keep_locals && bfd_is_local_label_name (stdoutput, sym_name))
     {
-      symbolP = (symbolS *) local_symbol_make (sym_name, now_seg,
-                                              (valueT) frag_now_fix (),
-                                              frag_now);
+      symbolP = (symbolS *) local_symbol_make (sym_name, now_seg, frag_now,
+                                              frag_now_fix ());
     }
   else
     {
-      symbolP = symbol_new (sym_name, now_seg, (valueT) frag_now_fix (),
-                           frag_now);
+      symbolP = symbol_new (sym_name, now_seg, frag_now, frag_now_fix ());
 
       symbol_table_insert (symbolP);
     }
@@ -698,8 +695,7 @@ symbol_find_or_make (const char *name)
            return symbolP;
 
          symbolP = (symbolS *) local_symbol_make (name, undefined_section,
-                                                  (valueT) 0,
-                                                  &zero_address_frag);
+                                                  &zero_address_frag, 0);
          return symbolP;
        }
 
@@ -720,7 +716,7 @@ symbol_make (const char *name)
   symbolP = md_undefined_symbol ((char *) name);
 
   if (!symbolP)
-    symbolP = symbol_new (name, undefined_section, (valueT) 0, &zero_address_frag);
+    symbolP = symbol_new (name, undefined_section, &zero_address_frag, 0);
 
   return (symbolP);
 }
@@ -873,21 +869,21 @@ symbol_clone_if_forward_ref (symbolS *symbolP, int is_forward)
 }
 
 symbolS *
-symbol_temp_new (segT seg, valueT ofs, fragS *frag)
+symbol_temp_new (segT seg, fragS *frag, valueT ofs)
 {
-  return symbol_new (FAKE_LABEL_NAME, seg, ofs, frag);
+  return symbol_new (FAKE_LABEL_NAME, seg, frag, ofs);
 }
 
 symbolS *
 symbol_temp_new_now (void)
 {
-  return symbol_temp_new (now_seg, frag_now_fix (), frag_now);
+  return symbol_temp_new (now_seg, frag_now, frag_now_fix ());
 }
 
 symbolS *
 symbol_temp_new_now_octets (void)
 {
-  return symbol_temp_new (now_seg, frag_now_fix_octets (), frag_now);
+  return symbol_temp_new (now_seg, frag_now, frag_now_fix_octets ());
 }
 
 symbolS *
@@ -1322,7 +1318,7 @@ resolve_symbol_value (symbolS *symp)
 
       if (relc_symbol_name != NULL)
        relc_symbol = symbol_new (relc_symbol_name, undefined_section,
-                                 0, & zero_address_frag);
+                                 &zero_address_frag, 0);
 
       if (relc_symbol == NULL)
        {
index dafd677b9e11783fcc500234bd4676316cdf07e4..9c9f7c6d61dee0e0e885caf0ef9d398b98c0f2d3 100644 (file)
@@ -45,17 +45,14 @@ symbolS *symbol_find_exact (const char *name);
 symbolS *symbol_find_exact_noref (const char *name, int noref);
 symbolS *symbol_find_or_make (const char *name);
 symbolS *symbol_make (const char *name);
-symbolS *symbol_new (const char *name, segT segment, valueT value,
-                    fragS * frag);
-symbolS *symbol_create (const char *name, segT segment, valueT value,
-                       fragS * frag);
-struct local_symbol *local_symbol_make (const char *name, segT section,
-                                       valueT val, fragS *frag);
+symbolS *symbol_new (const char *, segT, fragS *, valueT);
+symbolS *symbol_create (const char *, segT, fragS *, valueT);
+struct local_symbol *local_symbol_make (const char *, segT, fragS *, valueT);
 symbolS *symbol_clone (symbolS *, int);
 #undef symbol_clone_if_forward_ref
 symbolS *symbol_clone_if_forward_ref (symbolS *, int);
 #define symbol_clone_if_forward_ref(s) symbol_clone_if_forward_ref (s, 0)
-symbolS *symbol_temp_new (segT, valueT, fragS *);
+symbolS *symbol_temp_new (segT, fragS *, valueT);
 symbolS *symbol_temp_new_now (void);
 symbolS *symbol_temp_new_now_octets (void);
 symbolS *symbol_temp_make (void);