Move arm_apcs_32 extern declaration to header
[deliverable/binutils-gdb.git] / bfd / plugin.c
index 8cb44ceb5dab6b5712c501595b8f9c7cd60a0a51..ca26005055e6419455df126c737f40c1b9702ec1 100644 (file)
@@ -102,6 +102,7 @@ dlerror (void)
 #define bfd_plugin_bfd_lookup_section_flags          bfd_generic_lookup_section_flags
 #define bfd_plugin_bfd_merge_sections                bfd_generic_merge_sections
 #define bfd_plugin_bfd_is_group_section                      bfd_generic_is_group_section
+#define bfd_plugin_bfd_group_name                    bfd_generic_group_name
 #define bfd_plugin_bfd_discard_group                 bfd_generic_discard_group
 #define bfd_plugin_section_already_linked            _bfd_generic_section_already_linked
 #define bfd_plugin_bfd_define_common_symbol          bfd_generic_define_common_symbol
@@ -262,7 +263,9 @@ try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p)
        }
     }
 
-  plugin_list_iter = (struct plugin_list_entry *) xmalloc (sizeof *plugin_list_iter);
+  plugin_list_iter = bfd_malloc (sizeof *plugin_list_iter);
+  if (plugin_list_iter == NULL)
+    return 0;
   plugin_list_iter->handle = plugin_handle;
   plugin_list_iter->claim_file = NULL;
   plugin_list_iter->next = plugin_list;
@@ -530,13 +533,13 @@ bfd_plugin_canonicalize_symtab (bfd *abfd,
   struct plugin_data_struct *plugin_data = abfd->tdata.plugin_data;
   long nsyms = plugin_data->nsyms;
   const struct ld_plugin_symbol *syms = plugin_data->syms;
-  static asection fake_section;
-  static asection fake_common_section;
+  static asection fake_section
+    = BFD_FAKE_SECTION (fake_section, NULL, "plug", 0,
+                       SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS);
+  static asection fake_common_section
+    = BFD_FAKE_SECTION (fake_common_section, NULL, "plug", 0, SEC_IS_COMMON);
   int i;
 
-  fake_section.name = ".text";
-  fake_common_section.flags = SEC_IS_COMMON;
-
   for (i = 0; i < nsyms; i++)
     {
       asymbol *s = bfd_alloc (abfd, sizeof (asymbol));
This page took 0.023452 seconds and 4 git commands to generate.