aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/pe.sc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-08-07 13:47:19 +0000
committerNick Clifton <nickc@redhat.com>2012-08-07 13:47:19 +0000
commita988325c2410b0ce11675fd262940bdc030f6bff (patch)
tree93df8e694479ee61dc37cace2f924872a6762dea /ld/scripttempl/pe.sc
parent4f69f4c267a21e787685116945fb40729a7297a5 (diff)
downloadgdb-a988325c2410b0ce11675fd262940bdc030f6bff.zip
gdb-a988325c2410b0ce11675fd262940bdc030f6bff.tar.gz
gdb-a988325c2410b0ce11675fd262940bdc030f6bff.tar.bz2
* config/tc-i386.c (lex_got): Provide implementation for PE
format. * gas/i386/secrel.s: Add test of <symbol>@SECREL32. * gas/i386/secrel.d: Add expected disassembly. * scripttempl/pe.sc (R_TLS): Add .tls$AAA and .tls$ZZZ. * scripttempl/pep.sc (R_TLS): Add .tls$AAA and .tls$ZZZ. * archive.c (_bfd_delete_archive_data): New function. * libbfd-in.h (_bfd_delete_archive_data): Declare. * libbfd.h: Rebuild. * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
Diffstat (limited to 'ld/scripttempl/pe.sc')
-rw-r--r--ld/scripttempl/pe.sc8
1 files changed, 7 insertions, 1 deletions
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc
index 3a27952..5b9bd61 100644
--- a/ld/scripttempl/pe.sc
+++ b/ld/scripttempl/pe.sc
@@ -39,9 +39,11 @@ if test "${RELOCATING}"; then
R_CRT_XP='*(SORT(.CRT$XP*)) /* Pre-termination */'
R_CRT_XT='*(SORT(.CRT$XT*)) /* Termination */'
R_TLS='
+ *(.tls$AAA)
*(.tls)
*(.tls$)
- *(SORT(.tls$*))'
+ *(SORT(.tls$*))
+ *(.tls$ZZZ)'
R_RSRC='*(SORT(.rsrc$*))'
else
R_TEXT=
@@ -179,6 +181,10 @@ SECTIONS
${RELOCATING+___crt_xt_end__ = . ;}
}
+ /* Windows TLS expects .tls\$AAA to be at the start and .tls\$ZZZ to be
+ at the end of section. This is important because _tls_start MUST
+ be at the beginning of the section to enable SECREL32 relocations with TLS
+ data. */
.tls ${RELOCATING+BLOCK(__section_alignment__)} :
{
${RELOCATING+___tls_start__ = . ;}