]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
This commit was manufactured by cvs2svn to create branch 'binutils-
authornobody <>
Sun, 16 Dec 2012 20:31:09 +0000 (20:31 +0000)
committernobody <>
Sun, 16 Dec 2012 20:31:09 +0000 (20:31 +0000)
2_23-branch'.

Cherrypick from master 2012-12-16 20:31:08 UTC H.J. Lu <hjl.tools@gmail.com> 'Also check local IFUNC references':
    ld/testsuite/ld-ifunc/ifunc-14a-i386.d
    ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d
    ld/testsuite/ld-ifunc/ifunc-14b-i386.d
    ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d
    ld/testsuite/ld-ifunc/ifunc-14c-i386.d
    ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d
    ld/testsuite/ld-ifunc/ifunc-14d-i386.d
    ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d
    ld/testsuite/ld-ifunc/ifunc-18a-i386.d
    ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d
    ld/testsuite/ld-ifunc/ifunc-18a.s
    ld/testsuite/ld-ifunc/ifunc-18b-i386.d
    ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d
    ld/testsuite/ld-ifunc/ifunc-18b.s
    ld/testsuite/ld-ifunc/ifunc-19a-i386.d
    ld/testsuite/ld-ifunc/ifunc-19a-x86-64.d
    ld/testsuite/ld-ifunc/ifunc-19a.s
    ld/testsuite/ld-ifunc/ifunc-19b-i386.d
    ld/testsuite/ld-ifunc/ifunc-19b-x86-64.d
    ld/testsuite/ld-ifunc/ifunc-19b.s

