+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.
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
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
/* 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
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
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);
/* 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);
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)))
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. */
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;
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
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++;
}
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;
/* 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);
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 ();
/* 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);
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}
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);
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)
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. */
/* 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
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);
}
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);
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;
}
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)
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. */
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 ++;
}
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;
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;
}
{
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;
}
/* 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)
{
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;
}
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.
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);
{
/* 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);
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;
}
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,
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;
}
{
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);
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)
/* 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;
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
}
#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
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++)
{
/* 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);
}
/* 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)));
/* 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. */
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));
}
}
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);
}
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);
}
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
{
{
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. */
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
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;
}
{
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,
{
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,
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,
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)
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;
{
/* 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);
}
}
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);
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. */
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;
}
/* 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);
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
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);
}
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);
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);
}
/* 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);
}
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);
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);
}
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);
}
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);
}
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);
{
/* 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);
(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;
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);
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)
{
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:
/* 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. */
}
/* 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);
}
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;
}
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);
}
}
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;
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;
{
(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;
}
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
{
(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;
}
: 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)
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 ();
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 == ':')
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. */
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;
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
{
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);
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. */
{
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;
/* 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;
++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;
}
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);
}
return symbolP;
symbolP = (symbolS *) local_symbol_make (name, undefined_section,
- (valueT) 0,
- &zero_address_frag);
+ &zero_address_frag, 0);
return symbolP;
}
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);
}
}
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 *
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)
{
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);