summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog111
-rw-r--r--gas/as.h8
-rw-r--r--gas/cgen.c4
-rw-r--r--gas/config/atof-ieee.c2
-rw-r--r--gas/config/atof-vax.c2
-rw-r--r--gas/config/obj-elf.c3
-rw-r--r--gas/config/tc-aarch64.c2
-rw-r--r--gas/config/tc-alpha.c17
-rw-r--r--gas/config/tc-alpha.h2
-rw-r--r--gas/config/tc-arc.c2
-rw-r--r--gas/config/tc-arm.c2
-rw-r--r--gas/config/tc-avr.c2
-rw-r--r--gas/config/tc-bfin.c2
-rw-r--r--gas/config/tc-cr16.c2
-rw-r--r--gas/config/tc-cris.c2
-rw-r--r--gas/config/tc-crx.c2
-rw-r--r--gas/config/tc-d10v.c2
-rw-r--r--gas/config/tc-d30v.c2
-rw-r--r--gas/config/tc-dlx.c2
-rw-r--r--gas/config/tc-epiphany.c2
-rw-r--r--gas/config/tc-fr30.c2
-rw-r--r--gas/config/tc-frv.c2
-rw-r--r--gas/config/tc-ft32.c2
-rw-r--r--gas/config/tc-h8300.c2
-rw-r--r--gas/config/tc-hppa.c48
-rw-r--r--gas/config/tc-i370.c2
-rw-r--r--gas/config/tc-i386.c4
-rw-r--r--gas/config/tc-i386.h2
-rw-r--r--gas/config/tc-i860.c4
-rw-r--r--gas/config/tc-i960.c2
-rw-r--r--gas/config/tc-ia64.c4
-rw-r--r--gas/config/tc-ia64.h2
-rw-r--r--gas/config/tc-ip2k.c2
-rw-r--r--gas/config/tc-iq2000.c2
-rw-r--r--gas/config/tc-lm32.c2
-rw-r--r--gas/config/tc-m32c.c2
-rw-r--r--gas/config/tc-m32r.c2
-rw-r--r--gas/config/tc-m68hc11.c2
-rw-r--r--gas/config/tc-m68k.c2
-rw-r--r--gas/config/tc-mcore.c2
-rw-r--r--gas/config/tc-mep.c4
-rw-r--r--gas/config/tc-mep.h2
-rw-r--r--gas/config/tc-metag.c2
-rw-r--r--gas/config/tc-microblaze.c2
-rw-r--r--gas/config/tc-microblaze.h1
-rw-r--r--gas/config/tc-mips.c5
-rw-r--r--gas/config/tc-mmix.c2
-rw-r--r--gas/config/tc-mn10200.c2
-rw-r--r--gas/config/tc-mn10300.c2
-rw-r--r--gas/config/tc-moxie.c2
-rw-r--r--gas/config/tc-msp430.c2
-rw-r--r--gas/config/tc-mt.c2
-rw-r--r--gas/config/tc-nds32.c2
-rw-r--r--gas/config/tc-nios2.c4
-rw-r--r--gas/config/tc-nios2.h2
-rw-r--r--gas/config/tc-ns32k.c2
-rw-r--r--gas/config/tc-or1k.c2
-rw-r--r--gas/config/tc-pdp11.c6
-rw-r--r--gas/config/tc-pj.c2
-rw-r--r--gas/config/tc-ppc.c2
-rw-r--r--gas/config/tc-rl78.c2
-rw-r--r--gas/config/tc-rx.c2
-rw-r--r--gas/config/tc-s390.c2
-rw-r--r--gas/config/tc-score.c6
-rw-r--r--gas/config/tc-sh.c2
-rw-r--r--gas/config/tc-sparc.c4
-rw-r--r--gas/config/tc-spu.c2
-rw-r--r--gas/config/tc-tic30.c2
-rw-r--r--gas/config/tc-tic4x.c2
-rw-r--r--gas/config/tc-tic54x.c2
-rw-r--r--gas/config/tc-tic6x.c2
-rw-r--r--gas/config/tc-tilegx.c2
-rw-r--r--gas/config/tc-tilepro.c2
-rw-r--r--gas/config/tc-v850.c4
-rw-r--r--gas/config/tc-vax.c2
-rw-r--r--gas/config/tc-visium.c2
-rw-r--r--gas/config/tc-xc16x.c2
-rw-r--r--gas/config/tc-xgate.c2
-rw-r--r--gas/config/tc-xstormy16.c2
-rw-r--r--gas/config/tc-xtensa.c2
-rw-r--r--gas/config/tc-z80.c2
-rw-r--r--gas/config/tc-z8k.c2
-rw-r--r--gas/messages.c34
-rw-r--r--gas/read.c6
-rw-r--r--gas/tc.h2
85 files changed, 261 insertions, 148 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3294a8ff959..c9a762dad1d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,114 @@
+2016-04-01 Alan Modra <amodra@gmail.com>
+
+ * cgen.c (weak_operand_overflow_check): Return const char*.
+ * messages.c (as_internal_value_out_of_range): Formatting.
+ (as_warn_value_out_of_range): Consify prefix param.
+ (as_bad_value_out_of_range): Likewise.
+ * read.c (s_errwarn): Constify msg..
+ (s_float_space, float_cons): ..and err.
+ * as.h (as_warn_value_out_of_range, as_bad_value_out_of_range,
+ ieee_md_atof, vax_md_atof): Update prototypes.
+ * tc.h (md_atof): Update prototype.
+ * config/atof-ieee.c (ieee_md_atof): Return const char*.
+ * config/atof-vax.c (vax_md_atof): Likewise.
+ * config/obj-elf.c (obj_elf_parse_section_letters): Constify bad_msg.
+ * config/tc-aarch64.c (md_atof): Return const char*.
+ * config/tc-alpha.c (s_alpha_section_name): Likewise.
+ (s_alpha_comm): Constify sec_name.
+ (section_name): Constify.
+ (s_alpha_section): Consify name..
+ (alpha_elf_section_letter): ..and ptr_msg param..
+ (md_atof): ..and return.
+ * config/tc-alpha.h (alpha_elf_section_letter): Update prototype.
+ * config/tc-arc.c (md_atof): Return const char*.
+ * config/tc-arm.c (md_atof): Likewise.
+ * config/tc-avr.c (md_atof): Likewise.
+ * config/tc-bfin.c (md_atof): Likewise.
+ * config/tc-cr16.c (md_atof): Likewise.
+ * config/tc-cris.c (md_atof): Likewise.
+ * config/tc-crx.c (md_atof): Likewise.
+ * config/tc-d10v.c (md_atof): Likewise.
+ * config/tc-d30v.c (md_atof): Likewise.
+ * config/tc-dlx.c (md_atof): Likewise.
+ * config/tc-epiphany.c (md_atof): Likewise.
+ * config/tc-fr30.c (md_atof): Likewise.
+ * config/tc-frv.c (md_atof): Likewise.
+ * config/tc-ft32.c (md_atof): Likewise.
+ * config/tc-h8300.c (md_atof): Likewise.
+ * config/tc-hppa.c (struct default_subspace_dict): Constify name.
+ (struct default_space_dict): Likewise.
+ (create_new_space): Constify name param.
+ (create_new_subspace): Likewise.
+ (is_defined_space, is_defined_subspace): Likewise.
+ (pa_parse_space_stmt): Constify space_name param.
+ (md_atof): Return const char*.
+ (pa_spaces_begin): Constify name.
+ * config/tc-i370.c (md_atof): Return const char*.
+ * config/tc-i386.c (md_atof): Likewise.
+ (x86_64_section_letter): Constify ptr_msg param.
+ * config/tc-i386.h (x86_64_section_letter): Update prototype.
+ * config/tc-i860.c (struct i860_it): Constify error.
+ (md_atof): Return const char*.
+ * config/tc-i960.c (md_atof): Likewise.
+ * config/tc-ia64.c (md_atof): Likewise.
+ (ia64_elf_section_letter): Constify ptr_msg param.
+ * config/tc-ia64.h (ia64_elf_section_letter): Update prototype.
+ * config/tc-ip2k.c (md_atof): Return const char*.
+ * config/tc-iq2000.c (md_atof): Likewise.
+ * config/tc-lm32.c (md_atof): Likewise.
+ * config/tc-m32c.c (md_atof): Likewise.
+ * config/tc-m32r.c (md_atof): Likewise.
+ * config/tc-m68hc11.c (md_atof): Likewise.
+ * config/tc-m68k.c (md_atof): Likewise.
+ * config/tc-mcore.c (md_atof): Likewise.
+ * config/tc-mep.c (md_atof): Likewise.
+ (mep_elf_section_letter): Constify ptr_msg param.
+ * config/tc-mep.h (mep_elf_section_letter): Update prototype.
+ * config/tc-metag.c (md_atof): Return const char*.
+ * config/tc-microblaze.c (md_atof): Likewise.
+ * config/tc-microblaze.h (md_atof): Delete prototype.
+ * config/tc-mips.c (mips_parse_argument_token): Constify err.
+ (md_atof): Return const char*.
+ * config/tc-mmix.c (md_atof): Likewise.
+ * config/tc-mn10200.c (md_atof): Likewise.
+ * config/tc-mn10300.c (md_atof): Likewise.
+ * config/tc-moxie.c (md_atof): Likewise.
+ * config/tc-msp430.c (md_atof): Likewise.
+ * config/tc-mt.c (md_atof): Likewise.
+ * config/tc-nds32.c (md_atof): Likewise.
+ * config/tc-nios2.c (md_atof): Likewise.
+ (nios2_elf_section_letter): Constify ptr_msg param.
+ * config/tc-nios2.h (nios2_elf_section_letter): Update prototype.
+ * config/tc-ns32k.c (md_atof): Return const char*.
+ * config/tc-or1k.c (md_atof): Likewise.
+ * config/tc-pdp11.c (struct pdp11_code): Constify error.
+ (md_atof): Return const char*.
+ * config/tc-pj.c (md_atof): Likewise.
+ * config/tc-ppc.c (md_atof): Likewise.
+ * config/tc-rl78.c (md_atof): Likewise.
+ * config/tc-rx.c (md_atof): Likewise.
+ * config/tc-s390.c (md_atof): Likewise.
+ * config/tc-score.c (s3_atof, md_atof): Likewise.
+ * config/tc-sh.c (md_atof): Likewise.
+ * config/tc-sparc.c (struct sparc_it): Constify error.
+ (md_atof): Return const char*.
+ * config/tc-spu.c (md_atof): Likewise.
+ * config/tc-tic30.c (md_atof): Likewise.
+ * config/tc-tic4x.c (md_atof): Likewise.
+ * config/tc-tic54x.c (md_atof): Likewise.
+ * config/tc-tic6x.c (md_atof): Likewise.
+ * config/tc-tilegx.c (md_atof): Likewise.
+ * config/tc-tilepro.c (md_atof): Likewise.
+ * config/tc-v850.c (parse_register_list, md_atof): Likewise.
+ * config/tc-vax.c (md_atof): Likewise.
+ * config/tc-visium.c (md_atof): Likewise.
+ * config/tc-xc16x.c (md_atof): Likewise.
+ * config/tc-xgate.c (md_atof): Likewise.
+ * config/tc-xstormy16.c (md_atof): Likewise.
+ * config/tc-xtensa.c (md_atof): Likewise.
+ * config/tc-z80.c (md_atof): Likewise.
+ * config/tc-z8k.c (md_atof): Likewise.
+
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-xtensa.c (struct rename_section_struct): Make old_name
diff --git a/gas/as.h b/gas/as.h
index ba2fb7dd81e..9ff8bb8891c 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -477,15 +477,15 @@ void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
void sprint_value (char *, addressT);
int had_errors (void);
int had_warnings (void);
-void as_warn_value_out_of_range (char *, offsetT, offsetT, offsetT,
+void as_warn_value_out_of_range (const char *, offsetT, offsetT, offsetT,
const char *, unsigned);
-void as_bad_value_out_of_range (char *, offsetT, offsetT, offsetT,
+void as_bad_value_out_of_range (const char *, offsetT, offsetT, offsetT,
const char *, unsigned);
void print_version_id (void);
char * app_push (void);
char * atof_ieee (char *, int, LITTLENUM_TYPE *);
-char * ieee_md_atof (int, char *, int *, bfd_boolean);
-char * vax_md_atof (int, char *, int *);
+const char * ieee_md_atof (int, char *, int *, bfd_boolean);
+const char * vax_md_atof (int, char *, int *);
char * input_scrub_include_file (const char *, char *);
void input_scrub_insert_line (const char *);
void input_scrub_insert_file (char *);
diff --git a/gas/cgen.c b/gas/cgen.c
index 41eaa557240..c04a92187fe 100644
--- a/gas/cgen.c
+++ b/gas/cgen.c
@@ -37,7 +37,7 @@ static unsigned long gas_cgen_encode_addend
const unsigned long, const unsigned long, const unsigned long, \
const unsigned long);
-static char * weak_operand_overflow_check
+static const char * weak_operand_overflow_check
(const expressionS *, const CGEN_OPERAND *);
static void queue_fixup_recursively
@@ -748,7 +748,7 @@ gas_cgen_encode_addend (const unsigned long start, /* in bits */
overflow, so signal it by returning an error string. Any other case is
ambiguous, so we assume it's OK and return NULL. */
-static char *
+static const char *
weak_operand_overflow_check (const expressionS * exp,
const CGEN_OPERAND * operand)
{
diff --git a/gas/config/atof-ieee.c b/gas/config/atof-ieee.c
index 92c367dd244..636549e0384 100644
--- a/gas/config/atof-ieee.c
+++ b/gas/config/atof-ieee.c
@@ -710,7 +710,7 @@ extern const char FLT_CHARS[];
An error message is returned, or a NULL pointer if everything went OK. */
-char *
+const char *
ieee_md_atof (int type,
char *litP,
int *sizeP,
diff --git a/gas/config/atof-vax.c b/gas/config/atof-vax.c
index 7c0539029b9..8ca80b0ef8f 100644
--- a/gas/config/atof-vax.c
+++ b/gas/config/atof-vax.c
@@ -387,7 +387,7 @@ flonum_gen2vax (int format_letter, /* One of 'd' 'f' 'g' 'h'. */
#define MAXIMUM_NUMBER_OF_LITTLENUMS 8 /* For .hfloats. */
-char *
+const char *
vax_md_atof (int what_statement_type,
char *literalP,
int *sizeP)
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 40c6e352746..1d07d4b7d6a 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -815,7 +815,8 @@ obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *is_clone)
}
default:
{
- char *bad_msg = _("unrecognized .section attribute: want a,e,w,x,M,S,G,T or number");
+ const char *bad_msg = _("unrecognized .section attribute:"
+ " want a,e,w,x,M,S,G,T or number");
#ifdef md_elf_section_letter
bfd_vma md_attr = md_elf_section_letter (*str, &bad_msg);
if (md_attr != (bfd_vma) -1)
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 0e00259f44e..14b60115103 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -573,7 +573,7 @@ my_get_expression (expressionS * ep, char **str, int prefix_mode,
of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 5fa140387fd..5fe9cb69dda 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -578,7 +578,7 @@ static void assemble_insn (const struct alpha_opcode *, const expressionS *, int
static void emit_insn (struct alpha_insn *);
static void assemble_tokens (const char *, const expressionS *, int, int);
#ifdef OBJ_EVAX
-static char *s_alpha_section_name (void);
+static const char *s_alpha_section_name (void);
static symbolS *add_to_link_pool (symbolS *, offsetT);
#endif
@@ -3552,7 +3552,7 @@ s_alpha_comm (int ignore ATTRIBUTE_UNUSED)
The symbol is effectively an alias for the section name. */
segT sec;
- char *sec_name;
+ const char *sec_name;
symbolS *sec_symbol;
segT current_seg = now_seg;
subsegT current_subseg = now_subseg;
@@ -4184,7 +4184,7 @@ alpha_cfi_frame_initial_instructions (void)
#ifdef OBJ_EVAX
/* Get name of section. */
-static char *
+static const char *
s_alpha_section_name (void)
{
char *name;
@@ -4292,13 +4292,14 @@ s_alpha_section_word (char *str, size_t len)
#define EVAX_SECTION_COUNT 5
-static char *section_name[EVAX_SECTION_COUNT + 1] =
+static const char *section_name[EVAX_SECTION_COUNT + 1] =
{ "NULL", ".rdata", ".comm", ".link", ".ctors", ".dtors" };
static void
s_alpha_section (int secid)
{
- char *name, *beg;
+ const char *name;
+ char *beg;
segT sec;
flagword vms_flags = 0;
symbolS *symbol;
@@ -5340,7 +5341,7 @@ select_gp_value (void)
/* Map 's' to SHF_ALPHA_GPREL. */
bfd_vma
-alpha_elf_section_letter (int letter, char **ptr_msg)
+alpha_elf_section_letter (int letter, const char **ptr_msg)
{
if (letter == 's')
return SHF_ALPHA_GPREL;
@@ -5579,10 +5580,10 @@ md_section_align (segT seg, valueT size)
of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
- extern char *vax_md_atof (int, char *, int *);
+ extern const char *vax_md_atof (int, char *, int *);
switch (type)
{
diff --git a/gas/config/tc-alpha.h b/gas/config/tc-alpha.h
index 326f23b7858..1a7badcd754 100644
--- a/gas/config/tc-alpha.h
+++ b/gas/config/tc-alpha.h
@@ -122,7 +122,7 @@ extern void alpha_frob_file_before_adjust (void);
#ifdef OBJ_ELF
#define md_elf_section_letter alpha_elf_section_letter
-extern bfd_vma alpha_elf_section_letter (int, char **);
+extern bfd_vma alpha_elf_section_letter (int, const char **);
#define md_elf_section_flags alpha_elf_section_flags
extern flagword alpha_elf_section_flags (flagword, bfd_vma, int);
#endif
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 3f4e2d38085..f3f7e26615b 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -2848,7 +2848,7 @@ md_undefined_symbol (char *name)
of LITTLENUMS emitted is stored in *sizeP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 2c42a134d70..2ccc053c15d 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -1077,7 +1077,7 @@ my_get_expression (expressionS * ep, char ** str, int prefix_mode)
??? The format of 12 byte floats is uncertain according to gcc's arm.h. */
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
int prec;
diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c
index b35061ef88b..852002f2f63 100644
--- a/gas/config/tc-avr.c
+++ b/gas/config/tc-avr.c
@@ -628,7 +628,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return NULL;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c
index 6dce28c16e2..caa89c6d6ae 100644
--- a/gas/config/tc-bfin.c
+++ b/gas/config/tc-bfin.c
@@ -798,7 +798,7 @@ md_section_align (segT segment, valueT size)
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c
index 45201caa6ac..119f13001e0 100644
--- a/gas/config/tc-cr16.c
+++ b/gas/config/tc-cr16.c
@@ -715,7 +715,7 @@ md_show_usage (FILE *stream ATTRIBUTE_UNUSED)
return;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c
index 89343f01dd9..536e6cbeb13 100644
--- a/gas/config/tc-cris.c
+++ b/gas/config/tc-cris.c
@@ -3591,7 +3591,7 @@ cris_get_reloc_suffix (char **cPP, bfd_reloc_code_real_type *relocp,
code as assembly code, but if they do, they should be able enough to
find out the correct bit patterns and use them. */
-char *
+const char *
md_atof (int type ATTRIBUTE_UNUSED, char *litp ATTRIBUTE_UNUSED,
int *sizep ATTRIBUTE_UNUSED)
{
diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c
index 40a28064fa1..7c8d7ed099b 100644
--- a/gas/config/tc-crx.c
+++ b/gas/config/tc-crx.c
@@ -464,7 +464,7 @@ md_show_usage (FILE *stream ATTRIBUTE_UNUSED)
return;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c
index f7f213a87d6..e2a2caabb72 100644
--- a/gas/config/tc-d10v.c
+++ b/gas/config/tc-d10v.c
@@ -251,7 +251,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return 0;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c
index 81051f09712..ae870eee5ea 100644
--- a/gas/config/tc-d30v.c
+++ b/gas/config/tc-d30v.c
@@ -285,7 +285,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return 0;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c
index 970e297b94a..a806fe60d63 100644
--- a/gas/config/tc-dlx.c
+++ b/gas/config/tc-dlx.c
@@ -974,7 +974,7 @@ md_assemble (char *str)
but I'm not sure. Dlx will not use it anyway, so I just leave it
here for now. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-epiphany.c b/gas/config/tc-epiphany.c
index 132a78ff565..f35198e4e8b 100644
--- a/gas/config/tc-epiphany.c
+++ b/gas/config/tc-epiphany.c
@@ -1012,7 +1012,7 @@ md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED,
/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-fr30.c b/gas/config/tc-fr30.c
index ad3ffd0e2b1..058733b4b8a 100644
--- a/gas/config/tc-fr30.c
+++ b/gas/config/tc-fr30.c
@@ -317,7 +317,7 @@ md_number_to_chars (char * buf, valueT val, int n)
number_to_chars_bigendian (buf, val, n);
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-frv.c b/gas/config/tc-frv.c
index 24baa96364a..61d17a781b3 100644
--- a/gas/config/tc-frv.c
+++ b/gas/config/tc-frv.c
@@ -1513,7 +1513,7 @@ frv_md_number_to_chars (char *buf, valueT val, int n)
number_to_chars_bigendian (buf, val, n);
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-ft32.c b/gas/config/tc-ft32.c
index 327b393fdba..56c0a682a6e 100644
--- a/gas/config/tc-ft32.c
+++ b/gas/config/tc-ft32.c
@@ -408,7 +408,7 @@ md_assemble (char *str)
of LITTLENUMS emitted is stored in *SIZEP . An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int prec;
diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c
index f50f4976f09..edca456c5ce 100644
--- a/gas/config/tc-h8300.c
+++ b/gas/config/tc-h8300.c
@@ -2101,7 +2101,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
/* Various routines to kill one day. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index c2001bd66ae..82d33c2b7f0 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -350,7 +350,7 @@ typedef struct space_dictionary_chain sd_chain_struct;
struct default_subspace_dict
{
/* Name of the subspace. */
- char *name;
+ const char *name;
/* FIXME. Is this still needed? */
char defined;
@@ -403,7 +403,7 @@ struct default_subspace_dict
struct default_space_dict
{
/* Name of the space. */
- char *name;
+ const char *name;
/* Space number. It is possible to identify spaces within
assembly code numerically! */
@@ -503,27 +503,27 @@ static void pa_align (int);
static void pa_space (int);
static void pa_spnum (int);
static void pa_subspace (int);
-static sd_chain_struct *create_new_space (char *, int, int,
- int, int, int,
- asection *, int);
+static sd_chain_struct *create_new_space (const char *, int, int,
+ int, int, int,
+ asection *, int);
static ssd_chain_struct *create_new_subspace (sd_chain_struct *,
- char *, int, int,
- int, int, int, int,
- int, int, int, int,
- int, asection *);
+ const char *, int, int,
+ int, int, int, int,
+ int, int, int, int,
+ int, asection *);
static ssd_chain_struct *update_subspace (sd_chain_struct *,
- char *, int, int, int,
- int, int, int, int,
- int, int, int, int,
- asection *);
-static sd_chain_struct *is_defined_space (char *);
-static ssd_chain_struct *is_defined_subspace (char *);
+ char *, int, int, int,
+ int, int, int, int,
+ int, int, int, int,
+ asection *);
+static sd_chain_struct *is_defined_space (const char *);
+static ssd_chain_struct *is_defined_subspace (const char *);
static sd_chain_struct *pa_segment_to_space (asection *);
static ssd_chain_struct *pa_subsegment_to_subspace (asection *,
subsegT);
static sd_chain_struct *pa_find_space_by_number (int);
static unsigned int pa_subspace_start (sd_chain_struct *, int);
-static sd_chain_struct *pa_parse_space_stmt (char *, int);
+static sd_chain_struct *pa_parse_space_stmt (const char *, int);
#endif
/* File and globally scoped variable declarations. */
@@ -1319,7 +1319,7 @@ pa_parse_nullif (char **s)
return nullif;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
@@ -7080,7 +7080,7 @@ pa_check_current_space_and_subspace (void)
by the parameters to the .SPACE directive. */
static sd_chain_struct *
-pa_parse_space_stmt (char *space_name, int create_flag)
+pa_parse_space_stmt (const char *space_name, int create_flag)
{
char *name, *ptemp, c;
char loadable, defined, private, sort;
@@ -7590,7 +7590,7 @@ pa_spaces_begin (void)
i = 0;
while (pa_def_spaces[i].name)
{
- char *name;
+ const char *name;
/* Pick the right name to use for the new section. */
name = pa_def_spaces[i].name;
@@ -7606,7 +7606,7 @@ pa_spaces_begin (void)
i = 0;
while (pa_def_subspaces[i].name)
{
- char *name;
+ const char *name;
int applicable, subsegment;
asection *segment = NULL;
sd_chain_struct *space;
@@ -7707,7 +7707,7 @@ pa_spaces_begin (void)
by the given parameters. */
static sd_chain_struct *
-create_new_space (char *name,
+create_new_space (const char *name,
int spnum,
int loadable ATTRIBUTE_UNUSED,
int defined,
@@ -7789,7 +7789,7 @@ create_new_space (char *name,
static ssd_chain_struct *
create_new_subspace (sd_chain_struct *space,
- char *name,
+ const char *name,
int loadable ATTRIBUTE_UNUSED,
int code_only ATTRIBUTE_UNUSED,
int comdat,
@@ -7893,7 +7893,7 @@ update_subspace (sd_chain_struct *space,
NULL if no such space exists. */
static sd_chain_struct *
-is_defined_space (char *name)
+is_defined_space (const char *name)
{
sd_chain_struct *chain_pointer;
@@ -7942,7 +7942,7 @@ pa_segment_to_space (asection *seg)
own subspace. */
static ssd_chain_struct *
-is_defined_subspace (char *name)
+is_defined_subspace (const char *name)
{
sd_chain_struct *space_chain;
ssd_chain_struct *subspace_chain;
diff --git a/gas/config/tc-i370.c b/gas/config/tc-i370.c
index 1b419e82a91..7e2f146d04f 100644
--- a/gas/config/tc-i370.c
+++ b/gas/config/tc-i370.c
@@ -2352,7 +2352,7 @@ i370_tc (int ignore ATTRIBUTE_UNUSED)
}
}
-char *
+const char *
md_atof (int type, char *litp, int *sizep)
{
/* 360/370/390 have two float formats: an old, funky 360 single-precision
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 55ca5c3d7dd..ce5304d868e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -9378,7 +9378,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
md_number_to_chars (p, value, fixP->fx_size);
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
/* This outputs the LITTLENUMs in REVERSE order;
@@ -10781,7 +10781,7 @@ tc_pe_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
/* For ELF on x86-64, add support for SHF_X86_64_LARGE. */
bfd_vma
-x86_64_section_letter (int letter, char **ptr_msg)
+x86_64_section_letter (int letter, const char **ptr_msg)
{
if (flag_code == CODE_64BIT)
{
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 006dacbe162..7a987d8f76d 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -310,7 +310,7 @@ extern void i386_solaris_fix_up_eh_frame (segT);
/* Support for SHF_X86_64_LARGE */
extern bfd_vma x86_64_section_word (char *, size_t);
-extern bfd_vma x86_64_section_letter (int, char **);
+extern bfd_vma x86_64_section_letter (int, const char **);
#define md_elf_section_letter(LETTER, PTR_MSG) x86_64_section_letter (LETTER, PTR_MSG)
#define md_elf_section_word(STR, LEN) x86_64_section_word (STR, LEN)
diff --git a/gas/config/tc-i860.c b/gas/config/tc-i860.c
index ea21669273e..85855e995db 100644
--- a/gas/config/tc-i860.c
+++ b/gas/config/tc-i860.c
@@ -53,7 +53,7 @@ static char reg_prefix;
struct i860_it
{
- char *error;
+ const char *error;
unsigned long opcode;
enum expand_type expand;
struct i860_fi
@@ -1010,7 +1010,7 @@ i860_get_expression (char *str)
return 0;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-i960.c b/gas/config/tc-i960.c
index 667ab4cf24f..1335da107ca 100644
--- a/gas/config/tc-i960.c
+++ b/gas/config/tc-i960.c
@@ -1707,7 +1707,7 @@ md_number_to_chars (char *buf,
number_to_chars_littleendian (buf, value, n);
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index a50b61e3b7c..8da09e0d58b 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -856,7 +856,7 @@ set_section (char *name)
/* Map 's' to SHF_IA_64_SHORT. */
bfd_vma
-ia64_elf_section_letter (int letter, char **ptr_msg)
+ia64_elf_section_letter (int letter, const char **ptr_msg)
{
if (letter == 's')
return SHF_IA_64_SHORT;
@@ -11576,7 +11576,7 @@ tc_gen_reloc (asection *sec ATTRIBUTE_UNUSED, fixS *fixp)
#define MAX_LITTLENUMS 5
-char *
+const char *
md_atof (int type, char *lit, int *size)
{
LITTLENUM_TYPE words[MAX_LITTLENUMS];
diff --git a/gas/config/tc-ia64.h b/gas/config/tc-ia64.h
index 4858c278b62..dcf07ec1901 100644
--- a/gas/config/tc-ia64.h
+++ b/gas/config/tc-ia64.h
@@ -110,7 +110,7 @@ extern void ia64_cons_fix_new (fragS *, int, int, expressionS *,
bfd_reloc_code_real_type);
extern void ia64_validate_fix (struct fix *);
extern char * ia64_canonicalize_symbol_name (char *);
-extern bfd_vma ia64_elf_section_letter (int, char **);
+extern bfd_vma ia64_elf_section_letter (int, const char **);
extern flagword ia64_elf_section_flags (flagword, bfd_vma, int);
extern int ia64_elf_section_type (const char *, size_t);
extern long ia64_pcrel_from_section (struct fix *, segT);
diff --git a/gas/config/tc-ip2k.c b/gas/config/tc-ip2k.c
index 7e4d351710e..642dfea089a 100644
--- a/gas/config/tc-ip2k.c
+++ b/gas/config/tc-ip2k.c
@@ -311,7 +311,7 @@ md_number_to_chars (char * buf, valueT val, int n)
number_to_chars_bigendian (buf, val, n);
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-iq2000.c b/gas/config/tc-iq2000.c
index c5ccfcac57f..f1f7945c59d 100644
--- a/gas/config/tc-iq2000.c
+++ b/gas/config/tc-iq2000.c
@@ -724,7 +724,7 @@ md_operand (expressionS * exp)
gas_cgen_md_operand (exp);
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-lm32.c b/gas/config/tc-lm32.c
index a20b9a0351c..5f7d7032a81 100644
--- a/gas/config/tc-lm32.c
+++ b/gas/config/tc-lm32.c
@@ -214,7 +214,7 @@ md_number_to_chars (char * buf, valueT val, int n)
of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int i;
diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c
index 5496f7e948d..0219d9bd8e3 100644
--- a/gas/config/tc-m32c.c
+++ b/gas/config/tc-m32c.c
@@ -1155,7 +1155,7 @@ md_number_to_chars (char * buf, valueT val, int n)
/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c
index 89205f8142a..126ab9c2de4 100644
--- a/gas/config/tc-m32r.c
+++ b/gas/config/tc-m32r.c
@@ -2106,7 +2106,7 @@ md_number_to_chars (char *buf, valueT val, int n)
/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c
index 71fdb2670e6..c61bdedfa2b 100644
--- a/gas/config/tc-m68hc11.c
+++ b/gas/config/tc-m68hc11.c
@@ -574,7 +574,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return 0;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index b89f0a97c9b..f1488459177 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -4879,7 +4879,7 @@ m68k_mri_mode_change (int on)
}
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c
index dc5c95d0859..67d1ea8e29d 100644
--- a/gas/config/tc-mcore.c
+++ b/gas/config/tc-mcore.c
@@ -1616,7 +1616,7 @@ md_mcore_end (void)
/* Various routines to kill one day. */
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-mep.c b/gas/config/tc-mep.c
index 6b659d47649..6e62ad50fe1 100644
--- a/gas/config/tc-mep.c
+++ b/gas/config/tc-mep.c
@@ -2039,7 +2039,7 @@ md_number_to_chars (char *buf, valueT val, int n)
number_to_chars_littleendian (buf, val, n);
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
@@ -2080,7 +2080,7 @@ mep_fix_adjustable (fixS *fixP)
}
bfd_vma
-mep_elf_section_letter (int letter, char **ptrmsg)
+mep_elf_section_letter (int letter, const char **ptrmsg)
{
if (letter == 'v')
return SHF_MEP_VLIW;
diff --git a/gas/config/tc-mep.h b/gas/config/tc-mep.h
index c771c21d5fe..b711889708e 100644
--- a/gas/config/tc-mep.h
+++ b/gas/config/tc-mep.h
@@ -106,7 +106,7 @@ extern int mep_unrecognized_line (int);
extern void mep_cleanup (void);
#define md_elf_section_letter mep_elf_section_letter
-extern bfd_vma mep_elf_section_letter (int, char **);
+extern bfd_vma mep_elf_section_letter (int, const char **);
#define md_elf_section_flags mep_elf_section_flags
extern flagword mep_elf_section_flags (flagword, bfd_vma, int);
diff --git a/gas/config/tc-metag.c b/gas/config/tc-metag.c
index d28738719a4..cc9140bbd8c 100644
--- a/gas/config/tc-metag.c
+++ b/gas/config/tc-metag.c
@@ -6707,7 +6707,7 @@ md_number_to_chars (char * buf, valueT val, int n)
/* Equal to MAX_PRECISION in atof-ieee.c */
#define MAX_LITTLENUMS 6
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
int i;
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index a92e0ebdbe1..e720ee82d63 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -1758,7 +1758,7 @@ md_undefined_symbol (char * name ATTRIBUTE_UNUSED)
/* Turn a string in input_line_pointer into a floating point constant of type
type, and store the appropriate bytes in *litP. The number of LITTLENUMS
emitted is stored in *sizeP. An error message is returned, or NULL on OK.*/
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
int prec;
diff --git a/gas/config/tc-microblaze.h b/gas/config/tc-microblaze.h
index 0fde831f906..f298a2a9d8a 100644
--- a/gas/config/tc-microblaze.h
+++ b/gas/config/tc-microblaze.h
@@ -100,7 +100,6 @@ extern const struct relax_type md_relax_table[];
extern void md_begin (void);
extern void md_assemble (char *);
extern symbolS * md_undefined_symbol (char *);
-extern char * md_atof (int, char *, int *);
extern void md_show_usage (FILE *);
extern void md_convert_frag (bfd *, segT, fragS *);
extern void md_operand (expressionS *);
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index f2b81f24f28..ca1098b7c17 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -3042,7 +3042,8 @@ mips_parse_base_start (char *s)
static char *
mips_parse_argument_token (char *s, char float_format)
{
- char *end, *save_in, *err;
+ char *end, *save_in;
+ const char *err;
unsigned int regno1, regno2, channels;
struct mips_operand_token token;
@@ -13996,7 +13997,7 @@ my_getExpression (expressionS *ep, char *str)
input_line_pointer = save_in;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c
index 00543f44c4d..2400a0b492b 100644
--- a/gas/config/tc-mmix.c
+++ b/gas/config/tc-mmix.c
@@ -2272,7 +2272,7 @@ md_estimate_size_before_relax (fragS *fragP, segT segment)
emitted is stored in *sizeP . An error message is returned, or NULL on
OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
if (type == 'r')
diff --git a/gas/config/tc-mn10200.c b/gas/config/tc-mn10200.c
index ea2fa8f0f32..2cdfa68fa0f 100644
--- a/gas/config/tc-mn10200.c
+++ b/gas/config/tc-mn10200.c
@@ -314,7 +314,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return 0;
}
-char *
+const char *
md_atof (int type, char *litp, int *sizep)
{
return ieee_md_atof (type, litp, sizep, FALSE);
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index 4f76677af5e..9a5d3bed5dc 100644
--- a/gas/config/tc-mn10300.c
+++ b/gas/config/tc-mn10300.c
@@ -455,7 +455,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return 0;
}
-char *
+const char *
md_atof (int type, char *litp, int *sizep)
{
return ieee_md_atof (type, litp, sizep, FALSE);
diff --git a/gas/config/tc-moxie.c b/gas/config/tc-moxie.c
index aa48c997822..24c9aec05aa 100644
--- a/gas/config/tc-moxie.c
+++ b/gas/config/tc-moxie.c
@@ -556,7 +556,7 @@ md_assemble (char *str)
of LITTLENUMS emitted is stored in *SIZEP . An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int prec;
diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c
index 98910aa515f..3621fdb42ad 100644
--- a/gas/config/tc-msp430.c
+++ b/gas/config/tc-msp430.c
@@ -1630,7 +1630,7 @@ extract_cmd (char * from, char * to, int limit)
return from;
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-mt.c b/gas/config/tc-mt.c
index c9aa18cd931..e0bca886694 100644
--- a/gas/config/tc-mt.c
+++ b/gas/config/tc-mt.c
@@ -433,7 +433,7 @@ md_number_to_chars (char * buf, valueT val, int n)
number_to_chars_bigendian (buf, val, n);
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c
index 0d7d3465c43..897561d7e0f 100644
--- a/gas/config/tc-nds32.c
+++ b/gas/config/tc-nds32.c
@@ -6064,7 +6064,7 @@ md_number_to_chars (char *buf, valueT val, int n)
/* This function is called to convert an ASCII string into a floating point
value in format used by the CPU. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int i;
diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c
index 399fcf0810a..bf37ff7fdba 100644
--- a/gas/config/tc-nios2.c
+++ b/gas/config/tc-nios2.c
@@ -264,7 +264,7 @@ md_number_to_chars (char *buf, valueT val, int n)
of type TYPE, and store the appropriate bytes in *LITP. The number
of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int prec;
@@ -3980,7 +3980,7 @@ nios2_cons_align (int size)
/* Map 's' to SHF_NIOS2_GPREL. */
/* This is from the Alpha code tc-alpha.c. */
int
-nios2_elf_section_letter (int letter, char **ptr_msg)
+nios2_elf_section_letter (int letter, const char **ptr_msg)
{
if (letter == 's')
return SHF_NIOS2_GPREL;
diff --git a/gas/config/tc-nios2.h b/gas/config/tc-nios2.h
index 05cc59621b5..3612c33f72e 100644
--- a/gas/config/tc-nios2.h
+++ b/gas/config/tc-nios2.h
@@ -92,7 +92,7 @@ extern long nios2_relax_frag (segT segment, fragS * fragP, long stretch);
/* Processor-specific section directives. */
#define md_elf_section_letter nios2_elf_section_letter
-extern int nios2_elf_section_letter (int, char **);
+extern int nios2_elf_section_letter (int, const char **);
#define md_elf_section_flags nios2_elf_section_flags
extern flagword nios2_elf_section_flags (flagword, int, int);
#endif
diff --git a/gas/config/tc-ns32k.c b/gas/config/tc-ns32k.c
index 1f5dbd90cd8..0af829f947a 100644
--- a/gas/config/tc-ns32k.c
+++ b/gas/config/tc-ns32k.c
@@ -1916,7 +1916,7 @@ md_begin (void)
LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-or1k.c b/gas/config/tc-or1k.c
index 0abbd824937..10fd2de7363 100644
--- a/gas/config/tc-or1k.c
+++ b/gas/config/tc-or1k.c
@@ -278,7 +278,7 @@ md_number_to_chars (char * buf, valueT val, int n)
/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-pdp11.c b/gas/config/tc-pdp11.c
index 68e710f491d..529df4f0140 100644
--- a/gas/config/tc-pdp11.c
+++ b/gas/config/tc-pdp11.c
@@ -30,7 +30,7 @@ extern int flonum_gen2vax (int, FLONUM_TYPE * f, LITTLENUM_TYPE *);
/* A representation for PDP-11 machine code. */
struct pdp11_code
{
- char *error;
+ const char *error;
int code;
int additional; /* Is there an additional word? */
int word; /* Additional word, if any. */
@@ -649,7 +649,7 @@ md_assemble (char *instruction_string)
struct pdp11_code insn, op1, op2;
int error;
int size;
- char *err = NULL;
+ const char *err = NULL;
char *str;
char *p;
char c;
@@ -1442,7 +1442,7 @@ pseudo_even (int c ATTRIBUTE_UNUSED)
record_alignment (now_seg, alignment);
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return vax_md_atof (type, litP, sizeP);
diff --git a/gas/config/tc-pj.c b/gas/config/tc-pj.c
index 8f6266f8a1d..6a947fabe64 100644
--- a/gas/config/tc-pj.c
+++ b/gas/config/tc-pj.c
@@ -313,7 +313,7 @@ md_assemble (char *str)
as_bad (_("Something forgot to clean up\n"));
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 89c7bfe45dd..cf4f96e764d 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -6069,7 +6069,7 @@ ppc_frob_section (asection *sec)
#endif /* OBJ_XCOFF */
-char *
+const char *
md_atof (int type, char *litp, int *sizep)
{
return ieee_md_atof (type, litp, sizep, target_big_endian);
diff --git a/gas/config/tc-rl78.c b/gas/config/tc-rl78.c
index d9f723af79d..0ecdb15a8bf 100644
--- a/gas/config/tc-rl78.c
+++ b/gas/config/tc-rl78.c
@@ -533,7 +533,7 @@ rl78_handle_align (fragS * frag)
}
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c
index 22b5e9bb6fa..435d046acb1 100644
--- a/gas/config/tc-rx.c
+++ b/gas/config/tc-rx.c
@@ -1338,7 +1338,7 @@ rx_handle_align (fragS * frag)
}
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 9bcc6423a1c..e2677f72673 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -2034,7 +2034,7 @@ s390_machinemode (int ignore ATTRIBUTE_UNUSED)
#undef MAX_HISTORY
-char *
+const char *
md_atof (int type, char *litp, int *sizep)
{
return ieee_md_atof (type, litp, sizep, TRUE);
diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c
index 536016f75bb..8ea10844721 100644
--- a/gas/config/tc-score.c
+++ b/gas/config/tc-score.c
@@ -61,7 +61,7 @@ static void s3_assemble (char *str);
static void s3_operand (expressionS *);
static void s3_begin (void);
static void s3_number_to_chars (char *buf, valueT val, int n);
-static char *s3_atof (int type, char *litP, int *sizeP);
+static const char *s3_atof (int type, char *litP, int *sizeP);
static void s3_frag_check (fragS * fragp ATTRIBUTE_UNUSED);
static void s3_validate_fix (fixS *fixP);
static int s3_force_relocation (struct fix *fixp);
@@ -6657,7 +6657,7 @@ s3_md_chars_to_number (char *buf, int n)
return result;
}
-static char *
+static const char *
s3_atof (int type, char *litP, int *sizeP)
{
int prec;
@@ -7542,7 +7542,7 @@ md_number_to_chars (char *buf, valueT val, int n)
within the words. For example, (double) 1.1 in big endian mode is
the byte sequence 3f f1 99 99 99 99 99 9a, and in little endian mode is
the byte sequence 99 99 f1 3f 9a 99 99 99. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
if (score3)
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index ef07f10d1d0..3390a409585 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -3089,7 +3089,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
/* Various routines to kill one day. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 9f30d3a552f..952658307eb 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -200,7 +200,7 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
struct sparc_it
{
- char *error;
+ const char *error;
unsigned long opcode;
struct nlist *nlistp;
expressionS exp;
@@ -3234,7 +3234,7 @@ output_insn (const struct sparc_opcode *insn, struct sparc_it *theinsn)
#endif
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-spu.c b/gas/config/tc-spu.c
index b658bea3532..13e5e2da952 100644
--- a/gas/config/tc-spu.c
+++ b/gas/config/tc-spu.c
@@ -716,7 +716,7 @@ get_imm (const char *param, struct spu_insn *insn, int arg)
return param;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-tic30.c b/gas/config/tc-tic30.c
index 4ccb820842a..71c62494226 100644
--- a/gas/config/tc-tic30.c
+++ b/gas/config/tc-tic30.c
@@ -1218,7 +1218,7 @@ md_pcrel_from (fixS *fixP)
return fixP->fx_where - fixP->fx_size + (INSN_SIZE * offset);
}
-char *
+const char *
md_atof (int what_statement_type,
char *literalP,
int *sizeP)
diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c
index a833c525cd3..c44201d004a 100644
--- a/gas/config/tc-tic4x.c
+++ b/gas/config/tc-tic4x.c
@@ -2547,7 +2547,7 @@ tic4x_cleanup (void)
of chars emitted is stored in *sizeP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int prec;
diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c
index 611b537e11d..8c33df44960 100644
--- a/gas/config/tc-tic54x.c
+++ b/gas/config/tc-tic54x.c
@@ -5062,7 +5062,7 @@ tic54x_parse_name (char *name ATTRIBUTE_UNUSED,
return 0;
}
-char *
+const char *
md_atof (int type, char *literalP, int *sizeP)
{
/* Target data is little-endian, but floats are stored
diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c
index 84fd368766f..2135dbf225b 100644
--- a/gas/config/tc-tic6x.c
+++ b/gas/config/tc-tic6x.c
@@ -4078,7 +4078,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
/* Convert a floating-point number to target (IEEE) format. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c
index 4cebfcf4368..bd4293942e5 100644
--- a/gas/config/tc-tilegx.c
+++ b/gas/config/tc-tilegx.c
@@ -1330,7 +1330,7 @@ md_number_to_chars (char * buf, valueT val, int n)
LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int prec;
diff --git a/gas/config/tc-tilepro.c b/gas/config/tc-tilepro.c
index 1f5890dfa2f..a11b05f0ca6 100644
--- a/gas/config/tc-tilepro.c
+++ b/gas/config/tc-tilepro.c
@@ -1205,7 +1205,7 @@ const pseudo_typeS md_pseudo_table[] =
LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int prec;
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index bd762fb5b83..5b425a97f86 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -1372,7 +1372,7 @@ skip_white_space (void)
and so on upwards. System registers are considered to be very
high numbers. */
-static char *
+static const char *
parse_register_list (unsigned long *insn,
const struct v850_operand *operand)
{
@@ -1670,7 +1670,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return 0;
}
-char *
+const char *
md_atof (int type, char *litp, int *sizep)
{
return ieee_md_atof (type, litp, sizep, FALSE);
diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c
index 89fc6fc5e26..538a9941d58 100644
--- a/gas/config/tc-vax.c
+++ b/gas/config/tc-vax.c
@@ -3403,7 +3403,7 @@ vax_cons_fix_new (fragS *frag, int where, unsigned int nbytes, expressionS *exp,
fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return vax_md_atof (type, litP, sizeP);
diff --git a/gas/config/tc-visium.c b/gas/config/tc-visium.c
index 4ab5fcacad9..c618524de9d 100644
--- a/gas/config/tc-visium.c
+++ b/gas/config/tc-visium.c
@@ -826,7 +826,7 @@ md_begin (void)
/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int i, prec;
diff --git a/gas/config/tc-xc16x.c b/gas/config/tc-xc16x.c
index 5e34e09d49a..1fb964bc7b5 100644
--- a/gas/config/tc-xc16x.c
+++ b/gas/config/tc-xc16x.c
@@ -225,7 +225,7 @@ md_parse_option (int c ATTRIBUTE_UNUSED,
return 0;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-xgate.c b/gas/config/tc-xgate.c
index 5b941588f16..1d68edcd85c 100644
--- a/gas/config/tc-xgate.c
+++ b/gas/config/tc-xgate.c
@@ -193,7 +193,7 @@ struct option md_longopts[] =
size_t md_longopts_size = sizeof(md_longopts);
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c
index 7ad3ea8190c..887160db01d 100644
--- a/gas/config/tc-xstormy16.c
+++ b/gas/config/tc-xstormy16.c
@@ -596,7 +596,7 @@ md_number_to_chars (char * buf, valueT val, int n)
number_to_chars_littleendian (buf, val, n);
}
-char *
+const char *
md_atof (int type, char * litP, int * sizeP)
{
return ieee_md_atof (type, litP, sizeP, FALSE);
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index fe16659fbbb..c00641828ee 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -6073,7 +6073,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, target_big_endian);
diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c
index 2e1dca987a4..7b1e72ab469 100644
--- a/gas/config/tc-z80.c
+++ b/gas/config/tc-z80.c
@@ -384,7 +384,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
return NULL;
}
-char *
+const char *
md_atof (int type ATTRIBUTE_UNUSED, char *litP ATTRIBUTE_UNUSED,
int *sizeP ATTRIBUTE_UNUSED)
{
diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c
index 64fca74595c..6a0d596799e 100644
--- a/gas/config/tc-z8k.c
+++ b/gas/config/tc-z8k.c
@@ -1285,7 +1285,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
/* Various routines to kill one day. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
diff --git a/gas/messages.c b/gas/messages.c
index dc016bf86e6..ad40ca8a246 100644
--- a/gas/messages.c
+++ b/gas/messages.c
@@ -342,13 +342,13 @@ sprint_value (char *buf, valueT val)
#define HEX_MIN_THRESHOLD -(HEX_MAX_THRESHOLD)
static void
-as_internal_value_out_of_range (const char * prefix,
- offsetT val,
- offsetT min,
- offsetT max,
- const char * file,
- unsigned line,
- int bad)
+as_internal_value_out_of_range (const char *prefix,
+ offsetT val,
+ offsetT min,
+ offsetT max,
+ const char *file,
+ unsigned line,
+ int bad)
{
const char * err;
@@ -414,22 +414,22 @@ as_internal_value_out_of_range (const char * prefix,
}
void
-as_warn_value_out_of_range (char * prefix,
- offsetT value,
- offsetT min,
- offsetT max,
- const char * file,
+as_warn_value_out_of_range (const char *prefix,
+ offsetT value,
+ offsetT min,
+ offsetT max,
+ const char *file,
unsigned line)
{
as_internal_value_out_of_range (prefix, value, min, max, file, line, 0);
}
void
-as_bad_value_out_of_range (char * prefix,
- offsetT value,
- offsetT min,
- offsetT max,
- const char * file,
+as_bad_value_out_of_range (const char *prefix,
+ offsetT value,
+ offsetT min,
+ offsetT max,
+ const char *file,
unsigned line)
{
as_internal_value_out_of_range (prefix, value, min, max, file, line, 1);
diff --git a/gas/read.c b/gas/read.c
index 45023cae181..35d44c1aee6 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2136,7 +2136,7 @@ s_errwarn (int err)
self-contained message, one that can be passed like the
demand_copy_C_string return value, and with no assumption on the
location of the name of the directive within the message. */
- char *msg
+ const char *msg
= (err ? _(".error directive invoked in source file")
: _(".warning directive invoked in source file"));
@@ -3541,7 +3541,7 @@ s_float_space (int float_type)
}
else
{
- char *err;
+ const char *err;
err = md_atof (float_type, temp, &flen);
know (flen <= MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT);
@@ -4920,7 +4920,7 @@ float_cons (/* Clobbers input_line-pointer, checks end-of-line. */
{
char *p;
int length; /* Number of chars in an object. */
- char *err; /* Error from scanning floating literal. */
+ const char *err; /* Error from scanning floating literal. */
char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT];
if (is_it_end_of_statement ())
diff --git a/gas/tc.h b/gas/tc.h
index 3683466b32c..51ff4997edb 100644
--- a/gas/tc.h
+++ b/gas/tc.h
@@ -24,7 +24,7 @@
extern const pseudo_typeS md_pseudo_table[];
-char * md_atof (int, char *, int *);
+const char * md_atof (int, char *, int *);
int md_parse_option (int, const char *);
void md_show_usage (FILE *);
void md_assemble (char *);