[binutils-gdb] Don't handle BFD_RELOC_16 in XCOFF reloc_type_lookup

Alan Modra amodra@sourceware.org
Mon Feb 22 05:02:55 GMT 2021


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

commit e9d18e0649ae83fcfafd325a2366973efde43b38
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Feb 22 13:59:34 2021 +1030

    Don't handle BFD_RELOC_16 in XCOFF reloc_type_lookup
    
    It's not needed for sizing fixups since 0e2779e98dc, and wrong to emit
    this reloc to the object file.
    
            * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
            * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.

Diff:
---
 bfd/ChangeLog       | 5 +++++
 bfd/coff-rs6000.c   | 3 ---
 bfd/coff64-rs6000.c | 3 ---
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7c7afe1edb0..7a41a149aec 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2021-02-22  Alan Modra  <amodra@gmail.com>
+
+	* coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
+	* coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
+
 2021-02-19  Nelson Chu  <nelson.chu@sifive.com>
 
 	PR 27158
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index fbc1aed3118..54fbf58e3ae 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -1092,9 +1092,6 @@ _bfd_xcoff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
       return &xcoff_howto_table[8];
     case BFD_RELOC_PPC_TOC16:
       return &xcoff_howto_table[3];
-    case BFD_RELOC_16:
-      /* Note that this relocation is only internally used by gas.  */
-      return &xcoff_howto_table[0xc];
     case BFD_RELOC_PPC_B16:
       return &xcoff_howto_table[0x1d];
     case BFD_RELOC_32:
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 9aa0304ec9f..98b0066822a 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1814,9 +1814,6 @@ xcoff64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
       return &xcoff64_howto_table[8];
     case BFD_RELOC_PPC_TOC16:
       return &xcoff64_howto_table[3];
-    case BFD_RELOC_16:
-      /* Note that this relocation is only internally used by gas.  */
-      return &xcoff64_howto_table[0xc];
     case BFD_RELOC_PPC_B16:
       return &xcoff64_howto_table[0x1e];
     case BFD_RELOC_32:


More information about the Binutils-cvs mailing list