This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_26-branch] [BACKPORT][ARM] PR ld/19368: Add missing relocation type class for R_ARM_IRELATIVE


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e48a6a3c4a4ae7a343dd54348d37bf9e0f246735

commit e48a6a3c4a4ae7a343dd54348d37bf9e0f246735
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Mon Jan 11 10:49:57 2016 +0000

    [BACKPORT][ARM] PR ld/19368: Add missing relocation type class for R_ARM_IRELATIVE
    
    	Apply from master
    
    	2016-01-08  Richard Sandiford  <richard.sandiford@arm.com>
    		    Jiong Wang  <jiong.wang@arm.com>
    
    	bfd/
    	PR ld/19368
    	* elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
    	reloc_class_ifunc.
    
    	ld/testsuite/
    	* 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.

Diff:
---
 bfd/ChangeLog                   | 11 ++++++++
 bfd/elf32-arm.c                 |  2 ++
 ld/testsuite/ChangeLog          | 14 ++++++++++
 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, 81 insertions(+), 54 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c28f812..d28df51 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+2016-01-11  Jiong Wang  <jiong.wang@arm.com>
+
+	Apply from master
+
+	2016-01-08  Richard Sandiford  <richard.sandiford@arm.com>
+		    Jiong Wang  <jiong.wang@arm.com>
+
+	PR ld/19368
+	* elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
+	reloc_class_ifunc.
+
 2016-01-06  Maciej W. Rozycki  <macro@imgtec.com>
 
 	Apply from master.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index fd4f743..5affc76 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -15372,6 +15372,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/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index f0ca105..2676e43 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,17 @@
+2016-01-11  Jiong Wang  <jiong.wang@arm.com>
+
+	Apply from master
+
+	2016-01-08  Jiong Wang  <jiong.wang@arm.com>
+
+	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.
+
 2015-12-04  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* ld-i386/i386.exp: Run mov2a and mov2b.
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]