* tui/tui-file.c:
[deliverable/binutils-gdb.git] / ld / emultempl / beos.em
index 24d4c442105fa6deb2d4025d206acb636e2c8294..220ba5900a3f164a376dcbe4611a9d9d83c5ff07 100644 (file)
@@ -216,23 +216,8 @@ set_pe_subsystem (void)
          set_pe_name ("__subsystem__", v[i].value);
 
          /* If the subsystem is windows, we use a different entry
-            point.  We also register the entry point as an undefined
-            symbol. from lang_add_entry() The reason we do
-            this is so that the user
-            doesn't have to because they would have to use the -u
-            switch if they were specifying an entry point other than
-            _mainCRTStartup.  Specifically, if creating a windows
-            application, entry point _WinMainCRTStartup must be
-            specified.  What I have found for non console
-            applications (entry not _mainCRTStartup) is that the .obj
-            that contains mainCRTStartup is brought in since it is
-            the first encountered in libc.lib and it has other
-            symbols in it which will be pulled in by the link
-            process.  To avoid this, adding -u with the entry point
-            name specified forces the correct .obj to be used.  We
-            can avoid making the user do this by always adding the
-            entry point name as an undefined symbol.  */
-         lang_add_entry (v[i].entry, 1);
+            point.  */
+         lang_default_entry (v[i].entry);
 
          return;
        }
@@ -412,13 +397,13 @@ sort_by_file_name (const void *a, const void *b)
   const lang_statement_union_type *const *rb = b;
   int i, a_sec, b_sec;
 
-  i = strcmp ((*ra)->input_section.ifile->the_bfd->my_archive->filename,
-             (*rb)->input_section.ifile->the_bfd->my_archive->filename);
+  i = strcmp ((*ra)->input_section.section->owner->my_archive->filename,
+             (*rb)->input_section.section->owner->my_archive->filename);
   if (i != 0)
     return i;
 
-  i = strcmp ((*ra)->input_section.ifile->filename,
-                (*rb)->input_section.ifile->filename);
+  i = strcmp ((*ra)->input_section.section->owner->filename,
+                (*rb)->input_section.section->owner->filename);
   if (i != 0)
     return i;
   /* the tail idata4/5 are the only ones without relocs to an
@@ -442,15 +427,15 @@ sort_by_file_name (const void *a, const void *b)
        if ( (strcmp( (*ra)->input_section.section->name, ".idata$6") == 0) )
           return 0; /* don't sort .idata$6 or .idata$7 FIXME dlltool eliminate .idata$7 */
 
-       if (! bfd_get_section_contents ((*ra)->input_section.ifile->the_bfd,
+       if (! bfd_get_section_contents ((*ra)->input_section.section->owner,
          (*ra)->input_section.section, &a_sec, (file_ptr) 0, (bfd_size_type)sizeof(a_sec)))
             einfo ("%F%B: Can't read contents of section .idata: %E\n",
-                 (*ra)->input_section.ifile->the_bfd);
+                 (*ra)->input_section.section->owner);
 
-       if (! bfd_get_section_contents ((*rb)->input_section.ifile->the_bfd,
+       if (! bfd_get_section_contents ((*rb)->input_section.section->owner,
         (*rb)->input_section.section, &b_sec, (file_ptr) 0, (bfd_size_type)sizeof(b_sec) ))
            einfo ("%F%B: Can't read contents of section .idata: %E\n",
-                (*rb)->input_section.ifile->the_bfd);
+                (*rb)->input_section.section->owner);
 
       i =  ((a_sec < b_sec) ? -1 : 0);
       if ( i != 0)
@@ -562,7 +547,7 @@ sort_sections (lang_statement_union_type *s)
                    {
                      lang_statement_union_type *start = *p;
                      if (start->header.type != lang_input_section_enum
-                         || !start->input_section.ifile->the_bfd->my_archive)
+                         || !start->input_section.section->owner->my_archive)
                        p = &(start->header.next);
                      else
                        {
@@ -662,8 +647,7 @@ gld_${EMULATION_NAME}_before_allocation (void)
 
   sort_sections (stat_ptr->head);
 
-  if (!link_info.relocatable)
-    strip_excluded_output_sections ();
+  before_allocation_default ();
 }
 \f
 /* Place an orphan section.  We use this to put sections with a '\$' in them
@@ -678,7 +662,7 @@ gld_${EMULATION_NAME}_before_allocation (void)
    which are not mentioned in the linker script.  */
 
 static bfd_boolean
-gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
+gld${EMULATION_NAME}_place_orphan (asection *s)
 {
   const char *secname;
   char *output_secname, *ps;
@@ -738,7 +722,7 @@ gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s)
      The sections still have to be sorted, but that has to wait until
      all such sections have been processed by us.  The sorting is done by
      sort_sections.  */
-  lang_add_section (&l->wild_statement.children, s, os, file);
+  lang_add_section (&l->wild_statement.children, s, os);
 
   return TRUE;
 }
@@ -785,7 +769,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
   gld_${EMULATION_NAME}_get_script,
   "${EMULATION_NAME}",
   "${OUTPUT_FORMAT}",
-  NULL, /* finish */
+  finish_default,
   NULL, /* create output section statements */
   NULL, /* open dynamic archive */
   gld${EMULATION_NAME}_place_orphan,
This page took 0.027643 seconds and 4 git commands to generate.