* exec.c (exec_file_attach): Likewise.
* solib-frv.c (enable_break2): Likewise.
* solib-svr4.c (enable_break): Likewise.
* solib.c (solib_map_sections): Likewise.
* symfile.c (symfile_bfd_open): Likewise.
+2005-06-13 Mark Mitchell <mark@codesourcery.com>
+
+ * corelow.c (core_open): Use bfd_fopen, not bfd_fdopenr.
+ * exec.c (exec_file_attach): Likewise.
+ * solib-frv.c (enable_break2): Likewise.
+ * solib-svr4.c (enable_break): Likewise.
+ * solib.c (solib_map_sections): Likewise.
+ * symfile.c (symfile_bfd_open): Likewise.
+
2005-06-13 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (symfile.o): Add $(exec_h).
if (scratch_chan < 0)
perror_with_name (filename);
- temp_bfd = bfd_fdopenr (filename, gnutarget, scratch_chan);
+ temp_bfd = bfd_fopen (filename, gnutarget,
+ write_files ? FOPEN_RUB : FOPEN_RB,
+ scratch_chan);
if (temp_bfd == NULL)
perror_with_name (filename);
#endif
if (scratch_chan < 0)
perror_with_name (filename);
- exec_bfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan);
+ exec_bfd = bfd_fopen (scratch_pathname, gnutarget,
+ write_files ? FOPEN_RUB : FOPEN_RB,
+ scratch_chan);
if (!exec_bfd)
error (_("\"%s\": could not open as an executable file: %s"),
tmp_fd = solib_open (buf, &tmp_pathname);
if (tmp_fd >= 0)
- tmp_bfd = bfd_fdopenr (tmp_pathname, gnutarget, tmp_fd);
+ tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
if (tmp_bfd == NULL)
{
tmp_fd = solib_open (buf, &tmp_pathname);
if (tmp_fd >= 0)
- tmp_bfd = bfd_fdopenr (tmp_pathname, gnutarget, tmp_fd);
+ tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
if (tmp_bfd == NULL)
goto bkpt_at_symbol;
}
/* Leave scratch_pathname allocated. abfd->name will point to it. */
- abfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan);
+ abfd = bfd_fopen (scratch_pathname, gnutarget, FOPEN_RB, scratch_chan);
if (!abfd)
{
close (scratch_chan);
name = absolute_name; /* Keep 2nd malloc'd copy in bfd */
/* It'll be freed in free_objfile(). */
- sym_bfd = bfd_fdopenr (name, gnutarget, desc);
+ sym_bfd = bfd_fopen (name, gnutarget, FOPEN_RB, desc);
if (!sym_bfd)
{
close (desc);