Fix PR18841 ifunc relocation ordering
authorChristophe Lyon <christophe.lyon@arm.com>
Mon, 2 Jan 2023 15:46:31 +0000 (15:46 +0000)
committerChristophe Lyon <christophe.lyon@arm.com>
Mon, 9 Jan 2023 15:51:53 +0000 (16:51 +0100)
commit2b70b1b838388cc4186933a724eccd0be6b2a955
tree69036d38b22879b05c0edbf1bb07b20caa97b434
parent4004cf83310e7f8e4cc699261cb69a8fbf6c4dda
Fix PR18841 ifunc relocation ordering

In order to get the ifunc relocs properly sorted the correct class
needs to be returned.  The code mimics what has been done for AArch64.

Fixes:
FAIL: Run pr18841 with libpr18841b.so
FAIL: Run pr18841 with libpr18841c.so
FAIL: Run pr18841 with libpr18841bn.so (-z now)
FAIL: Run pr18841 with libpr18841cn.so (-z now)

bfd/
PR ld/18841
* elf32-arm.c (elf32_arm_reloc_type_class): Return
reloc_class_ifunc for ifunc symbols.

ld/testsuite/
* ld-arm/ifunc-12.rd: Update relocations order.
* ld-arm/ifunc-3.rd: Likewise.
* ld-arm/ifunc-4.rd: Likewise.
bfd/elf32-arm.c
ld/testsuite/ld-arm/ifunc-12.rd
ld/testsuite/ld-arm/ifunc-3.rd
ld/testsuite/ld-arm/ifunc-4.rd