TARGET_KEEP_SECTION to permit them to retain bfd sections that
GDB would otherwise have discarded.
+Mon Jun 8 16:08:10 1998 Ron Unrau <runrau@cygnus.com>
+
+ * objfiles.c (add_to_objfile_sections): All targets to define
+ TARGET_KEEP_SECTION to permit them to retain bfd sections that
+ GDB would otherwise have discarded.
+
Fri Jun 5 13:56:19 1998 Doug Evans <devans@canuck.cygnus.com>
* dbxread.c (read_dbx_symtab): Don't lower texthigh for last psymtab.
objfile_p_char is a char * to get it through
bfd_map_over_sections; we cast it back to its proper type. */
+#ifndef TARGET_KEEP_SECTION
+#define TARGET_KEEP_SECTION(ASECT) 0
+#endif
+
static void
add_to_objfile_sections (abfd, asect, objfile_p_char)
bfd *abfd;
flagword aflag;
aflag = bfd_get_section_flags (abfd, asect);
- if (!(aflag & SEC_ALLOC))
+
+ if (!(aflag & SEC_ALLOC) && !(TARGET_KEEP_SECTION(asect)))
return;
+
if (0 == bfd_section_size (abfd, asect))
return;
section.offset = 0;