addr[2] = (bfd_byte)(data >> 16);
addr[3] = (bfd_byte)(data >> 24);
}
+\f
+/* Default implementation */
-
-
-
-
-
-
+boolean
+bfd_generic_get_section_contents (abfd, section, location, offset, count)
+ bfd *abfd;
+ sec_ptr section;
+ PTR location;
+ file_ptr offset;
+ int count;
+{
+ if (count == 0)
+ return true;
+ if (offset >= section->size
+ || bfd_seek(abfd, section->filepos + offset, SEEK_SET) == -1
+ || bfd_read(location, 1, count, abfd) != count)
+ return (false); /* on error */
+ return (true);
+}
PROTO (boolean, coff_write_armap, (bfd *arch, unsigned int elength,
struct orl *map, int orl_count, int stridx));
-PROTO ( bfd *,bfd_generic_openr_next_archived_file, (bfd *archive, bfd *last_file));
+PROTO (bfd *, bfd_generic_openr_next_archived_file, (bfd *archive,
+ bfd *last_file));
PROTO(int, bfd_generic_stat_arch_elt, (bfd *, struct stat *));
+PROTO(boolean, bfd_generic_get_section_contents,
+ (bfd *abfd, sec_ptr section, PTR location, file_ptr offset, int count));
+
/* Macros to tell if bfds are read or write enabled.
Note that bfds open for read may be scribbled into if the fd passed