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:
parent
a1220294e5
commit
4f3607846c
|
@ -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>
|
2009-04-21 Kai Tietz <kai.tietz@onevision.com>
|
||||||
|
|
||||||
* coff-x86_64.c (PEI_HEADERS): Protect includes.
|
* coff-x86_64.c (PEI_HEADERS): Protect includes.
|
||||||
|
@ -18,8 +39,8 @@
|
||||||
* libpei.h (_bfd_pex64_print_pdata): Removed declaration.
|
* libpei.h (_bfd_pex64_print_pdata): Removed declaration.
|
||||||
|
|
||||||
2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
|
2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
|
||||||
Alan Modra <amodra@bigpond.net.au>
|
Alan Modra <amodra@bigpond.net.au>
|
||||||
Dave Korn <dave.korn.cygwin@gmail.com>
|
Dave Korn <dave.korn.cygwin@gmail.com>
|
||||||
|
|
||||||
* peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
|
* peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
|
||||||
long names and non-NUL-terminated strings.
|
long names and non-NUL-terminated strings.
|
||||||
|
@ -424,7 +445,7 @@
|
||||||
Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||||
|
|
||||||
* elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
|
* 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.
|
(elf_s390_adjust_dynamic_symbol): Likewise.
|
||||||
(allocate_dynrelocs): Likewise.
|
(allocate_dynrelocs): Likewise.
|
||||||
(elf_s390_relocate_section): Likewise.
|
(elf_s390_relocate_section): Likewise.
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
#include "libcoff.h"
|
#include "libcoff.h"
|
||||||
|
|
||||||
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
|
#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[] =
|
static reloc_howto_type howto_table[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -3186,6 +3186,13 @@ coff_compute_section_file_positions (bfd * abfd)
|
||||||
int target_index;
|
int target_index;
|
||||||
bfd_size_type amt;
|
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;
|
count = 0;
|
||||||
for (current = abfd->sections; current != NULL; current = current->next)
|
for (current = abfd->sections; current != NULL; current = current->next)
|
||||||
++count;
|
++count;
|
||||||
|
|
|
@ -117,8 +117,6 @@ typedef struct pe_tdata
|
||||||
int has_reloc_section;
|
int has_reloc_section;
|
||||||
bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
|
bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
|
||||||
flagword real_flags;
|
flagword real_flags;
|
||||||
int target_subsystem;
|
|
||||||
bfd_boolean force_minimum_alignment;
|
|
||||||
} pe_data_type;
|
} pe_data_type;
|
||||||
|
|
||||||
#define pe_data(bfd) ((bfd)->tdata.pe_obj_data)
|
#define pe_data(bfd) ((bfd)->tdata.pe_obj_data)
|
||||||
|
|
|
@ -121,8 +121,6 @@ typedef struct pe_tdata
|
||||||
int has_reloc_section;
|
int has_reloc_section;
|
||||||
bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
|
bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *);
|
||||||
flagword real_flags;
|
flagword real_flags;
|
||||||
int target_subsystem;
|
|
||||||
bfd_boolean force_minimum_alignment;
|
|
||||||
} pe_data_type;
|
} pe_data_type;
|
||||||
|
|
||||||
#define pe_data(bfd) ((bfd)->tdata.pe_obj_data)
|
#define pe_data(bfd) ((bfd)->tdata.pe_obj_data)
|
||||||
|
|
|
@ -548,17 +548,6 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
|
||||||
bfd_vma sa, fa, ib;
|
bfd_vma sa, fa, ib;
|
||||||
IMAGE_DATA_DIRECTORY idata2, idata5, tls;
|
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;
|
sa = extra->SectionAlignment;
|
||||||
fa = extra->FileAlignment;
|
fa = extra->FileAlignment;
|
||||||
ib = extra->ImageBase;
|
ib = extra->ImageBase;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* BFD back-end for HP/Intel IA-64 PE IMAGE COFF files.
|
/* 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>
|
Contributed by David Mosberger <davidm@hpl.hp.com>
|
||||||
|
|
||||||
This implementation only supports objcopy to ouput IA-64 PE IMAGE COFF
|
This implementation only supports objcopy to ouput IA-64 PE IMAGE COFF
|
||||||
|
@ -34,7 +35,5 @@
|
||||||
#define TARGET_UNDERSCORE '_'
|
#define TARGET_UNDERSCORE '_'
|
||||||
/* Long section names not allowed in executable images, only object files. */
|
/* Long section names not allowed in executable images, only object files. */
|
||||||
#define COFF_LONG_SECTION_NAMES 0
|
#define COFF_LONG_SECTION_NAMES 0
|
||||||
#define PEI_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_APPLICATION
|
|
||||||
#define PEI_FORCE_MINIMUM_ALIGNMENT
|
|
||||||
|
|
||||||
#include "coff-ia64.c"
|
#include "coff-ia64.c"
|
||||||
|
|
|
@ -264,13 +264,6 @@ pe_mkobject (bfd * abfd)
|
||||||
/* in_reloc_p is architecture dependent. */
|
/* in_reloc_p is architecture dependent. */
|
||||||
pe->in_reloc_p = in_reloc_p;
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue