* coff/pe.h (COFF_ENCODE_ALIGNMENT) Define.

gas
	* read.c (ALIGN_LIMIT): Rename to ...
	(TC_ALIGN_LIMIT): Guard against prior definition.
	* config/tc-i386.h (TC_ALIGN_LIMIT)[TE_PE]: Define.

bfd
	* pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Let .data, .text
	 and .bss section use the default.
	* pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.

ld/testsuite
	* ld-scripts/align.exp: Enable for PECOFF.
	* ld-scripts/alignof.exp: Likewise.
This commit is contained in:
Danny Smith
2007-11-04 23:49:09 +00:00
parent 4c9b8248ed
commit 11ec4ba977
9 changed files with 31 additions and 25 deletions

View File

@ -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"] {

View File

@ -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
}