+2016-03-22 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * config/tc-h8300.c (h8300_elf_section): Add const qualifiers.
+ * config/tc-ia64.c (obj_elf_vms_common): Likewise.
+ * config/tc-m68hc11.c (md_begin): Likewise.
+ (print_opcode_list): Likewise.
+ * config/tc-msp430.c (msp430_section): Likewise.
+ * config/tc-score.c (struct s3_insn_to_dependency): Likewise.
+ (s3_build_dependency_insn_hsh): Likewise.
+ * config/tc-score7.c (struct s7_insn_to_dependency): Likewise.
+ (s7_build_dependency_insn_hsh): Likewise.
+ * config/tc-tic4x.c: Likewise.
+ * config/tc-tic54x.c (tic54x_set_default_include): Likewise.
+ (subsym_get_arg): Likewise.
+ * config/tc-xtensa.c (struct suffix_reloc_map): Likewise.
+ (get_directive): Likewise.
+ (cache_literal_section): Likewise.
+ * config/xtensa-relax.c: Likewise.
+ * symbols.c (symbol_create): Likewise.
+ (local_symbol_make): Likewise.
+ (symbol_relc_make_expr): Likewise.
+
2016-03-22 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-pdp11.c (md_assemble): Remove useless if and assignment to
static const char * known_data_sections [] = { ".rodata", ".tdata", ".tbss" };
static const char * known_data_prefixes [] = { ".debug", ".zdebug", ".gnu.warning" };
char * saved_ilp = input_line_pointer;
- char * name;
+ const char * name;
name = obj_elf_section_name ();
if (name == NULL)
static void
obj_elf_vms_common (int ignore ATTRIBUTE_UNUSED)
{
- char *sec_name;
+ const char *sec_name;
char *sym_name;
char c;
offsetT size;
void
md_begin (void)
{
- char *prev_name = "";
+ const char *prev_name = "";
struct m68hc11_opcode *opcodes;
struct m68hc11_opcode_def *opc = 0;
int i, j;
print_opcode_list (void)
{
int i;
- char *prev_name = "";
+ const char *prev_name = "";
struct m68hc11_opcode *opcodes;
int example = flag_print_opcodes == 2;
msp430_section (int arg)
{
char * saved_ilp = input_line_pointer;
- char * name = obj_elf_section_name ();
+ const char * name = obj_elf_section_name ();
msp430_make_init_symbols (name);
struct s3_insn_to_dependency
{
- char *insn_name;
+ const char *insn_name;
enum s3_insn_type_for_dependency type;
};
const struct s3_insn_to_dependency *tmp = s3_insn_to_dependency_table + i;
size_t len = strlen (tmp->insn_name);
struct s3_insn_to_dependency *new_i2n;
+ char *buf;
new_i2n = (struct s3_insn_to_dependency *)
obstack_alloc (&dependency_obstack,
sizeof (struct s3_insn_to_dependency));
- new_i2n->insn_name = (char *) obstack_alloc (&dependency_obstack,
- len + 1);
+ buf = (char *) obstack_alloc (&dependency_obstack, len + 1);
- strcpy (new_i2n->insn_name, tmp->insn_name);
+ strcpy (buf, tmp->insn_name);
+ new_i2n->insn_name = buf;
new_i2n->type = tmp->type;
hash_insert (s3_dependency_insn_hsh, new_i2n->insn_name,
(void *) new_i2n);
struct s7_insn_to_dependency
{
- char *insn_name;
+ const char *insn_name;
enum s7_insn_type_for_dependency type;
};
const struct s7_insn_to_dependency *tmp = s7_insn_to_dependency_table + i;
size_t len = strlen (tmp->insn_name);
struct s7_insn_to_dependency *new_i2d;
+ char *insn_name;
new_i2d = (struct s7_insn_to_dependency *)
obstack_alloc (&dependency_obstack,
sizeof (struct s7_insn_to_dependency));
- new_i2d->insn_name = (char *) obstack_alloc (&dependency_obstack,
- len + 1);
+ insn_name = (char *) obstack_alloc (&dependency_obstack, len + 1);
- strcpy (new_i2d->insn_name, tmp->insn_name);
+ strcpy (insn_name, tmp->insn_name);
+ new_i2d->insn_name = insn_name;
new_i2d->type = tmp->type;
hash_insert (s7_dependency_insn_hsh, new_i2d->insn_name,
(void *) new_i2d);
/* Make a new instruction template. */
static tic4x_inst_t *
-tic4x_inst_make (const char *name, unsigned long opcode, char *args)
+tic4x_inst_make (const char *name, unsigned long opcode, const char *args)
{
static tic4x_inst_t *insts = NULL;
static char *names = NULL;
static void
tic54x_set_default_include (int dot)
{
- char *dir = ".";
+ const char *dir = ".";
char *tmp = NULL;
if (!dot)
/* Built-in substitution symbol functions and math functions. */
typedef struct
{
- char *name;
+ const char *name;
int (*proc) (char *, char *);
int nargs;
} subsym_proc_entry;
typedef struct
{
- char *name;
+ const char *name;
float (*proc) (float, float);
int nargs;
int int_return;
replacement on the value. */
static char *
-subsym_get_arg (char *line, char *terminators, char **str, int nosub)
+subsym_get_arg (char *line, const char *terminators, char **str, int nosub)
{
char *ptr = line;
char *endp;
}
else
{
- char *term = terminators;
+ const char *term = terminators;
char *value = NULL;
while (*ptr && *ptr != *term)
struct suffix_reloc_map
{
- char *suffix;
+ const char *suffix;
int length;
bfd_reloc_code_real_type reloc;
unsigned char operator;
{
int len;
unsigned i;
- char *directive_string;
+ const char *directive_string;
if (strncmp (input_line_pointer, "no-", 3) != 0)
*negated = FALSE;
static void
-xg_replace_opname (char **popname, char *newop)
+xg_replace_opname (char **popname, const char *newop)
{
free (*popname);
*popname = (char *) xmalloc (strlen (newop) + 1);
static int
-xtensa_translate_zero_immed (char *old_op,
- char *new_op,
+xtensa_translate_zero_immed (const char *old_op,
+ const char *new_op,
char **popname,
int *pnum_args,
char **arg_strings)
cache_literal_section (bfd_boolean use_abs_literals)
{
const char *text_name, *group_name = 0;
- char *base_name, *name, *suffix;
+ const char *base_name, *suffix;
+ char *name;
segT *pcached;
segT seg, current_section;
int current_subsec;
static bfd_boolean
wide_branch_opcode (const char *opcode_name,
- char *suffix,
+ const char *suffix,
xtensa_opcode *popcode)
{
xtensa_isa isa = xtensa_default_isa;
const char * an_external_name;
#endif
-static char *save_symbol_name (const char *);
+static const char *save_symbol_name (const char *);
static void fb_label_init (void);
static long dollar_label_instance (long);
static long fb_label_instance (long);
/* Save a symbol name on a permanent obstack, and convert it according
to the object file format. */
-static char *
+static const char *
save_symbol_name (const char *name)
{
size_t name_length;
valueT valu, /* Symbol value. */
fragS *frag /* Associated fragment. */)
{
- char *preserved_copy_of_name;
+ const char *preserved_copy_of_name;
symbolS *symbolP;
preserved_copy_of_name = save_symbol_name (name);
struct local_symbol *
local_symbol_make (const char *name, segT section, valueT val, fragS *frag)
{
- char *name_copy;
+ const char *name_copy;
struct local_symbol *ret;
++local_symbol_count;
char *
symbol_relc_make_expr (expressionS * exp)
{
- char * opstr = NULL; /* Operator prefix string. */
+ const char * opstr = NULL; /* Operator prefix string. */
int arity = 0; /* Arity of this operator. */
char * operands[3]; /* Up to three operands. */
char * concat_string = NULL;
+2016-03-22 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * opcode/i960.h: Add const qualifiers.
+ * opcode/tic4x.h (struct tic4x_inst): Likewise.
+
2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
* opcodes/arc.h (insn_class_t): Add BITOP type.
/* Description of a single i80960 instruction */
struct i960_opcode {
long opcode; /* 32 bits, constant fields filled in, rest zeroed */
- char *name; /* Assembler mnemonic */
+ const char *name; /* Assembler mnemonic */
short iclass; /* Class: see #defines below */
char format; /* REG, COBR, CTRL, MEMn, COJ, FBRA, or CALLJ */
char num_ops; /* Number of operands */
const char * name;
unsigned long opcode;
unsigned long opmask;
- char * args;
+ const char * args;
unsigned long oplevel;
};