summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ifunc
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2009-06-03 17:32:02 +0000
committerH.J. Lu <hjl@lucon.org>2009-06-03 17:32:02 +0000
commit9dfdbeba1044d0fdd19e1d49e788a3bc9266bba7 (patch)
tree9fb0602a612a35640e423f9f69f662936a4e5251 /ld/testsuite/ld-ifunc
parent0d23328513b6fda9fa4d9c500a8aaf0ac9ab782b (diff)
downloadbinutils-redhat-9dfdbeba1044d0fdd19e1d49e788a3bc9266bba7.tar.gz
2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
* ld-ifunc/ifunc-2-x86-64.d: Pass --64 to as and -melf_x86_64 to ld. * ld-ifunc/ifunc-5a-x86-64.d: Likewise. * ld-ifunc/ifunc-5b-x86-64.d: Likewise. * ld-ifunc/ifunc-6a-x86-64.d: Likewise. * ld-ifunc/ifunc-6b-x86-64.d: Likewise. * ld-ifunc/ifunc-7a-x86-64.d: Likewise. * ld-ifunc/ifunc-7b-x86-64.d: Likewise. * ld-ifunc/ifunc-8a-i386.s: New. * ld-ifunc/ifunc-8a-x86-64.s: Likewise. * ld-ifunc/ifunc-8b-i386.s: Likewise. * ld-ifunc/ifunc-8b-x86-64.s: Likewise. * ld-ifunc/ifunc-8-i386.d: Likewise. * ld-ifunc/ifunc-8-x86-64.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-ifunc')
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-2-x86-64.d3
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d3
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d3
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d3
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d3
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d3
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d3
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-8-i386.d10
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-8-x86-64.d10
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-8a-i386.s16
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-8a-x86-64.s12
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-8b-i386.s7
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-8b-x86-64.s7
13 files changed, 76 insertions, 7 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
index 103db78cf4..fa8710254d 100644
--- a/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
@@ -1,4 +1,5 @@
-#ld: -shared
+#as: --64
+#ld: -shared -melf_x86_64
#objdump: -dw
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d
index b635099b40..46f41863bc 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d
@@ -1,5 +1,6 @@
#source: ifunc-5-x86-64.s
-#ld:
+#as: --64
+#ld: -melf_x86_64
#readelf: -r --wide
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d
index d8b2e913a7..02aff6b7c8 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d
@@ -1,5 +1,6 @@
#source: ifunc-5-x86-64.s
-#ld: -shared -z nocombreloc
+#as: --64
+#ld: -melf_x86_64 -shared -z nocombreloc
#readelf: -r --wide
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d
index 169cf1c40a..cc3ff94d5e 100644
--- a/ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d
@@ -1,5 +1,6 @@
#source: ifunc-6-x86-64.s
-#ld:
+#as: --64
+#ld: -melf_x86_64
#readelf: -r --wide
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d
index 5a948e9ca7..16ccfd7cfd 100644
--- a/ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d
@@ -1,5 +1,6 @@
#source: ifunc-6-x86-64.s
-#ld: -shared -z nocombreloc
+#as: --64
+#ld: -melf_x86_64 -shared -z nocombreloc
#readelf: -r --wide
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d
index 350614ab5a..2544401969 100644
--- a/ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d
@@ -1,5 +1,6 @@
#source: ifunc-7-x86-64.s
-#ld:
+#as: --64
+#ld: -melf_x86_64
#readelf: -r --wide
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d
index cd66d58d2d..846fe34e89 100644
--- a/ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d
@@ -1,5 +1,6 @@
#source: ifunc-7-x86-64.s
-#ld: -shared
+#as: --64
+#ld: -melf_x86_64 -shared
#readelf: -r --wide
#target: x86_64-*-*
diff --git a/ld/testsuite/ld-ifunc/ifunc-8-i386.d b/ld/testsuite/ld-ifunc/ifunc-8-i386.d
new file mode 100644
index 0000000000..e40a9e6dc9
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-8-i386.d
@@ -0,0 +1,10 @@
+#source: ifunc-8a-i386.s
+#source: ifunc-8b-i386.s
+#ld: -m elf_i386
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+Relocation section '.rel.plt' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
diff --git a/ld/testsuite/ld-ifunc/ifunc-8-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-8-x86-64.d
new file mode 100644
index 0000000000..ad6a5ddfac
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-8-x86-64.d
@@ -0,0 +1,10 @@
+#source: ifunc-8a-x86-64.s
+#source: ifunc-8b-x86-64.s
+#as: --64
+#ld: -melf_x86_64
+#readelf: -r --wide
+#target: x86_64-*-*
+
+Relocation section '.rela.plt' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
diff --git a/ld/testsuite/ld-ifunc/ifunc-8a-i386.s b/ld/testsuite/ld-ifunc/ifunc-8a-i386.s
new file mode 100644
index 0000000000..9d42d0ea02
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-8a-i386.s
@@ -0,0 +1,16 @@
+ .text
+ .type start,"function"
+ .global start
+start:
+ .type _start,"function"
+ .global _start
+_start:
+ .type __start,"function"
+ .global __start
+__start:
+ .type __start,"function"
+ call .L6
+.L6:
+ popl %ebx
+ addl $_GLOBAL_OFFSET_TABLE_+[.-.L6], %ebx
+ mov foo@GOT(%ebx), %eax
diff --git a/ld/testsuite/ld-ifunc/ifunc-8a-x86-64.s b/ld/testsuite/ld-ifunc/ifunc-8a-x86-64.s
new file mode 100644
index 0000000000..8137a07659
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-8a-x86-64.s
@@ -0,0 +1,12 @@
+ .text
+ .type start,"function"
+ .global start
+start:
+ .type _start,"function"
+ .global _start
+_start:
+ .type __start,"function"
+ .global __start
+__start:
+ .type __start,"function"
+ movq foo@GOTPCREL(%rip), %rax
diff --git a/ld/testsuite/ld-ifunc/ifunc-8b-i386.s b/ld/testsuite/ld-ifunc/ifunc-8b-i386.s
new file mode 100644
index 0000000000..1f108f8e80
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-8b-i386.s
@@ -0,0 +1,7 @@
+ .text
+ .type foo, %gnu_indirect_function
+.globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-8b-x86-64.s b/ld/testsuite/ld-ifunc/ifunc-8b-x86-64.s
new file mode 100644
index 0000000000..1f108f8e80
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-8b-x86-64.s
@@ -0,0 +1,7 @@
+ .text
+ .type foo, %gnu_indirect_function
+.globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo