aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-09-18 15:04:27 +0930
committerAlan Modra <amodra@gmail.com>2019-09-18 21:32:51 +0930
commit1d38e9d14cc793bca9124d5ed7dc2a6e3122f2e5 (patch)
treeaf0c3bdb5483df06b9f1fb399aa40bfdf0c138ce /gdb
parent90d92a632aaf75ce698335efeb383ddf785c12d8 (diff)
downloadbinutils-1d38e9d14cc793bca9124d5ed7dc2a6e3122f2e5.zip
binutils-1d38e9d14cc793bca9124d5ed7dc2a6e3122f2e5.tar.gz
binutils-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 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/amd64-dicos-tdep.c2
-rw-r--r--gdb/i386-cygwin-tdep.c2
-rw-r--r--gdb/i386-dicos-tdep.c2
4 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9ad5000..5e0e37b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2019-09-18 Alan Modra <amodra@gmail.com>
+ * 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.
+
+2019-09-18 Alan Modra <amodra@gmail.com>
+
* solib-spu.c (spu_bfd_open): Use bfd_set_filename.
* spu-linux-nat.c (spu_bfd_open): Likewise.
diff --git a/gdb/amd64-dicos-tdep.c b/gdb/amd64-dicos-tdep.c
index e797843..ee91888 100644
--- a/gdb/amd64-dicos-tdep.c
+++ b/gdb/amd64-dicos-tdep.c
@@ -35,7 +35,7 @@ amd64_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
static enum gdb_osabi
amd64_dicos_osabi_sniffer (bfd *abfd)
{
- char *target_name = bfd_get_target (abfd);
+ const char *target_name = bfd_get_target (abfd);
/* On amd64-DICOS, the Load Module's "header" section is 72
bytes. */
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index 1acd379..0e3ba82 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -229,7 +229,7 @@ i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
static enum gdb_osabi
i386_cygwin_osabi_sniffer (bfd *abfd)
{
- char *target_name = bfd_get_target (abfd);
+ const char *target_name = bfd_get_target (abfd);
if (strcmp (target_name, "pei-i386") == 0)
return GDB_OSABI_CYGWIN;
diff --git a/gdb/i386-dicos-tdep.c b/gdb/i386-dicos-tdep.c
index 02af91a..a8c7c04 100644
--- a/gdb/i386-dicos-tdep.c
+++ b/gdb/i386-dicos-tdep.c
@@ -31,7 +31,7 @@ i386_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
static enum gdb_osabi
i386_dicos_osabi_sniffer (bfd *abfd)
{
- char *target_name = bfd_get_target (abfd);
+ const char *target_name = bfd_get_target (abfd);
/* On x86-DICOS, the Load Module's "header" section is 36 bytes. */
if (strcmp (target_name, "elf32-i386") == 0