20 files changed:
ld/testsuite/ld-ifunc/ifunc-14a-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-14b-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-14c-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-14d-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-18a-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-18a.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-18b-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-18b.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-19a-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-19a-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-19a.s [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-19b-i386.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-19b-x86-64.d [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-19b.s [new file with mode: 0644]

diff --git a/ld/testsuite/ld-ifunc/ifunc-14a-i386.d b/ld/testsuite/ld-ifunc/ifunc-14a-i386.d
new file mode 100644 (file)
index 0000000..0edc9fb
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ifunc-14a.s
+#source: ifunc-14b.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -d --wide
+#target: x86_64-*-* i?86-*-*
+
+#failif
+#...
+.*\(TEXTREL\).*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d
new file mode 100644 (file)
index 0000000..2c4ebbb
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ifunc-14a.s
+#source: ifunc-14b.s
+#ld: -shared -m elf_x86_64 -z nocombreloc
+#as: --64
+#readelf: -d
+#target: x86_64-*-*
+
+#failif
+#...
+.*\(TEXTREL\).*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14b-i386.d b/ld/testsuite/ld-ifunc/ifunc-14b-i386.d
new file mode 100644 (file)
index 0000000..948237d
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ifunc-14b.s
+#source: ifunc-14a.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -d --wide
+#target: x86_64-*-* i?86-*-*
+
+#failif
+#...
+.*\(TEXTREL\).*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d
new file mode 100644 (file)
index 0000000..cc1f5ae
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ifunc-14b.s
+#source: ifunc-14a.s
+#ld: -shared -m elf_x86_64 -z nocombreloc
+#as: --64
+#readelf: -d
+#target: x86_64-*-*
+
+#failif
+#...
+.*\(TEXTREL\).*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14c-i386.d b/ld/testsuite/ld-ifunc/ifunc-14c-i386.d
new file mode 100644 (file)
index 0000000..ca360a3
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ifunc-14a.s
+#source: ifunc-14b.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+#failif
+#...
+.* +R_386_NONE +.*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d
new file mode 100644 (file)
index 0000000..76bfa84
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ifunc-14a.s
+#source: ifunc-14b.s
+#ld: -shared -m elf_x86_64 -z nocombreloc
+#as: --64
+#readelf: -r --wide
+#target: x86_64-*-*
+
+#failif
+#...
+.* +R_X86_64_NONE +.*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14d-i386.d b/ld/testsuite/ld-ifunc/ifunc-14d-i386.d
new file mode 100644 (file)
index 0000000..2327278
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ifunc-14b.s
+#source: ifunc-14a.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+#failif
+#...
+.* +R_386_NONE +.*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d
new file mode 100644 (file)
index 0000000..789584b
--- /dev/null
@@ -0,0 +1,11 @@
+#source: ifunc-14b.s
+#source: ifunc-14a.s
+#ld: -shared -m elf_x86_64 -z nocombreloc
+#as: --64
+#readelf: -r --wide
+#target: x86_64-*-*
+
+#failif
+#...
+.* +R_X86_64_NONE +.*
+#...
diff --git a/ld/testsuite/ld-ifunc/ifunc-18a-i386.d b/ld/testsuite/ld-ifunc/ifunc-18a-i386.d
new file mode 100644 (file)
index 0000000..10490b1
--- /dev/null
@@ -0,0 +1,15 @@
+#source: ifunc-18a.s
+#source: ifunc-18b.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+Relocation section '.rel.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
+
+Relocation section '.rel.plt' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
diff --git a/ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d
new file mode 100644 (file)
index 0000000..0d600eb
--- /dev/null
@@ -0,0 +1,15 @@
+#source: ifunc-18a.s
+#source: ifunc-18b.s
+#as: --64
+#ld: -shared -melf_x86_64 -z nocombreloc
+#readelf: -r --wide
+#target: x86_64-*-*
+
+Relocation section '.rela.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
+
+Relocation section '.rela.plt' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
diff --git a/ld/testsuite/ld-ifunc/ifunc-18a.s b/ld/testsuite/ld-ifunc/ifunc-18a.s
new file mode 100644 (file)
index 0000000..c29c121
--- /dev/null
@@ -0,0 +1,5 @@
+       .section .data.rel,"aw",@progbits
+       .globl foo_ptrt
+       .type   foo_ptr, @object
+foo_ptr:
+       .dc.a foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-18b-i386.d b/ld/testsuite/ld-ifunc/ifunc-18b-i386.d
new file mode 100644 (file)
index 0000000..a5eda94
--- /dev/null
@@ -0,0 +1,15 @@
+#source: ifunc-18b.s
+#source: ifunc-18a.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+Relocation section '.rel.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
+
+Relocation section '.rel.plt' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
diff --git a/ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d
new file mode 100644 (file)
index 0000000..8dfebfb
--- /dev/null
@@ -0,0 +1,15 @@
+#source: ifunc-18b.s
+#source: ifunc-18a.s
+#as: --64
+#ld: -shared -melf_x86_64 -z nocombreloc
+#readelf: -r --wide
+#target: x86_64-*-*
+
+Relocation section '.rela.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
+
+Relocation section '.rela.plt' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
diff --git a/ld/testsuite/ld-ifunc/ifunc-18b.s b/ld/testsuite/ld-ifunc/ifunc-18b.s
new file mode 100644 (file)
index 0000000..fece413
--- /dev/null
@@ -0,0 +1,15 @@
+       .text
+       .type foo, %gnu_indirect_function
+       .hidden foo
+       .globl foo
+foo:
+       ret
+       .size   foo, .-foo
+       .globl bar
+bar:
+       jmp     foo1@PLT
+       ret
+       .size   bar, .-bar
+       .hidden foo1
+       .globl foo1
+       foo1 = foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-19a-i386.d b/ld/testsuite/ld-ifunc/ifunc-19a-i386.d
new file mode 100644 (file)
index 0000000..8319bfc
--- /dev/null
@@ -0,0 +1,14 @@
+#source: ifunc-19a.s
+#source: ifunc-19b.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+Relocation section '.rel.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
+
+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-19a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-19a-x86-64.d
new file mode 100644 (file)
index 0000000..fe576d2
--- /dev/null
@@ -0,0 +1,14 @@
+#source: ifunc-19a.s
+#source: ifunc-19b.s
+#as: --64
+#ld: -shared -melf_x86_64 -z nocombreloc
+#readelf: -r --wide
+#target: x86_64-*-*
+
+Relocation section '.rela.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
+
+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-19a.s b/ld/testsuite/ld-ifunc/ifunc-19a.s
new file mode 100644 (file)
index 0000000..3a3d0cd
--- /dev/null
@@ -0,0 +1,5 @@
+       .section .data.rel,"aw",@progbits
+       .globl foo_ptrt
+       .type   foo_ptr, @object
+foo_ptr:
+       .dc.a foo1
diff --git a/ld/testsuite/ld-ifunc/ifunc-19b-i386.d b/ld/testsuite/ld-ifunc/ifunc-19b-i386.d
new file mode 100644 (file)
index 0000000..5bb8170
--- /dev/null
@@ -0,0 +1,14 @@
+#source: ifunc-19b.s
+#source: ifunc-19a.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -r --wide
+#target: x86_64-*-* i?86-*-*
+
+Relocation section '.rel.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]*
+
+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-19b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-19b-x86-64.d
new file mode 100644 (file)
index 0000000..35fa328
--- /dev/null
@@ -0,0 +1,14 @@
+#source: ifunc-19b.s
+#source: ifunc-19a.s
+#as: --64
+#ld: -shared -melf_x86_64 -z nocombreloc
+#readelf: -r --wide
+#target: x86_64-*-*
+
+Relocation section '.rela.ifunc' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]*
+
+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-19b.s b/ld/testsuite/ld-ifunc/ifunc-19b.s
new file mode 100644 (file)
index 0000000..fece413
--- /dev/null
@@ -0,0 +1,15 @@
+       .text
+       .type foo, %gnu_indirect_function
+       .hidden foo
+       .globl foo
+foo:
+       ret
+       .size   foo, .-foo
+       .globl bar
+bar:
+       jmp     foo1@PLT
+       ret
+       .size   bar, .-bar
+       .hidden foo1
+       .globl foo1
+       foo1 = foo