/* BFD back-end for oasys objects.
- Copyright (C) 1990-2014 Free Software Foundation, Inc.
+ Copyright (C) 1990-2016 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
filepos = header.mod_tbl_offset;
for (i = 0; i < header.mod_count; i++)
{
+ oasys_extmodule_table_type_b_type record_ext;
+
if (bfd_seek (abfd, filepos, SEEK_SET) != 0)
return NULL;
/* There are two ways of specifying the archive header. */
- {
- oasys_extmodule_table_type_b_type record_ext;
-
- amt = sizeof (record_ext);
- if (bfd_bread ((void *) &record_ext, amt, abfd) != amt)
- return NULL;
-
- record.mod_size = H_GET_32 (abfd, record_ext.mod_size);
- record.file_offset = H_GET_32 (abfd, record_ext.file_offset);
-
- record.dep_count = H_GET_32 (abfd, record_ext.dep_count);
- record.depee_count = H_GET_32 (abfd, record_ext.depee_count);
- record.sect_count = H_GET_32 (abfd, record_ext.sect_count);
- record.module_name_size = H_GET_32 (abfd,
- record_ext.mod_name_length);
-
- amt = record.module_name_size;
- module[i].name = bfd_alloc (abfd, amt + 1);
- if (!module[i].name)
- return NULL;
- if (bfd_bread ((void *) module[i].name, amt, abfd) != amt)
- return NULL;
- module[i].name[record.module_name_size] = 0;
- filepos += (sizeof (record_ext)
- + record.dep_count * 4
- + record.module_name_size + 1);
- }
+ amt = sizeof (record_ext);
+ if (bfd_bread ((void *) &record_ext, amt, abfd) != amt)
+ return NULL;
+
+ record.mod_size = H_GET_32 (abfd, record_ext.mod_size);
+ record.file_offset = H_GET_32 (abfd, record_ext.file_offset);
+
+ record.dep_count = H_GET_32 (abfd, record_ext.dep_count);
+ record.depee_count = H_GET_32 (abfd, record_ext.depee_count);
+ record.sect_count = H_GET_32 (abfd, record_ext.sect_count);
+ record.module_name_size = H_GET_32 (abfd,
+ record_ext.mod_name_length);
+
+ amt = record.module_name_size;
+ module[i].name = bfd_alloc (abfd, amt + 1);
+ if (!module[i].name)
+ return NULL;
+ if (bfd_bread ((void *) module[i].name, amt, abfd) != amt)
+ return NULL;
+ module[i].name[record.module_name_size] = 0;
+ filepos += (sizeof (record_ext)
+ + record.dep_count * 4
+ + record.module_name_size + 1);
module[i].size = record.mod_size;
module[i].pos = record.file_offset;
return NULL;
}
-static bfd_boolean
-oasys_find_nearest_line (bfd *abfd ATTRIBUTE_UNUSED,
- asection *section ATTRIBUTE_UNUSED,
- asymbol **symbols ATTRIBUTE_UNUSED,
- bfd_vma offset ATTRIBUTE_UNUSED,
- const char **filename_ptr ATTRIBUTE_UNUSED,
- const char **functionname_ptr ATTRIBUTE_UNUSED,
- unsigned int *line_ptr ATTRIBUTE_UNUSED)
-{
- return FALSE;
-}
-
-static bfd_boolean
-oasys_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
- const char **filename_ptr ATTRIBUTE_UNUSED,
- const char **functionname_ptr ATTRIBUTE_UNUSED,
- unsigned int *line_ptr ATTRIBUTE_UNUSED)
-{
- return FALSE;
-}
+#define oasys_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define oasys_find_line _bfd_nosymbols_find_line
+#define oasys_find_inliner_info _bfd_nosymbols_find_inliner_info
static int
oasys_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
#define oasys_bfd_is_local_label_name bfd_generic_is_local_label_name
#define oasys_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define oasys_get_lineno _bfd_nosymbols_get_lineno
+#define oasys_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define oasys_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define oasys_read_minisymbols _bfd_generic_read_minisymbols
#define oasys_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define oasys_section_already_linked _bfd_generic_section_already_linked
#define oasys_bfd_define_common_symbol bfd_generic_define_common_symbol
#define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define oasys_bfd_link_just_syms _bfd_generic_link_just_syms
#define oasys_bfd_copy_link_hash_symbol_type \