aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2010-12-21 15:24:39 +0000
committerKai Tietz <kai.tietz@onevision.com>2010-12-21 15:24:39 +0000
commitc91a930cb775123c1dcdfc3f9366bd3e21d2c5e5 (patch)
treed4b8ecf89c97bda2e1002e5c0c88ac04e9171be4 /ld
parent43fbacdedceefe629062965ffb17f3539a17dca0 (diff)
downloadgdb-c91a930cb775123c1dcdfc3f9366bd3e21d2c5e5.zip
gdb-c91a930cb775123c1dcdfc3f9366bd3e21d2c5e5.tar.gz
gdb-c91a930cb775123c1dcdfc3f9366bd3e21d2c5e5.tar.bz2
2010-12-21 Kai Tietz <kai.tietz@onevision.com>
* peXXigen.c (_bfd_XXi_final_link_postscript): Use bfd_get_symbol_leading_char to determine "_tls_used" name. 2010-12-21 Kai Tietz <kai.tietz@onevision.com> * ld-pe/pe.exp: Add TLS directory test. * ld-pe/tlssec.s: New. * ld-pe/tlssec64.d: New. * ld-pe/tlssec32.d: New.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-pe/pe.exp6
-rwxr-xr-xld/testsuite/ld-pe/tlssec.s20
-rwxr-xr-xld/testsuite/ld-pe/tlssec32.d3
-rwxr-xr-xld/testsuite/ld-pe/tlssec64.d3
5 files changed, 39 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 90ff589..78537d3 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-21 Kai Tietz <kai.tietz@onevision.com>
+
+ * ld-pe/pe.exp: Add TLS directory test.
+ * ld-pe/tlssec.s: New.
+ * ld-pe/tlssec64.d: New.
+ * ld-pe/tlssec32.d: New.
+
2010-12-20 Alan Modra <amodra@gmail.com>
* ld-bootstrap/bootstrap.exp: Fix misplaced comment.
diff --git a/ld/testsuite/ld-pe/pe.exp b/ld/testsuite/ld-pe/pe.exp
index dd4b9f7..183c5c6 100644
--- a/ld/testsuite/ld-pe/pe.exp
+++ b/ld/testsuite/ld-pe/pe.exp
@@ -38,6 +38,8 @@ if {[istarget i*86-*-cygwin*]
{{objdump -s secrel_64.d}} "secrel.x"}
{"Empty export table" "" "" "exports.s"
{{objdump -p exports64.d}} "exports.dll"}
+ {"TLS directory entry" "" "" "tlssec.s"
+ {{objdump -p tlssec64.d}} "tlssec.dll"}
}
} elseif {[istarget i*86-*-cygwin*] } {
set pe_tests {
@@ -45,6 +47,8 @@ if {[istarget i*86-*-cygwin*]
{{objdump -s secrel.d}} "secrel.x"}
{"Empty export table" "" "" "exports.s"
{{objdump -p exports.d}} "exports.dll"}
+ {"TLS directory entry" "" "" "tlssec.s"
+ {{objdump -p tlssec32.d}} "tlssec.dll"}
}
} else {
set pe_tests {
@@ -52,6 +56,8 @@ if {[istarget i*86-*-cygwin*]
{{objdump -s secrel.d}} "secrel.x"}
{"Empty export table" "" "" "exports.s"
{{objdump -p exports.d}} "exports.dll"}
+ {"TLS directory entry" "" "" "tlssec.s"
+ {{objdump -p tlssec32.d}} "tlssec.dll"}
}
}
diff --git a/ld/testsuite/ld-pe/tlssec.s b/ld/testsuite/ld-pe/tlssec.s
new file mode 100755
index 0000000..ba14881
--- /dev/null
+++ b/ld/testsuite/ld-pe/tlssec.s
@@ -0,0 +1,20 @@
+.global _tls_used
+.global __tls_used
+.global _start
+.global start
+.global _mainCRTStartup
+.global mainCRTStartup
+
+.text
+_start:
+mainCRTStartup:
+_mainCRTStartup:
+ .byte 1
+
+.section .tls
+_tls_used:
+__tls_used:
+.long 1,2,3,4,5,6,7,8,9,10
+.long 11,12,13,14,15,16,17,18,19,20
+.long 21,22,23,24,25,26,27,28,29,30
+
diff --git a/ld/testsuite/ld-pe/tlssec32.d b/ld/testsuite/ld-pe/tlssec32.d
new file mode 100755
index 0000000..0114064
--- /dev/null
+++ b/ld/testsuite/ld-pe/tlssec32.d
@@ -0,0 +1,3 @@
+#...
+Entry 9 00003000 00000018 Thread Storage Directory \[\.tls\]
+#...
diff --git a/ld/testsuite/ld-pe/tlssec64.d b/ld/testsuite/ld-pe/tlssec64.d
new file mode 100755
index 0000000..692d9e4
--- /dev/null
+++ b/ld/testsuite/ld-pe/tlssec64.d
@@ -0,0 +1,3 @@
+#...
+Entry 9 0000000000003000 00000028 Thread Storage Directory \[\.tls\]
+#...