diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-08-11 12:58:52 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-08-11 12:59:11 -0700 |
commit | 97dc35c88dd470465a99edeb0b491012a368f2bf (patch) | |
tree | dbbd0ec476974879e80a24140beed3c941f315a8 /ld/testsuite/ld-ifunc/ifunc.exp | |
parent | 922c5db5e733526f12e2fbfeb72c7f1f90089d53 (diff) | |
download | binutils-97dc35c88dd470465a99edeb0b491012a368f2bf.zip binutils-97dc35c88dd470465a99edeb0b491012a368f2bf.tar.gz binutils-97dc35c88dd470465a99edeb0b491012a368f2bf.tar.bz2 |
Skip IFUNC relocations in debug sections
Skip IFUNC relocations in debug sections ignored by ld.so.
bfd/
PR ld/18808
* elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
relocations in debug sections.
* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
ld/testsuite/
PR ld/18808
* ld-ifunc/ifunc.exp: Add a test for PR ld/18808.
* ld-ifunc/pr18808.out: New file.
* ld-ifunc/pr18808a.c: Likewise.
* ld-ifunc/pr18808b.c: Likewise.
Diffstat (limited to 'ld/testsuite/ld-ifunc/ifunc.exp')
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc.exp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp index e08261b..498cb2d 100644 --- a/ld/testsuite/ld-ifunc/ifunc.exp +++ b/ld/testsuite/ld-ifunc/ifunc.exp @@ -457,3 +457,30 @@ run_ld_link_exec_tests [] [list \ "-fpic" \ ] \ ] + +# Run-time tests which require working ifunc attribute support. +if { ![check_ifunc_attribute_available] } { + return +} + +run_cc_link_tests [list \ + [list \ + "Build libpr18808.so" \ + "-shared" \ + "-fPIC -O2 -g" \ + { pr18808b.c } \ + {} \ + "libpr18808.so" \ + ] \ +] + +run_ld_link_exec_tests [] [list \ + [list \ + "Run pr18808" \ + "tmpdir/libpr18808.so" \ + "" \ + { pr18808a.c } \ + "pr18808" \ + "pr18808.out" \ + ] \ +] |