+2016-03-28 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * config/obj-elf.c (obj_elf_section_name): Return const char *.
+ * config/obj-elf.h (obj_elf_section_name): Adjust.
+ * config/tc-aarch64.c (aarch64_parse_features): Likewise.
+ (aarch64_parse_cpu): Likewise.
+ (aarch64_parse_arch): Likewise.
+ * config/tc-arm.c (arm_parse_extension): Likewise.
+ (arm_parse_cpu): Likewise.
+ (arm_parse_arch): Likewise.
+ * config/tc-nds32.c: Likewise.
+ * config/xtensa-relax.c (parse_special_fn): Likewise.
+ * stabs.c (generate_asm_file): Likewise.
+
2016-03-25 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-cr16.c (cr16_assemble): New function.
}
/* Get name of section. */
-char *
+const char *
obj_elf_section_name (void)
{
char *name;
void
obj_elf_section (int push)
{
- char *name, *group_name, *beg;
+ const char *name, *group_name;
+ char *beg;
int type, dummy;
bfd_vma attr;
int entsize;
extern void obj_elf_section_change_hook (void);
extern void obj_elf_section (int);
-extern char * obj_elf_section_name (void);
+extern const char * obj_elf_section_name (void);
extern void obj_elf_previous (int);
extern void obj_elf_version (int);
extern void obj_elf_common (int);
};
static int
-aarch64_parse_features (char *str, const aarch64_feature_set **opt_p,
+aarch64_parse_features (const char *str, const aarch64_feature_set **opt_p,
bfd_boolean ext_only)
{
/* We insist on extensions being added before being removed. We achieve
while (str != NULL && *str != 0)
{
const struct aarch64_option_cpu_value_table *opt;
- char *ext = NULL;
+ const char *ext = NULL;
int optlen;
if (!ext_only)
aarch64_parse_cpu (char *str)
{
const struct aarch64_cpu_option_table *opt;
- char *ext = strchr (str, '+');
+ const char *ext = strchr (str, '+');
size_t optlen;
if (ext != NULL)
aarch64_parse_arch (char *str)
{
const struct aarch64_arch_option_table *opt;
- char *ext = strchr (str, '+');
+ const char *ext = strchr (str, '+');
size_t optlen;
if (ext != NULL)
};
static bfd_boolean
-arm_parse_extension (char *str, const arm_feature_set **opt_p)
+arm_parse_extension (const char *str, const arm_feature_set **opt_p)
{
arm_feature_set *ext_set = (arm_feature_set *)
xmalloc (sizeof (arm_feature_set));
while (str != NULL && *str != 0)
{
- char *ext;
+ const char *ext;
size_t len;
if (*str != '+')
arm_parse_cpu (char *str)
{
const struct arm_cpu_option_table *opt;
- char *ext = strchr (str, '+');
+ const char *ext = strchr (str, '+');
size_t len;
if (ext != NULL)
arm_parse_arch (char *str)
{
const struct arm_arch_option_table *opt;
- char *ext = strchr (str, '+');
+ const char *ext = strchr (str, '+');
size_t len;
if (ext != NULL)
}
static struct nds32_pseudo_opcode *
-nds32_lookup_pseudo_opcode (char *str)
+nds32_lookup_pseudo_opcode (const char *str)
{
int i = 0;
/* Assume pseudo-opcode are less than 16-char in length. */
/* Check X_md to transform relocation. */
static fixS*
-nds32_elf_record_fixup_exp (fragS *fragP, char *str,
+nds32_elf_record_fixup_exp (fragS *fragP, const char *str,
const struct nds32_field *fld,
expressionS *pexp, char* out,
struct nds32_asm_insn *insn)
/* Check instruction if it can be used for the baseline. */
static bfd_boolean
-nds32_check_insn_available (struct nds32_asm_insn insn, char *str)
+nds32_check_insn_available (struct nds32_asm_insn insn, const char *str)
{
int attr = insn.attr & ATTR_ALL;
static int baseline_isa = 0;
const char **fn_name_p,
const char **arg_name_p)
{
- char *p_start;
+ const char *p_start;
const char *p_end;
p_start = strchr (name, '(');
while (tmp < file_endp)
{
- char *bslash = strchr (tmp, '\\');
+ const char *bslash = strchr (tmp, '\\');
size_t len = (bslash) ? (size_t) (bslash - tmp + 1) : strlen (tmp);
/* Double all backslashes, since demand_copy_C_string (used by