[14/14] bfd/s12z: put relocations next to each other

Message ID 64ab0c36-2a5a-4e1f-8d39-438e32059780@suse.com
State New
Headers
Series bfd: a little bit of reloc enum cleanup |

Commit Message

Jan Beulich Nov. 28, 2025, 11:53 a.m. UTC
  It's not helpful to have two separate "sections", each with a single
relocation.
  

Patch

--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -5826,11 +5826,6 @@  enum bfd_reloc_code_real
      follows a matching LO8XG part.  */
   BFD_RELOC_M68HC12_HI8XG,
 
-  /* Freescale S12Z reloc.
-     This is a 15 bit relative address.  If the most significant bits are
-     all zero then it may be truncated to 8 bits.  */
-  BFD_RELOC_S12Z_15_PCREL,
-
   /* NS CR16 Relocations.  */
   BFD_RELOC_CR16_NUM8,
   BFD_RELOC_CR16_NUM16,
@@ -7207,9 +7202,13 @@  enum bfd_reloc_code_real
   BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4,
   BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4,
 
-  /* S12Z relocations.  */
+  /* Freescale S12Z relocations.  */
   BFD_RELOC_S12Z_OPR,
 
+  /* This is a 15 bit relative address.  If the most significant bits are
+     all zero then it may be truncated to 8 bits.  */
+  BFD_RELOC_S12Z_15_PCREL,
+
   /* LARCH relocations.  */
   BFD_RELOC_LARCH_TLS_DTPMOD32,
   BFD_RELOC_LARCH_TLS_DTPREL32,
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -2616,7 +2616,6 @@  static const char *const bfd_reloc_code_
   "BFD_RELOC_M68HC12_10_PCREL",
   "BFD_RELOC_M68HC12_LO8XG",
   "BFD_RELOC_M68HC12_HI8XG",
-  "BFD_RELOC_S12Z_15_PCREL",
   "BFD_RELOC_CR16_NUM8",
   "BFD_RELOC_CR16_NUM16",
   "BFD_RELOC_CR16_NUM32",
@@ -3382,6 +3381,7 @@  static const char *const bfd_reloc_code_
   "BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4",
   "BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4",
   "BFD_RELOC_S12Z_OPR",
+  "BFD_RELOC_S12Z_15_PCREL",
   "BFD_RELOC_LARCH_TLS_DTPMOD32",
   "BFD_RELOC_LARCH_TLS_DTPREL32",
   "BFD_RELOC_LARCH_TLS_DTPMOD64",
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -5592,12 +5592,6 @@  ENUMDOC
   Motorola 68HC12/XGATE reloc.
   This is the 8 bit high part of an absolute address and immediately
   follows a matching LO8XG part.
-ENUM
-  BFD_RELOC_S12Z_15_PCREL
-ENUMDOC
-  Freescale S12Z reloc.
-  This is a 15 bit relative address.  If the most significant bits are
-  all zero then it may be truncated to 8 bits.
 
 ENUM
   BFD_RELOC_CR16_NUM8
@@ -7768,7 +7762,12 @@  ENUMDOC
 ENUM
   BFD_RELOC_S12Z_OPR
 ENUMDOC
-  S12Z relocations.
+  Freescale S12Z relocations.
+ENUM
+  BFD_RELOC_S12Z_15_PCREL
+ENUMDOC
+  This is a 15 bit relative address.  If the most significant bits are
+  all zero then it may be truncated to 8 bits.
 
 ENUM
   BFD_RELOC_LARCH_TLS_DTPMOD32