diff options
author | Alan Modra <amodra@gmail.com> | 2019-09-18 15:04:27 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-09-18 21:32:51 +0930 |
commit | 1d38e9d14cc793bca9124d5ed7dc2a6e3122f2e5 (patch) | |
tree | af0c3bdb5483df06b9f1fb399aa40bfdf0c138ce /bfd/bfd-in2.h | |
parent | 90d92a632aaf75ce698335efeb383ddf785c12d8 (diff) | |
download | gdb-1d38e9d14cc793bca9124d5ed7dc2a6e3122f2e5.zip gdb-1d38e9d14cc793bca9124d5ed7dc2a6e3122f2e5.tar.gz gdb-1d38e9d14cc793bca9124d5ed7dc2a6e3122f2e5.tar.bz2 |
Constify target name, reloc name, and carsym name
bfd/
* bfd-in.h (carsym.name): Make const.
* reloc.c (struct reloc_howto_struct.name): Likewise.
* targets.c (bfd_target.name): Likewise.!
* bfd.c (bfd_get_sign_extend_vma): Make variable const.
* som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
when setting carsym.name.
* bfd-in2.h: Regenerate.
gdb/
* amd64-dicos-tdep.c (amd64_dicos_osabi_sniffer): Constify target.
* i386-cygwin-tdep.c (i386_cygwin_init_abi): Likewise.
* i386-dicos-tdep.c (i386_dicos_osabi_sniffer): Likewise.
ld/
* ldlang.c (stricpy, strcut, name_compare): Constify params.
(get_first_input_target): Make return and "target" const.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 13445a1..135c1e5 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -264,7 +264,7 @@ typedef unsigned long symindex; /* This is a type pun with struct ranlib on purpose! */ typedef struct carsym { - char *name; + const char *name; file_ptr file_offset; /* Look here to find the file. */ } carsym; /* To make these you call a carsymogen. */ @@ -2718,7 +2718,7 @@ struct reloc_howto_struct bfd *, char **); /* The textual name of the relocation type. */ - char *name; + const char *name; }; #define HOWTO(type, right, size, bits, pcrel, left, ovf, func, name, \ @@ -7634,7 +7634,7 @@ typedef struct flag_info flag_info; typedef struct bfd_target { /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */ - char *name; + const char *name; /* The "flavour" of a back end is a general indication about the contents of a file. */ |