diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-04-21 17:08:20 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-04-21 17:08:20 +0000 |
commit | 4f3607846c68df370c48d4ee43d60f9c803cc613 (patch) | |
tree | d61998570e79784e93877c84d89dfd6f0abbe8ff /bfd | |
parent | a1220294e53a9a14bbe3bf1d625ecb7ae05cc1c9 (diff) | |
download | gdb-4f3607846c68df370c48d4ee43d60f9c803cc613.zip gdb-4f3607846c68df370c48d4ee43d60f9c803cc613.tar.gz gdb-4f3607846c68df370c48d4ee43d60f9c803cc613.tar.bz2 |
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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 27 | ||||
-rw-r--r-- | bfd/coff-ia64.c | 4 | ||||
-rw-r--r-- | bfd/coffcode.h | 7 | ||||
-rw-r--r-- | bfd/libcoff-in.h | 2 | ||||
-rw-r--r-- | bfd/libcoff.h | 2 | ||||
-rw-r--r-- | bfd/peXXigen.c | 11 | ||||
-rw-r--r-- | bfd/pei-ia64.c | 5 | ||||
-rw-r--r-- | bfd/peicode.h | 7 |
8 files changed, 35 insertions, 30 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a12f7b9..3973583 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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. diff --git a/bfd/coff-ia64.c b/bfd/coff-ia64.c index 0037c2f..e8746ce 100644 --- a/bfd/coff-ia64.c +++ b/bfd/coff-ia64.c @@ -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[] = { diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 312aa77..6a8a8cb 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -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; diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h index 0aa3d37..16b6c7b 100644 --- a/bfd/libcoff-in.h +++ b/bfd/libcoff-in.h @@ -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) diff --git a/bfd/libcoff.h b/bfd/libcoff.h index 247f1c4..a4ab405 100644 --- a/bfd/libcoff.h +++ b/bfd/libcoff.h @@ -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) diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 69657fc..fb8ced0 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -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; diff --git a/bfd/pei-ia64.c b/bfd/pei-ia64.c index dc1980d..745147e 100644 --- a/bfd/pei-ia64.c +++ b/bfd/pei-ia64.c @@ -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" diff --git a/bfd/peicode.h b/bfd/peicode.h index 2e96f12..d5688d6 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -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; } |