diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-04-21 22:25:38 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-04-21 22:25:38 +0000 |
commit | d1965428471fbf2f45b0cc8058aba462bed54c18 (patch) | |
tree | 2eaf730a56054bd28acf4071994f86e346bdc195 /ld/testsuite/ld-ifunc | |
parent | 953e7c8527db02534cde0d9adafeb4e8b26c82d7 (diff) | |
download | binutils-redhat-d1965428471fbf2f45b0cc8058aba462bed54c18.tar.gz |
Skip local IFUNC symbols when checking dynamic relocs in read-only sections.
bfd/
2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12694
* elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
symbols.
* elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
ld/testsuite/
2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12694
* ld-ifunc/ifunc-14-i386.d: New.
* ld-ifunc/ifunc-14-x86-64.d: Likewise.
* ld-ifunc/ifunc-14a.s: Likewise.
* ld-ifunc/ifunc-14b.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-ifunc')
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-14-i386.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-14-x86-64.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-14a.s | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-14b.s | 5 |
4 files changed, 34 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc-14-i386.d b/ld/testsuite/ld-ifunc/ifunc-14-i386.d new file mode 100644 index 0000000000..0edc9fbbd5 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-14-i386.d @@ -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-14-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14-x86-64.d new file mode 100644 index 0000000000..2c4ebbb03b --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-14-x86-64.d @@ -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-14a.s b/ld/testsuite/ld-ifunc/ifunc-14a.s new file mode 100644 index 0000000000..9f2060441c --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-14a.s @@ -0,0 +1,7 @@ + .text + .globl bar + .type bar, @function +bar: + jmp foo + .size bar, .-bar + .hidden foo diff --git a/ld/testsuite/ld-ifunc/ifunc-14b.s b/ld/testsuite/ld-ifunc/ifunc-14b.s new file mode 100644 index 0000000000..bac22eb435 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-14b.s @@ -0,0 +1,5 @@ + .type foo, %gnu_indirect_function + .globl foo +foo: + ret + .size foo, .-foo |