Index: peXXigen.c =================================================================== RCS file: /cvs/src/src/bfd/peXXigen.c,v retrieving revision 1.67 diff -u -3 -r1.67 peXXigen.c --- peXXigen.c 22 Sep 2010 08:01:56 -0000 1.67 +++ peXXigen.c 14 Dec 2010 16:17:39 -0000 @@ -616,6 +616,11 @@ .idata is needed for backwards compatibility. FIXME. */ add_data_entry (abfd, extra, 1, ".idata", ib); + if (extra->DataDirectory[PE_TLS_TABLE].VirtualAddress == 0) + /* Until other .tls fixes are made, the entry for .tls + is needed. */ + add_data_entry (abfd, extra, 9, ".tls", ib); + /* For some reason, the virtual size (which is what's set by add_data_entry) for .reloc is not the same as the size recorded in this slot by MSVC; it doesn't seem to cause problems (so far),