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.
This commit is contained in:
H.J. Lu 2009-04-21 17:08:20 +00:00
parent a1220294e5
commit 4f3607846c
8 changed files with 35 additions and 30 deletions

View 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.
@ -424,7 +445,7 @@
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.

View 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[] =
{

View 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;

View 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)

View 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)

View 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;

View 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"

View 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;
}