aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-03-03 00:08:42 +1030
committerAlan Modra <amodra@gmail.com>2020-03-03 00:12:44 +1030
commit40b35c78b62eec2ab41219906a7ea0c0be323499 (patch)
tree396142410fbe8e426380c6b7c90075f5c8a3ddbb /bfd
parent601b73d5003ef804b49dfe42afd0fba0952218de (diff)
downloadfsf-binutils-gdb-40b35c78b62eec2ab41219906a7ea0c0be323499.zip
fsf-binutils-gdb-40b35c78b62eec2ab41219906a7ea0c0be323499.tar.gz
fsf-binutils-gdb-40b35c78b62eec2ab41219906a7ea0c0be323499.tar.bz2
Re: bfd_cleanup for object_p
I hate files that you can't compile. * cisco-core.c (cisco_core_file_p): Return bfd_cleanup. * hpux-core.c (hpux_core_core_file_p): Update prototype. * sco5-core.c (sco5_core_file_p): Return bfd_cleanup. (core_sco5_vec): Correct initialisers.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/cisco-core.c10
-rw-r--r--bfd/hpux-core.c2
-rw-r--r--bfd/sco5-core.c16
4 files changed, 23 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4a64400..1f9e205 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
2020-03-02 Alan Modra <amodra@gmail.com>
+ * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
+ * hpux-core.c (hpux_core_core_file_p): Update prototype.
+ * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
+ (core_sco5_vec): Correct initialisers.
+
+2020-03-02 Alan Modra <amodra@gmail.com>
+
* aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
* aix5ppc-core.c (xcoff64_core_p): Likewise.
* cisco-core.c (cisco_core_file_validate): Likewise.
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c
index e43982b..b733d14 100644
--- a/bfd/cisco-core.c
+++ b/bfd/cisco-core.c
@@ -286,19 +286,19 @@ cisco_core_file_validate (bfd *abfd, int crash_info_loc)
return NULL;
}
-static const bfd_target *
+static bfd_cleanup
cisco_core_file_p (bfd *abfd)
{
int *crash_info_locp;
- const bfd_target *target = NULL;
+ bfd_cleanup cleanup = NULL;
for (crash_info_locp = crash_info_locs;
- *crash_info_locp != -1 && target == NULL;
+ *crash_info_locp != -1 && cleanup == NULL;
crash_info_locp++)
{
- target = cisco_core_file_validate (abfd, *crash_info_locp);
+ cleanup = cisco_core_file_validate (abfd, *crash_info_locp);
}
- return (target);
+ return cleanup;
}
static char *
diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c
index 2b4de9e..2ecd4f1 100644
--- a/bfd/hpux-core.c
+++ b/bfd/hpux-core.c
@@ -106,7 +106,7 @@ struct hpux_core_struct
static asection *make_bfd_asection (bfd *, const char *, flagword,
bfd_size_type, bfd_vma, unsigned int);
-static const bfd_target *hpux_core_core_file_p (bfd *);
+static bfd_cleanup hpux_core_core_file_p (bfd *);
static char *hpux_core_core_file_failing_command (bfd *);
static int hpux_core_core_file_failing_signal (bfd *);
static void swap_abort (void);
diff --git a/bfd/sco5-core.c b/bfd/sco5-core.c
index 84dbf4f..71e264d 100644
--- a/bfd/sco5-core.c
+++ b/bfd/sco5-core.c
@@ -101,7 +101,7 @@ read_uarea (bfd *abfd, int filepos)
return &rawptr->u;
}
-const bfd_cleanup
+bfd_cleanup
sco5_core_file_p (bfd *abfd)
{
int coffset_siz, val, nsecs, cheadoffs;
@@ -172,7 +172,7 @@ sco5_core_file_p (bfd *abfd)
(file_ptr) coffsets.u_stack))
goto fail;
- return abfd->xvec; /* Done for version 1 */
+ return _bfd_no_cleanup; /* Done for version 1 */
}
/* Immediately before coreoffsets region is a long with offset in core
@@ -372,12 +372,16 @@ const bfd_target core_sco5_vec =
sco5_core_file_p /* a core file */
},
{ /* bfd_set_format */
- _bfd_bool_bfd_false_error, bfd_false,
- _bfd_bool_bfd_false_error, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
{ /* bfd_write_contents */
- _bfd_bool_bfd_false_error, bfd_false,
- _bfd_bool_bfd_false_error, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),