bfd/
[deliverable/binutils-gdb.git] / ld / emultempl / pe.em
index ccbda5c8de9edc0da64a0999a6f13e71002d9a45..df7692d680c169052d99cc8a1306482dc00d2882 100644 (file)
@@ -9,8 +9,8 @@ rm -f e${EMULATION_NAME}.c
 (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-)
 cat >>e${EMULATION_NAME}.c <<EOF
 /* This file is part of GLD, the Gnu Linker.
-   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-   Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+   2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 /* For WINDOWS_NT */
 /* The original file generated returned different default scripts depending
@@ -135,13 +135,13 @@ gld_${EMULATION_NAME}_before_parse (void)
   config.dynamic_link = TRUE;
   config.has_shared = 1;
   link_info.pei386_auto_import = -1;
-  link_info.pei386_runtime_pseudo_reloc = FALSE;
+  link_info.pei386_runtime_pseudo_reloc = -1;
 
 #if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
 #if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
-  lang_add_entry ("WinMainCRTStartup", FALSE);
+  lang_default_entry ("WinMainCRTStartup");
 #else
-  lang_add_entry ("_WinMainCRTStartup", FALSE);
+  lang_default_entry ("_WinMainCRTStartup");
 #endif
 #endif
 #endif
@@ -457,7 +457,7 @@ set_pe_subsystem (void)
     {
       char *alc_entry;
 
-      /* lang_add_entry expects its argument to be permanently
+      /* lang_default_entry expects its argument to be permanently
         allocated, so we don't free this string.  */
       alc_entry = xmalloc (strlen (initial_symbol_char)
                           + strlen (entry)
@@ -467,7 +467,7 @@ set_pe_subsystem (void)
       entry = alc_entry;
     }
 
-  lang_add_entry (entry, FALSE);
+  lang_default_entry (entry);
 
   return;
 }
@@ -667,7 +667,7 @@ static unsigned long
 compute_dll_image_base (const char *ofile)
 {
   unsigned long hash = strhash (ofile);
-  return 0x60000000 | ((hash << 16) & 0x0FFC0000);
+  return 0x61300000 + ((hash << 16) & 0x0FFC0000);
 }
 #endif
 
@@ -1287,6 +1287,8 @@ gld_${EMULATION_NAME}_before_allocation (void)
   /* We have seen it all. Allocate it, and carry on.  */
   bfd_arm_pe_allocate_interworking_sections (& link_info);
 #endif /* TARGET_IS_armpe */
+
+  before_allocation_default ();
 }
 \f
 #ifdef DLL_SUPPORT
@@ -1362,14 +1364,6 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
                  exp_assop ('=', "__image_base__", exp_intop (pe.ImageBase));
            }
 
-#if 0
-         /* Not sure if these *should* be set.  */
-         if (pe_def_file->version_major != -1)
-           {
-             pe.MajorImageVersion = pe_def_file->version_major;
-             pe.MinorImageVersion = pe_def_file->version_minor;
-           }
-#endif
          if (pe_def_file->stack_reserve != -1
              && ! saw_option ("__size_of_stack_reserve__"))
            {
@@ -1469,6 +1463,8 @@ gld_${EMULATION_NAME}_finish (void)
     }
 #endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) */
 
+  finish_default ();
+
 #ifdef DLL_SUPPORT
   if (link_info.shared
 #if !defined(TARGET_IS_shpe) && !defined(TARGET_IS_mipspe)
This page took 0.027978 seconds and 4 git commands to generate.