diff options
author | Christophe Lyon <christophe.lyon@arm.com> | 2023-01-02 15:46:31 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@arm.com> | 2023-01-09 16:51:53 +0100 |
commit | 2b70b1b838388cc4186933a724eccd0be6b2a955 (patch) | |
tree | 69036d38b22879b05c0edbf1bb07b20caa97b434 /ld | |
parent | 4004cf83310e7f8e4cc699261cb69a8fbf6c4dda (diff) | |
download | binutils-2b70b1b838388cc4186933a724eccd0be6b2a955.zip binutils-2b70b1b838388cc4186933a724eccd0be6b2a955.tar.gz binutils-2b70b1b838388cc4186933a724eccd0be6b2a955.tar.bz2 |
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.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-arm/ifunc-12.rd | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/ifunc-3.rd | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/ifunc-4.rd | 60 |
3 files changed, 39 insertions, 39 deletions
diff --git a/ld/testsuite/ld-arm/ifunc-12.rd b/ld/testsuite/ld-arm/ifunc-12.rd index 69ed420..c5d62c1 100644 --- a/ld/testsuite/ld-arm/ifunc-12.rd +++ b/ld/testsuite/ld-arm/ifunc-12.rd @@ -5,10 +5,6 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 16 entries: 00010020 ......17 R_ARM_RELATIVE 0001100c ......17 R_ARM_RELATIVE 00011018 ......17 R_ARM_RELATIVE -00010008 ......02 R_ARM_ABS32 f2\(\) f2 -00011024 ......15 R_ARM_GLOB_DAT f2\(\) f2 -00010014 ......02 R_ARM_ABS32 f2t\(\) f2t -0001101c ......15 R_ARM_GLOB_DAT f2t\(\) f2t 00010004 ......a0 R_ARM_IRELATIVE 0001000c ......a0 R_ARM_IRELATIVE 00010010 ......a0 R_ARM_IRELATIVE @@ -17,3 +13,7 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 16 entries: 00011014 ......a0 R_ARM_IRELATIVE 00011020 ......a0 R_ARM_IRELATIVE 00011028 ......a0 R_ARM_IRELATIVE +00010008 ......02 R_ARM_ABS32 f2\(\) f2 +00011024 ......15 R_ARM_GLOB_DAT f2\(\) f2 +00010014 ......02 R_ARM_ABS32 f2t\(\) f2t +0001101c ......15 R_ARM_GLOB_DAT f2t\(\) f2t diff --git a/ld/testsuite/ld-arm/ifunc-3.rd b/ld/testsuite/ld-arm/ifunc-3.rd index e3973e4..274a4e4 100644 --- a/ld/testsuite/ld-arm/ifunc-3.rd +++ b/ld/testsuite/ld-arm/ifunc-3.rd @@ -4,16 +4,16 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 13 entries: 00010004 ......17 R_ARM_RELATIVE 0001101c ......17 R_ARM_RELATIVE 00011020 ......17 R_ARM_RELATIVE -00010014 ......02 R_ARM_ABS32 f2\(\) f2 -00010018 ......03 R_ARM_REL32 f2\(\) f2 -00011024 ......15 R_ARM_GLOB_DAT f2\(\) f2 -00010024 ......02 R_ARM_ABS32 f4\(\) f4 -00011028 ......15 R_ARM_GLOB_DAT f4\(\) f4 0001000c ......a0 R_ARM_IRELATIVE 0001001c ......a0 R_ARM_IRELATIVE 00011010 ......a0 R_ARM_IRELATIVE 00011014 ......a0 R_ARM_IRELATIVE 00011018 ......a0 R_ARM_IRELATIVE +00010014 ......02 R_ARM_ABS32 f2\(\) f2 +00010018 ......03 R_ARM_REL32 f2\(\) f2 +00011024 ......15 R_ARM_GLOB_DAT f2\(\) f2 +00010024 ......02 R_ARM_ABS32 f4\(\) f4 +00011028 ......15 R_ARM_GLOB_DAT f4\(\) f4 Relocation section '\.rel\.plt' at offset 0x8068 contains 1 entry: Offset Info Type Sym\.Value Sym\. Name diff --git a/ld/testsuite/ld-arm/ifunc-4.rd b/ld/testsuite/ld-arm/ifunc-4.rd index 43a0019..b8079d5 100644 --- a/ld/testsuite/ld-arm/ifunc-4.rd +++ b/ld/testsuite/ld-arm/ifunc-4.rd @@ -3,36 +3,6 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 62 entries: Offset Info Type Sym\.Value Sym\. Name 0001106c ......17 R_ARM_RELATIVE 00011070 ......17 R_ARM_RELATIVE -00010034 ......02 R_ARM_ABS32 aaf2\(\) aaf2 -00010038 ......03 R_ARM_REL32 aaf2\(\) aaf2 -00011088 ......15 R_ARM_GLOB_DAT aaf2\(\) aaf2 -0001003c ......02 R_ARM_ABS32 atf2\(\) atf2 -00010040 ......03 R_ARM_REL32 atf2\(\) atf2 -00011074 ......15 R_ARM_GLOB_DAT atf2\(\) atf2 -00010044 ......02 R_ARM_ABS32 abf2\(\) abf2 -00010048 ......03 R_ARM_REL32 abf2\(\) abf2 -000110a0 ......15 R_ARM_GLOB_DAT abf2\(\) abf2 -0001004c ......02 R_ARM_ABS32 taf2\(\) taf2 -00010050 ......03 R_ARM_REL32 taf2\(\) taf2 -00011084 ......15 R_ARM_GLOB_DAT taf2\(\) taf2 -00010054 ......02 R_ARM_ABS32 ttf2\(\) ttf2 -00010058 ......03 R_ARM_REL32 ttf2\(\) ttf2 -0001107c ......15 R_ARM_GLOB_DAT ttf2\(\) ttf2 -0001005c ......02 R_ARM_ABS32 tbf2\(\) tbf2 -00010060 ......03 R_ARM_REL32 tbf2\(\) tbf2 -00011080 ......15 R_ARM_GLOB_DAT tbf2\(\) tbf2 -00010094 ......02 R_ARM_ABS32 aaf4\(\) aaf4 -00011078 ......15 R_ARM_GLOB_DAT aaf4\(\) aaf4 -0001009c ......02 R_ARM_ABS32 atf4\(\) atf4 -00011098 ......15 R_ARM_GLOB_DAT atf4\(\) atf4 -000100a4 ......02 R_ARM_ABS32 abf4\(\) abf4 -0001108c ......15 R_ARM_GLOB_DAT abf4\(\) abf4 -000100ac ......02 R_ARM_ABS32 taf4\(\) taf4 -0001109c ......15 R_ARM_GLOB_DAT taf4\(\) taf4 -000100b4 ......02 R_ARM_ABS32 ttf4\(\) ttf4 -00011094 ......15 R_ARM_GLOB_DAT ttf4\(\) ttf4 -000100bc ......02 R_ARM_ABS32 tbf4\(\) tbf4 -00011090 ......15 R_ARM_GLOB_DAT tbf4\(\) tbf4 00010004 ......a0 R_ARM_IRELATIVE 0001000c ......a0 R_ARM_IRELATIVE 00010014 ......a0 R_ARM_IRELATIVE @@ -63,6 +33,36 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 62 entries: 00011060 ......a0 R_ARM_IRELATIVE 00011064 ......a0 R_ARM_IRELATIVE 00011068 ......a0 R_ARM_IRELATIVE +00010034 ......02 R_ARM_ABS32 aaf2\(\) aaf2 +00010038 ......03 R_ARM_REL32 aaf2\(\) aaf2 +00011088 ......15 R_ARM_GLOB_DAT aaf2\(\) aaf2 +0001003c ......02 R_ARM_ABS32 atf2\(\) atf2 +00010040 ......03 R_ARM_REL32 atf2\(\) atf2 +00011074 ......15 R_ARM_GLOB_DAT atf2\(\) atf2 +00010044 ......02 R_ARM_ABS32 abf2\(\) abf2 +00010048 ......03 R_ARM_REL32 abf2\(\) abf2 +000110a0 ......15 R_ARM_GLOB_DAT abf2\(\) abf2 +0001004c ......02 R_ARM_ABS32 taf2\(\) taf2 +00010050 ......03 R_ARM_REL32 taf2\(\) taf2 +00011084 ......15 R_ARM_GLOB_DAT taf2\(\) taf2 +00010054 ......02 R_ARM_ABS32 ttf2\(\) ttf2 +00010058 ......03 R_ARM_REL32 ttf2\(\) ttf2 +0001107c ......15 R_ARM_GLOB_DAT ttf2\(\) ttf2 +0001005c ......02 R_ARM_ABS32 tbf2\(\) tbf2 +00010060 ......03 R_ARM_REL32 tbf2\(\) tbf2 +00011080 ......15 R_ARM_GLOB_DAT tbf2\(\) tbf2 +00010094 ......02 R_ARM_ABS32 aaf4\(\) aaf4 +00011078 ......15 R_ARM_GLOB_DAT aaf4\(\) aaf4 +0001009c ......02 R_ARM_ABS32 atf4\(\) atf4 +00011098 ......15 R_ARM_GLOB_DAT atf4\(\) atf4 +000100a4 ......02 R_ARM_ABS32 abf4\(\) abf4 +0001108c ......15 R_ARM_GLOB_DAT abf4\(\) abf4 +000100ac ......02 R_ARM_ABS32 taf4\(\) taf4 +0001109c ......15 R_ARM_GLOB_DAT taf4\(\) taf4 +000100b4 ......02 R_ARM_ABS32 ttf4\(\) ttf4 +00011094 ......15 R_ARM_GLOB_DAT ttf4\(\) ttf4 +000100bc ......02 R_ARM_ABS32 tbf4\(\) tbf4 +00011090 ......15 R_ARM_GLOB_DAT tbf4\(\) tbf4 Relocation section '\.rel\.plt' at offset 0x81f0 contains 6 entries: Offset Info Type Sym\.Value Sym\. Name |