PR22374 testcase, function pointer references in .data
authorAlan Modra <amodra@gmail.com>
Tue, 31 Oct 2017 00:43:30 +0000 (11:13 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 1 Nov 2017 08:15:34 +0000 (18:45 +1030)
commite48f0c8f1b9fdb195394dc7afea02ce55e4ba5e4
treed2b4ea2ba537515a88f277b056a99dae6d9d32d1
parent46b06a98d112ee433a8f81c700a8852c92ca8132
PR22374 testcase, function pointer references in .data

Function pointer references in .data ought to use a dynamic reloc.
There shouldn't be any need for a PLT entry and definitely no copy
reloc.

This test fails on quite a few targets, but isn't something that
anyone should worry about too much.  It's really just a missed
optimization.

PR 22374
* testsuite/ld-elf/pr22374a.s,
* testsuite/ld-elf/pr22374b.s,
* testsuite/ld-elf/pr22374-1.r,
* testsuite/ld-elf/pr22374-2.r: New test.
* testsuite/ld-elf/elf.exp: Run it.
ld/ChangeLog
ld/testsuite/ld-elf/elf.exp
ld/testsuite/ld-elf/pr22374-1.r [new file with mode: 0644]
ld/testsuite/ld-elf/pr22374-2.r [new file with mode: 0644]
ld/testsuite/ld-elf/pr22374a.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr22374b.s [new file with mode: 0644]