diff options
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/pe-i386.c | 14 | ||||
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/read.c | 7 | ||||
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/coff/pe.h | 4 | ||||
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/align.exp | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/alignof.exp | 4 |
9 files changed, 31 insertions, 25 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6c84726..7f10116 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2007-11-05 Danny Smith <dannysmith@users.sourceforge.net> + + * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Let .data, .text + and .bss section use the default. + * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise. + 2007-11-01 Joseph Myers <joseph@codesourcery.com> * merge.c (sec_merge_hash_lookup): Add parameter sec_end. Check diff --git a/bfd/pe-i386.c b/bfd/pe-i386.c index faf8be6..ec5b43e 100644 --- a/bfd/pe-i386.c +++ b/bfd/pe-i386.c @@ -32,20 +32,6 @@ #define COFF_LONG_FILENAMES #define COFF_SECTION_ALIGNMENT_ENTRIES \ -{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \ - COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ -{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \ - COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ -{ COFF_SECTION_NAME_PARTIAL_MATCH (".data$"), \ - COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ -{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \ - COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ -{ COFF_SECTION_NAME_PARTIAL_MATCH (".rdata$"), \ - COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ -{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \ - COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ -{ COFF_SECTION_NAME_PARTIAL_MATCH (".text$"), \ - COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \ { COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \ { COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \ diff --git a/gas/ChangeLog b/gas/ChangeLog index 8ec6734..637be80 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2007-11-05 Danny Smith <dannysmith@users.sourceforge.net> + + * read.c (ALIGN_LIMIT): Rename to ... + (TC_ALIGN_LIMIT): Guard against prior definition. + * config/tc-i386.h (TC_ALIGN_LIMIT)[TE_PE]: Define. + 2007-11-01 Sterling Augustine <sterling@tensilica.com> * config/tc-xtensa.c (xtensa_symbol_new_hook): New. @@ -1276,13 +1276,14 @@ do_align (int n, char *fill, int len, int max) (in bytes). A negative ARG is the negative of the length of the fill pattern. BYTES_P is non-zero if the alignment value should be interpreted as the byte boundary, rather than the power of 2. */ - -#define ALIGN_LIMIT (stdoutput->arch_info->bits_per_address - 1) +#ifndef TC_ALIGN_LIMIT +#define TC_ALIGN_LIMIT (stdoutput->arch_info->bits_per_address - 1) +#endif static void s_align (int arg, int bytes_p) { - unsigned int align_limit = ALIGN_LIMIT; + unsigned int align_limit = TC_ALIGN_LIMIT; unsigned int align; char *stop = NULL; char stopc = 0; diff --git a/include/ChangeLog b/include/ChangeLog index 9dfb1b0..f3dc433 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2007-11-05 Danny Smith <dannysmith@users.sourceforge.net> + + * coff/pe.h (COFF_ENCODE_ALIGNMENT) Define. + 2007-09-06 Tom Tromey <tromey@redhat.com> * libiberty.h (pex_free): Document process killing. diff --git a/include/coff/pe.h b/include/coff/pe.h index 5a4d960..734b11a 100644 --- a/include/coff/pe.h +++ b/include/coff/pe.h @@ -90,6 +90,10 @@ #define IMAGE_SCN_ALIGN_4096BYTES IMAGE_SCN_ALIGN_POWER_CONST (12) #define IMAGE_SCN_ALIGN_8192BYTES IMAGE_SCN_ALIGN_POWER_CONST (13) +/* Encode alignment power into IMAGE_SCN_ALIGN bits of s_flags */ +#define COFF_ENCODE_ALIGNMENT(SECTION, ALIGNMENT_POWER) \ + ((SECTION).s_flags |= IMAGE_SCN_ALIGN_POWER_CONST ((ALIGNMENT_POWER))) + #define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */ #define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */ #define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */ diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index b8b5b2b..0ebc47e 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-11-05 Danny Smith <dannysmith@users.sourceforge.net> + + * ld-scripts/align.exp: Enable for PECOFF. + * ld-scripts/alignof.exp: Likewise. + 2007-11-01 Joseph Myers <joseph@codesourcery.com> * ld-elf/merge3.d, ld-elf/merge3.s: New. diff --git a/ld/testsuite/ld-scripts/align.exp b/ld/testsuite/ld-scripts/align.exp index e666982..b0fb962 100644 --- a/ld/testsuite/ld-scripts/align.exp +++ b/ld/testsuite/ld-scripts/align.exp @@ -32,17 +32,11 @@ if ![ld_assemble $as $srcdir/$subdir/align.s tmpdir/align.o] { return } -# Doesn't work on PECOFF, appears to be a genuine bug. # mingw on x86_64 targets need to set the image base to 0 to avoid auto image-basing. global LDFLAGS set saved_LDFLAGS "$LDFLAGS" if [istarget "x86_64-*-mingw*"] then { set LDFLAGS "$LDFLAGS --image-base 0" -} else { - if [is_pecoff_format] { - global target_triplet - setup_xfail $target_triplet - } } if ![ld_simple_link $ld tmpdir/align "$LDFLAGS -T $srcdir/$subdir/align.t tmpdir/align.o"] { diff --git a/ld/testsuite/ld-scripts/alignof.exp b/ld/testsuite/ld-scripts/alignof.exp index 207d22c..0f05aeb 100644 --- a/ld/testsuite/ld-scripts/alignof.exp +++ b/ld/testsuite/ld-scripts/alignof.exp @@ -19,9 +19,9 @@ # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, # MA 02110-1301, USA. -# Only ELF targets record section alignment. +# Only ELF and PE-COFF targets record section alignment. -if ![is_elf_format] { +if {![is_elf_format] && ![is_pecoff_format]} { return } |