* 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 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.
* 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.
#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[] =
{
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;
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)
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)
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;
/* 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
#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"
/* 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;
}