From 109575d7ebac21a0eb67980001ecd4173d696f88 Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Fri, 8 Jan 2016 09:47:24 +0000 Subject: [PATCH] [ARM] PR ld/19368: Add missing relocation type class for R_ARM_IRELATIVE 2016-01-08 Richard Sandiford Jiong Wang PR ld/19368 bfd/ * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to reloc_class_ifunc. ld/ * testsuite/ld-arm/ifunc-3.rd: Update expected result. * testsuite/ld-arm/ifunc-4.rd: Likewise. * testsuite/ld-arm/ifunc-9.rd: Likewise. * testsuite/ld-arm/ifunc-10.rd: Likewise. * testsuite/ld-arm/ifunc-12.rd: Likewise. * testsuite/ld-arm/ifunc-13.rd: Likewise. --- bfd/ChangeLog | 7 +++++ bfd/elf32-arm.c | 2 ++ ld/ChangeLog | 10 +++++++ ld/testsuite/ld-arm/ifunc-10.rd | 24 ++++++++--------- ld/testsuite/ld-arm/ifunc-12.rd | 8 +++--- ld/testsuite/ld-arm/ifunc-13.rd | 4 +-- ld/testsuite/ld-arm/ifunc-3.rd | 10 +++---- ld/testsuite/ld-arm/ifunc-4.rd | 60 ++++++++++++++++++++--------------------- ld/testsuite/ld-arm/ifunc-9.rd | 2 +- 9 files changed, 73 insertions(+), 54 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 33cbe65..d1c5a3b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2016-01-08 Richard Sandiford + Jiong Wang + + PR ld/19368 + * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to + reloc_class_ifunc. + 2016-01-06 Andrew Burgess * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index f059950..c594e65 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -15535,6 +15535,8 @@ elf32_arm_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, return reloc_class_plt; case R_ARM_COPY: return reloc_class_copy; + case R_ARM_IRELATIVE: + return reloc_class_ifunc; default: return reloc_class_normal; } diff --git a/ld/ChangeLog b/ld/ChangeLog index 528cc6e..09e51b5 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2016-01-08 Jiong Wang + + PR ld/19368 + * testsuite/ld-arm/ifunc-3.rd: Update expected result. + * testsuite/ld-arm/ifunc-4.rd: Likewise. + * testsuite/ld-arm/ifunc-9.rd: Likewise. + * testsuite/ld-arm/ifunc-10.rd: Likewise. + * testsuite/ld-arm/ifunc-12.rd: Likewise. + * testsuite/ld-arm/ifunc-13.rd: Likewise. + 2016-01-05 Nick Clifton * emulparams/msp430elf.sh (RAM_START): Move to 0x500 - above the diff --git a/ld/testsuite/ld-arm/ifunc-10.rd b/ld/testsuite/ld-arm/ifunc-10.rd index 8846197..250def8 100644 --- a/ld/testsuite/ld-arm/ifunc-10.rd +++ b/ld/testsuite/ld-arm/ifunc-10.rd @@ -1,18 +1,6 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 24 entries: Offset Info Type Sym\.Value Sym\. Name -0001103c ......a0 R_ARM_IRELATIVE -00011040 ......a0 R_ARM_IRELATIVE -00011044 ......a0 R_ARM_IRELATIVE -00011048 ......a0 R_ARM_IRELATIVE -0001104c ......a0 R_ARM_IRELATIVE -00011050 ......a0 R_ARM_IRELATIVE -00011054 ......a0 R_ARM_IRELATIVE -00011058 ......a0 R_ARM_IRELATIVE -0001105c ......a0 R_ARM_IRELATIVE -00011060 ......a0 R_ARM_IRELATIVE -00011064 ......a0 R_ARM_IRELATIVE -00011068 ......a0 R_ARM_IRELATIVE 0001108c ......15 R_ARM_GLOB_DAT 00009018 atf2 00011090 ......15 R_ARM_GLOB_DAT 00009024 aaf4 00011094 ......15 R_ARM_GLOB_DAT 00009034 ttf2 @@ -25,6 +13,18 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 24 entries: 000110c8 ......15 R_ARM_GLOB_DAT 0000909c atf4 000110cc ......15 R_ARM_GLOB_DAT 000090a8 taf4 000110d0 ......15 R_ARM_GLOB_DAT 000090b8 abf2 +0001103c ......a0 R_ARM_IRELATIVE +00011040 ......a0 R_ARM_IRELATIVE +00011044 ......a0 R_ARM_IRELATIVE +00011048 ......a0 R_ARM_IRELATIVE +0001104c ......a0 R_ARM_IRELATIVE +00011050 ......a0 R_ARM_IRELATIVE +00011054 ......a0 R_ARM_IRELATIVE +00011058 ......a0 R_ARM_IRELATIVE +0001105c ......a0 R_ARM_IRELATIVE +00011060 ......a0 R_ARM_IRELATIVE +00011064 ......a0 R_ARM_IRELATIVE +00011068 ......a0 R_ARM_IRELATIVE Relocation section '\.rel\.plt' at offset 0x80c0 contains 12 entries: Offset Info Type Sym\.Value Sym\. Name diff --git a/ld/testsuite/ld-arm/ifunc-12.rd b/ld/testsuite/ld-arm/ifunc-12.rd index c5d62c1..69ed420 100644 --- a/ld/testsuite/ld-arm/ifunc-12.rd +++ b/ld/testsuite/ld-arm/ifunc-12.rd @@ -5,6 +5,10 @@ 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 @@ -13,7 +17,3 @@ 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-13.rd b/ld/testsuite/ld-arm/ifunc-13.rd index c58ab8a..f4394fa 100644 --- a/ld/testsuite/ld-arm/ifunc-13.rd +++ b/ld/testsuite/ld-arm/ifunc-13.rd @@ -1,9 +1,9 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 6 entries: Offset Info Type Sym\.Value Sym\. Name +0001101c ......15 R_ARM_GLOB_DAT 00000000 f2t +00011024 ......15 R_ARM_GLOB_DAT 00000000 f2 00011010 ......a0 R_ARM_IRELATIVE 00011014 ......a0 R_ARM_IRELATIVE 00011020 ......a0 R_ARM_IRELATIVE 00011028 ......a0 R_ARM_IRELATIVE -0001101c ......15 R_ARM_GLOB_DAT 00000000 f2t -00011024 ......15 R_ARM_GLOB_DAT 00000000 f2 diff --git a/ld/testsuite/ld-arm/ifunc-3.rd b/ld/testsuite/ld-arm/ifunc-3.rd index 4acb314..0ac011a 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 -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 +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 Relocation section '\.rel\.plt' at offset 0x8068 contains 1 entries: 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 b8079d5..43a0019 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 -00010004 ......a0 R_ARM_IRELATIVE -0001000c ......a0 R_ARM_IRELATIVE -00010014 ......a0 R_ARM_IRELATIVE -0001001c ......a0 R_ARM_IRELATIVE -00010024 ......a0 R_ARM_IRELATIVE -0001002c ......a0 R_ARM_IRELATIVE -00010064 ......a0 R_ARM_IRELATIVE -0001006c ......a0 R_ARM_IRELATIVE -00010074 ......a0 R_ARM_IRELATIVE -0001007c ......a0 R_ARM_IRELATIVE -00010084 ......a0 R_ARM_IRELATIVE -0001008c ......a0 R_ARM_IRELATIVE -00011024 ......a0 R_ARM_IRELATIVE -00011028 ......a0 R_ARM_IRELATIVE -0001102c ......a0 R_ARM_IRELATIVE -00011030 ......a0 R_ARM_IRELATIVE -00011034 ......a0 R_ARM_IRELATIVE -00011038 ......a0 R_ARM_IRELATIVE -0001103c ......a0 R_ARM_IRELATIVE -00011040 ......a0 R_ARM_IRELATIVE -00011044 ......a0 R_ARM_IRELATIVE -00011048 ......a0 R_ARM_IRELATIVE -0001104c ......a0 R_ARM_IRELATIVE -00011050 ......a0 R_ARM_IRELATIVE -00011054 ......a0 R_ARM_IRELATIVE -00011058 ......a0 R_ARM_IRELATIVE -0001105c ......a0 R_ARM_IRELATIVE -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 @@ -63,6 +33,36 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 62 entries: 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 +0001001c ......a0 R_ARM_IRELATIVE +00010024 ......a0 R_ARM_IRELATIVE +0001002c ......a0 R_ARM_IRELATIVE +00010064 ......a0 R_ARM_IRELATIVE +0001006c ......a0 R_ARM_IRELATIVE +00010074 ......a0 R_ARM_IRELATIVE +0001007c ......a0 R_ARM_IRELATIVE +00010084 ......a0 R_ARM_IRELATIVE +0001008c ......a0 R_ARM_IRELATIVE +00011024 ......a0 R_ARM_IRELATIVE +00011028 ......a0 R_ARM_IRELATIVE +0001102c ......a0 R_ARM_IRELATIVE +00011030 ......a0 R_ARM_IRELATIVE +00011034 ......a0 R_ARM_IRELATIVE +00011038 ......a0 R_ARM_IRELATIVE +0001103c ......a0 R_ARM_IRELATIVE +00011040 ......a0 R_ARM_IRELATIVE +00011044 ......a0 R_ARM_IRELATIVE +00011048 ......a0 R_ARM_IRELATIVE +0001104c ......a0 R_ARM_IRELATIVE +00011050 ......a0 R_ARM_IRELATIVE +00011054 ......a0 R_ARM_IRELATIVE +00011058 ......a0 R_ARM_IRELATIVE +0001105c ......a0 R_ARM_IRELATIVE +00011060 ......a0 R_ARM_IRELATIVE +00011064 ......a0 R_ARM_IRELATIVE +00011068 ......a0 R_ARM_IRELATIVE Relocation section '\.rel\.plt' at offset 0x81f0 contains 6 entries: Offset Info Type Sym\.Value Sym\. Name diff --git a/ld/testsuite/ld-arm/ifunc-9.rd b/ld/testsuite/ld-arm/ifunc-9.rd index 689f663..e1ceb54 100644 --- a/ld/testsuite/ld-arm/ifunc-9.rd +++ b/ld/testsuite/ld-arm/ifunc-9.rd @@ -1,9 +1,9 @@ Relocation section '\.rel\.dyn' at offset 0x8000 contains 3 entries: Offset Info Type Sym\.Value Sym\. Name +00011028 ......15 R_ARM_GLOB_DAT 00009014 f2 00011010 ......a0 R_ARM_IRELATIVE 00011014 ......a0 R_ARM_IRELATIVE -00011028 ......15 R_ARM_GLOB_DAT 00009014 f2 Relocation section '\.rel\.plt' at offset 0x8018 contains 1 entries: Offset Info Type Sym\.Value Sym\. Name -- 2.7.4