aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2010-12-21 08:41:16 +0000
committerPierre Muller <muller@sourceware.org>2010-12-21 08:41:16 +0000
commitbc2b29908f99c56de320c765c932776cef1aa7c6 (patch)
tree74004d4ec4fc9e8b5d17a522d9b7798ba95089cf /bfd
parent049f7d673192c4ebf8f501dae8219e81b8aedc38 (diff)
downloadgdb-bc2b29908f99c56de320c765c932776cef1aa7c6.zip
gdb-bc2b29908f99c56de320c765c932776cef1aa7c6.tar.gz
gdb-bc2b29908f99c56de320c765c932776cef1aa7c6.tar.bz2
* peXXigen.c (_bfd_XXi_final_link_postscript): Use correct size
for windows 64-bit TLS table size.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/peXXigen.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 39524f6..c863715 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-21 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * peXXigen.c (_bfd_XXi_final_link_postscript): Use correct size
+ for windows 64-bit TLS table size.
+
2010-12-16 DJ Delorie <dj@redhat.com>
* reloc.c (BFD_RELOC_RX_ABS16_REV): Add.
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index a5b7f68..825229a 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -2437,8 +2437,15 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
abfd);
result = FALSE;
}
-
+ /* According to PECOFF sepcifications by Microsoft version 8.2
+ the TLS data directory consists of 4 pointers, followed
+ by two 4-byte integer. This implies that the total size
+ is different for 32-bit and 64-bit executables. */
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
pe_data (abfd)->pe_opthdr.DataDirectory[PE_TLS_TABLE].Size = 0x18;
+#else
+ pe_data (abfd)->pe_opthdr.DataDirectory[PE_TLS_TABLE].Size = 0x28;
+#endif
}
/* If there is a .pdata section and we have linked pdata finally, we