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:52:40 +0000 (16:52 +0100)
commit5d546b26ceca0e10c51c04b895d83b1460ea38c6
treebe304d834709f277b694bdaa20f78a77e7e20485
parent417d329214d934786e0c3b8a25d8ef16e63e784d
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