2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 21 Apr 2009 17:08:20 +0000 (17:08 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 21 Apr 2009 17:08:20 +0000 (17:08 +0000)
* coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.

* coffcode.h (coff_compute_section_file_positions): Clear
D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.

* libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
force_minimum_alignment.

* libcoff.h: Regenerated.

* pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
(PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.

* peicode.h (pe_mkobject): Don't set force_minimum_alignment
nor target_subsystem.

* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
force_minimum_alignment nor target_subsystem.

bfd/ChangeLog
bfd/coff-ia64.c
bfd/coffcode.h
bfd/libcoff-in.h
bfd/libcoff.h
bfd/peXXigen.c
bfd/pei-ia64.c
bfd/peicode.h

index a12f7b980a9cb10097cca42d1e17535b91828ae7..39735836aa9fe4a6a8d387577f0b32c0e8b3d296 100644 (file)
@@ -1,3 +1,24 @@
+2009-04-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
+       
+       * coffcode.h (coff_compute_section_file_positions): Clear
+       D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
+
+       * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
+       force_minimum_alignment.
+
+       * libcoff.h: Regenerated.
+
+       * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
+       (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
+
+       * peicode.h (pe_mkobject): Don't set force_minimum_alignment
+       nor target_subsystem.
+
+       * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
+       force_minimum_alignment nor target_subsystem.
+
 2009-04-21  Kai Tietz  <kai.tietz@onevision.com>
 
        * coff-x86_64.c (PEI_HEADERS): Protect includes.
@@ -18,8 +39,8 @@
        * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
 
 2009-04-19  Peter O'Gorman  <binutils@mlists.thewrittenword.com>
-            Alan Modra  <amodra@bigpond.net.au>
-            Dave Korn  <dave.korn.cygwin@gmail.com>
+           Alan Modra  <amodra@bigpond.net.au>
+           Dave Korn  <dave.korn.cygwin@gmail.com>
 
        * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
        long names and non-NUL-terminated strings.
            Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
        * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
-        macros for visibilty and locality checks.
+       macros for visibilty and locality checks.
        (elf_s390_adjust_dynamic_symbol): Likewise.
        (allocate_dynrelocs): Likewise.
        (elf_s390_relocate_section): Likewise.
index 0037c2f6917ddbb1bfd51f4c5774557df55e6e06..e8746cea6cfe38efc95823911126504b088ef3f6 100644 (file)
@@ -29,9 +29,9 @@
 #include "libcoff.h"
 
 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
-/* The page size is a guess based on ELF.  */
 
-#define COFF_PAGE_SIZE 0x1000
+/* Windows ia64 uses 8K page size.  */
+#define COFF_PAGE_SIZE 0x2000
 
 static reloc_howto_type howto_table[] =
 {
index 312aa7758ca97320fef97693584e7053a87a5c76..6a8a8cbcbcbfad52bf0ea7b5e900817c9ca9b1b7 100644 (file)
@@ -3186,6 +3186,13 @@ coff_compute_section_file_positions (bfd * abfd)
     int target_index;
     bfd_size_type amt;
 
+#ifdef COFF_PAGE_SIZE
+    /* Clear D_PAGED if section alignment is smaller than
+       COFF_PAGE_SIZE.  */
+   if (pe_data (abfd)->pe_opthdr.SectionAlignment < COFF_PAGE_SIZE)
+     abfd->flags &= ~D_PAGED;
+#endif
+
     count = 0;
     for (current = abfd->sections; current != NULL; current = current->next)
       ++count;
index 0aa3d3707aebd9b510c114cf9411357100be34e2..16b6c7baf2cf2e59094f234276fb20e82ce92b93 100644 (file)
@@ -117,8 +117,6 @@ typedef struct pe_tdata
   int has_reloc_section;
   bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
   flagword real_flags;
-  int target_subsystem;
-  bfd_boolean force_minimum_alignment;
 } pe_data_type;
 
 #define pe_data(bfd)           ((bfd)->tdata.pe_obj_data)
index 247f1c4cc730678b0f151ab4d6028ad96756f665..a4ab4053e50493262dc84b7424b7553a3b9a6de7 100644 (file)
@@ -121,8 +121,6 @@ typedef struct pe_tdata
   int has_reloc_section;
   bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
   flagword real_flags;
-  int target_subsystem;
-  bfd_boolean force_minimum_alignment;
 } pe_data_type;
 
 #define pe_data(bfd)           ((bfd)->tdata.pe_obj_data)
index 69657fcf6227c93ce57a12102d99ea56f44ea73c..fb8ced0322f58c04f09374e5198a2cb5b511b88f 100644 (file)
@@ -548,17 +548,6 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
   bfd_vma sa, fa, ib;
   IMAGE_DATA_DIRECTORY idata2, idata5, tls;
   
-  if (pe->force_minimum_alignment)
-    {
-      if (!extra->FileAlignment)
-       extra->FileAlignment = PE_DEF_FILE_ALIGNMENT;
-      if (!extra->SectionAlignment)
-       extra->SectionAlignment = PE_DEF_SECTION_ALIGNMENT;
-    }
-
-  if (extra->Subsystem == IMAGE_SUBSYSTEM_UNKNOWN)
-    extra->Subsystem = pe->target_subsystem;
-
   sa = extra->SectionAlignment;
   fa = extra->FileAlignment;
   ib = extra->ImageBase;
index dc1980d4ac447970f33bc70c3cf42742ab89fb69..745147e1ff57738a6c941ec17093866ed1b1fb67 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for HP/Intel IA-64 PE IMAGE COFF files.
-   Copyright 1999, 2000, 2001, 2002, 2007, 2009 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002, 2007, 2009
+   Free Software Foundation, Inc.
    Contributed by David Mosberger <davidm@hpl.hp.com>
 
    This implementation only supports objcopy to ouput IA-64 PE IMAGE COFF
@@ -34,7 +35,5 @@
 #define TARGET_UNDERSCORE '_'
 /* Long section names not allowed in executable images, only object files.  */
 #define COFF_LONG_SECTION_NAMES 0
-#define PEI_TARGET_SUBSYSTEM           IMAGE_SUBSYSTEM_EFI_APPLICATION
-#define PEI_FORCE_MINIMUM_ALIGNMENT
 
 #include "coff-ia64.c"
index 2e96f1263ffa805043aa658a2fc16540ee05829c..d5688d6efaa2b04c53712cba143fe07ab4cdb130 100644 (file)
@@ -264,13 +264,6 @@ pe_mkobject (bfd * abfd)
   /* in_reloc_p is architecture dependent.  */
   pe->in_reloc_p = in_reloc_p;
 
-#ifdef PEI_FORCE_MINIMUM_ALIGNMENT
-  pe->force_minimum_alignment = 1;
-#endif
-#ifdef PEI_TARGET_SUBSYSTEM
-  pe->target_subsystem = PEI_TARGET_SUBSYSTEM;
-#endif
-
   return TRUE;
 }
 
This page took 0.032846 seconds and 4 git commands to generate.