summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/i386
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2009-09-24 03:23:52 +0000
committerH.J. Lu <hjl@lucon.org>2009-09-24 03:23:52 +0000
commitc66f6db8eef6a0eced1b2cd56fa5f60c6a099468 (patch)
treee2f441eebbf057de7086befa7ab6a87f49da2505 /gas/testsuite/gas/i386
parent88978cc649df7f329c7550400604202ee37c4e73 (diff)
downloadbinutils-redhat-c66f6db8eef6a0eced1b2cd56fa5f60c6a099468.tar.gz
gas/
2009-09-23 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Don't check BFD_RELOC_386_GOT32. gas/testsuite/ 2009-09-23 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run localpic. * gas/i386/localpic.d: New. * gas/i386/localpic.s: Likewise.
Diffstat (limited to 'gas/testsuite/gas/i386')
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
-rw-r--r--gas/testsuite/gas/i386/localpic.d6
-rw-r--r--gas/testsuite/gas/i386/localpic.s5
3 files changed, 12 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 58e31dae86..2196575e4f 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -192,6 +192,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_list_test "inval-equ-2" "-al"
run_dump_test "ifunc"
run_list_test "l1om-inval" "-march=l1om --32"
+ run_dump_test "localpic"
}
# This is a PE specific test.
diff --git a/gas/testsuite/gas/i386/localpic.d b/gas/testsuite/gas/i386/localpic.d
new file mode 100644
index 0000000000..bda8665fe2
--- /dev/null
+++ b/gas/testsuite/gas/i386/localpic.d
@@ -0,0 +1,6 @@
+#readelf: -r
+#name: i386 local PIC
+
+Relocation section '.rel.text' at offset 0x[0-9a-f]+ contains 1 entries:
+ Offset Info Type Sym.Value Sym. Name
+[0-9a-f]+ +[0-9a-f]+ R_386_GOT32 +[0-9a-f]+ +foo
diff --git a/gas/testsuite/gas/i386/localpic.s b/gas/testsuite/gas/i386/localpic.s
new file mode 100644
index 0000000000..e63394445e
--- /dev/null
+++ b/gas/testsuite/gas/i386/localpic.s
@@ -0,0 +1,5 @@
+ .data
+foo:
+ .long 0
+ .text
+movl foo@GOT(%ecx), %eax