#ifndef DEFAULT_ARCH
#define DEFAULT_ARCH "s390"
#endif
-static char *default_arch = DEFAULT_ARCH;
+static const char *default_arch = DEFAULT_ARCH;
/* Either 32 or 64, selects file format. */
static int s390_arch_size = 0;
In case of an error, S390_OPCODE_MAXCPU is returned. */
static unsigned int
-s390_parse_cpu (char * arg,
+s390_parse_cpu (const char * arg,
unsigned int * ret_flags,
bfd_boolean allow_extensions)
{
ilp_bak = input_line_pointer;
if (icpu != S390_OPCODE_MAXCPU)
{
- input_line_pointer = arg;
+ input_line_pointer = (char *) arg;
*ret_flags = (cpu_table[icpu].flags & S390_INSTR_FLAG_FACILITY_MASK);
while (*input_line_pointer == '+' && allow_extensions)
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
struct map_tls
{
- char *string;
+ const char *string;
int length;
bfd_reloc_code_real_type reloc;
};
struct map_bfd
{
- char *string;
+ const char *string;
int length;
elf_suffix_type suffix;
};
}
else
{
- lpe = (struct s390_lpe *) xmalloc (sizeof (struct s390_lpe));
+ lpe = XNEW (struct s390_lpe);
}
lpe->ex = *exp_p;
s390_machine (int ignore ATTRIBUTE_UNUSED)
{
char *cpu_string;
- static struct
+ static struct cpu_history
{
unsigned int cpu;
unsigned int flags;
if (strcmp (cpu_string, "push") == 0)
{
if (cpu_history == NULL)
- cpu_history = xmalloc (MAX_HISTORY * sizeof (*cpu_history));
+ cpu_history = XNEWVEC (struct cpu_history, MAX_HISTORY);
if (curr_hist >= MAX_HISTORY)
as_bad (_(".machine stack overflow"));
if (strcmp (mode_string, "push") == 0)
{
if (mode_history == NULL)
- mode_history = xmalloc (MAX_HISTORY * sizeof (*mode_history));
+ mode_history = XNEWVEC (unsigned int, MAX_HISTORY);
if (curr_hist >= MAX_HISTORY)
as_bad (_(".machinemode stack overflow"));
#undef MAX_HISTORY
-char *
+const char *
md_atof (int type, char *litp, int *sizep)
{
return ieee_md_atof (type, litp, sizep, TRUE);
code = BFD_RELOC_390_GOTPCDBL;
}
- reloc = (arelent *) xmalloc (sizeof (arelent));
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ reloc = XNEW (arelent);
+ reloc->sym_ptr_ptr = XNEW (asymbol *);
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);