* 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.
+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
#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"), \
+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.
(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;
+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.
#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. */
+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.
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"] {
# 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
}