- struct stat st;
-
- if (bfd_stat (abfd, &st))
- return;
-
- /* Cache the result so that we do not repeatedly stat this file. */
- *filesizep = st.st_size;
- }
-
- /* Compare the size of the section against the size of the file.
- If the section is bigger then the file must be corrupt and
- we should not try dumping it. */
- if (sectsize >= *filesizep)
- return;
-
- mem = xmalloc (sectsize);
-
- if (bfd_get_section_contents (abfd, sect, mem, (file_ptr) 0, sectsize))
- {
- got_a_section = TRUE;
-
- print_strings (filename_and_sizep->filename, NULL, sect->filepos,
- 0, sectsize, (char *) mem);
+ non_fatal (_("%s: Reading section %s failed: %s"),
+ filename, sect->name, bfd_errmsg (bfd_get_error ()));
+ return;