/* IBM RS/6000 "XCOFF" back-end for BFD.
- Copyright (C) 1990-2017 Free Software Foundation, Inc.
+ Copyright (C) 1990-2020 Free Software Foundation, Inc.
Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
Archive support from Damon A. Permezel.
Contributed by IBM Corporation and Cygnus Support.
#define CORE_COMMONSZ ((long) &((struct core_dumpx *) 0)->c_entries \
+ sizeof (((struct core_dumpx *) 0)->c_entries))
#else
-#define CORE_COMMONSZ ((int) &((struct core_dump *) 0)->c_entries \
- + sizeof (((struct core_dump *) 0)->c_entries)
+#define CORE_COMMONSZ ((int) &((struct core_dump *) 0)->c_entries \
+ + sizeof (((struct core_dump *) 0)->c_entries))
#endif
/* Define prototypes for certain functions, to avoid a compiler warning
saying that they are missing. */
-const bfd_target * rs6000coff_core_p (bfd *abfd);
+const bfd_cleanup rs6000coff_core_p (bfd *abfd);
bfd_boolean rs6000coff_core_file_matches_executable_p (bfd *core_bfd,
bfd *exec_bfd);
char * rs6000coff_core_file_failing_command (bfd *abfd);
/* Decide if a given bfd represents a `core' file or not. There really is no
magic number or anything like, in rs6000coff. */
-const bfd_target *
+bfd_cleanup
rs6000coff_core_p (bfd *abfd)
{
CoreHdr core;
/* Issue warning if the core file was truncated during writing. */
if (c_flag & CORE_TRUNC)
- _bfd_error_handler (_("%B: warning core file truncated"), abfd);
+ _bfd_error_handler (_("%pB: warning core file truncated"), abfd);
/* Allocate core file header. */
#ifndef BFD64
}
#endif
- return abfd->xvec; /* This is garbage for now. */
+ return _bfd_no_cleanup;
fail:
bfd_release (abfd, abfd->tdata.any);
}
str1 = strrchr (path, '/');
- str2 = strrchr (exec_bfd->filename, '/');
+ str2 = strrchr (bfd_get_filename (exec_bfd), '/');
/* step over character '/' */
str1 = str1 != NULL ? str1 + 1 : path;
- str2 = str2 != NULL ? str2 + 1 : exec_bfd->filename;
+ str2 = str2 != NULL ? str2 + 1 : bfd_get_filename (exec_bfd);
if (strcmp (str1, str2) == 0)
ret = TRUE;