aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-04-05 22:50:42 +0000
committerJeff Law <law@redhat.com>1994-04-05 22:50:42 +0000
commitb2452d3918e2612abef7b41c60b76447f25a658b (patch)
tree47598cb38f2fb82388581c5acfe1147a4e031638 /bfd
parent45568424341c52ba7308958710d88ffb80a32043 (diff)
downloadgdb-b2452d3918e2612abef7b41c60b76447f25a658b.zip
gdb-b2452d3918e2612abef7b41c60b76447f25a658b.tar.gz
gdb-b2452d3918e2612abef7b41c60b76447f25a658b.tar.bz2
* som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
Don't free anything if we don't have a bfd_object. (som_close_and_cleanup): Call som_bfd_free_cached_info.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/som.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 434db98..f20ad48 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+Tue Apr 5 15:50:01 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
+ Don't free anything if we don't have a bfd_object.
+ (som_close_and_cleanup): Call som_bfd_free_cached_info.
+
Tue Apr 5 11:22:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* elf32-mips.c (mips_elf_final_link): Don't remove empty sections.
diff --git a/bfd/som.c b/bfd/som.c
index 7c913b1..7d9795b 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -234,6 +234,7 @@ static CONST char *normalize PARAMS ((CONST char *file));
static boolean som_is_space PARAMS ((asection *));
static boolean som_is_subspace PARAMS ((asection *));
static boolean som_is_container PARAMS ((asection *, asection *));
+static boolean som_bfd_free_cached_info PARAMS ((bfd *));
/* Map SOM section names to POSIX/BSD single-character symbol types.
@@ -5457,6 +5458,9 @@ som_bfd_free_cached_info (abfd)
{
asection *o;
+ if (bfd_get_format (abfd) != bfd_object)
+ return true;
+
#define FREE(x) if (x != NULL) { free (x); x = NULL; }
/* Free the native string and symbol tables. */
FREE (obj_som_symtab (abfd));
@@ -5486,7 +5490,7 @@ som_bfd_free_cached_info (abfd)
#define som_slurp_extended_name_table _bfd_slurp_extended_name_table
#define som_get_lineno (struct lineno_cache_entry *(*)())bfd_nullvoidptr
-#define som_close_and_cleanup bfd_generic_close_and_cleanup
+#define som_close_and_cleanup som_bfd_free_cached_info
#define som_bfd_get_relocated_section_contents \
bfd_generic_get_relocated_section_contents