]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
S/390: use BFD_RELOC_<n>_PLT_PCREL in favor of custom types
authorJan Beulich <jbeulich@suse.com>
Mon, 15 Dec 2025 09:49:07 +0000 (10:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 15 Dec 2025 09:49:07 +0000 (10:49 +0100)
No reason to have separate types when the generic ones have no (other)
meaning for this target.

bfd/bfd-in2.h
bfd/elf32-s390.c
bfd/elf64-s390.c
bfd/libbfd.h
bfd/reloc.c
gas/config/tc-s390.c

index bb5542a63dfeb4a8ce9c17705c8f25a8b08b26b4..0b9cdb996a046c7c9fac99b08293bbe50e8278ba 100644 (file)
@@ -5500,9 +5500,6 @@ enum bfd_reloc_code_real
   /* 12 bit GOT offset.  */
   BFD_RELOC_390_GOT12,
 
-  /* 32 bit PC relative PLT address.  */
-  BFD_RELOC_390_PLT32,
-
   /* Copy symbol at runtime.  */
   BFD_RELOC_390_COPY,
 
@@ -5551,9 +5548,6 @@ enum bfd_reloc_code_real
   /* 64 bit GOT offset.  */
   BFD_RELOC_390_GOT64,
 
-  /* 64 bit PC relative PLT address.  */
-  BFD_RELOC_390_PLT64,
-
   /* 32 bit rel. offset to GOT entry.  */
   BFD_RELOC_390_GOTENT,
 
index 5e0c783b39aabff1674f77e984353d08e6f90f1b..80939c1c735d654a46414e2c0826d6b059d133f0 100644 (file)
@@ -201,7 +201,7 @@ elf_s390_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
       return &elf_howto_table[(int) R_390_GOT12];
     case BFD_RELOC_32_GOT_PCREL:
       return &elf_howto_table[(int) R_390_GOT32];
-    case BFD_RELOC_390_PLT32:
+    case BFD_RELOC_32_PLT_PCREL:
       return &elf_howto_table[(int) R_390_PLT32];
     case BFD_RELOC_390_COPY:
       return &elf_howto_table[(int) R_390_COPY];
index 440e60af5be57528c41762f1bcb1dcefc91df2f6..9e58bb21e707bd8fb6091954cf996f7fe9a69bee 100644 (file)
@@ -215,7 +215,7 @@ elf_s390_reloc_type_lookup (bfd *abfd,
       return &elf_howto_table[(int) R_390_GOT12];
     case BFD_RELOC_32_GOT_PCREL:
       return &elf_howto_table[(int) R_390_GOT32];
-    case BFD_RELOC_390_PLT32:
+    case BFD_RELOC_32_PLT_PCREL:
       return &elf_howto_table[(int) R_390_PLT32];
     case BFD_RELOC_390_COPY:
       return &elf_howto_table[(int) R_390_COPY];
@@ -257,7 +257,7 @@ elf_s390_reloc_type_lookup (bfd *abfd,
       return &elf_howto_table[(int) R_390_PC64];
     case BFD_RELOC_390_GOT64:
       return &elf_howto_table[(int) R_390_GOT64];
-    case BFD_RELOC_390_PLT64:
+    case BFD_RELOC_64_PLT_PCREL:
       return &elf_howto_table[(int) R_390_PLT64];
     case BFD_RELOC_390_GOTENT:
       return &elf_howto_table[(int) R_390_GOTENT];
index 795241a6361c83936528f5350a872f6ea6b778da..e6bb146e7d0622700626b3e2008043a19e74f6f4 100644 (file)
@@ -2491,7 +2491,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_RX_RELAX",
   "BFD_RELOC_390_12",
   "BFD_RELOC_390_GOT12",
-  "BFD_RELOC_390_PLT32",
   "BFD_RELOC_390_COPY",
   "BFD_RELOC_390_GLOB_DAT",
   "BFD_RELOC_390_JMP_SLOT",
@@ -2508,7 +2507,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_390_PLT32DBL",
   "BFD_RELOC_390_GOTPCDBL",
   "BFD_RELOC_390_GOT64",
-  "BFD_RELOC_390_PLT64",
   "BFD_RELOC_390_GOTENT",
   "BFD_RELOC_390_GOTOFF64",
   "BFD_RELOC_390_GOTPLT12",
index 9bf431a9f2f77a4f3629f83338380df71d82924b..2fca454d26f36a2e283202c77fee817762fa1dc5 100644 (file)
@@ -5146,10 +5146,6 @@ ENUM
   BFD_RELOC_390_GOT12
 ENUMDOC
   12 bit GOT offset.
-ENUM
-  BFD_RELOC_390_PLT32
-ENUMDOC
-  32 bit PC relative PLT address.
 ENUM
   BFD_RELOC_390_COPY
 ENUMDOC
@@ -5214,10 +5210,6 @@ ENUM
   BFD_RELOC_390_GOT64
 ENUMDOC
   64 bit GOT offset.
-ENUM
-  BFD_RELOC_390_PLT64
-ENUMDOC
-  64 bit PC relative PLT address.
 ENUM
   BFD_RELOC_390_GOTENT
 ENUMDOC
index ca6a20726efbdd88b6028e34d0e653dcafd4da60..2d69903765139dfc261e791593d3365d6f070400 100644 (file)
@@ -1114,9 +1114,9 @@ s390_lit_suffix (char **str_p, expressionS *exp_p, elf_suffix_type suffix)
   else if (suffix == ELF_SUFFIX_PLT)
     {
       if (nbytes == 4)
-       reloc = BFD_RELOC_390_PLT32;
+       reloc = BFD_RELOC_32_PLT_PCREL;
       else if (nbytes == 8)
-       reloc = BFD_RELOC_390_PLT64;
+       reloc = BFD_RELOC_64_PLT_PCREL;
     }
 
   if (suffix != ELF_SUFFIX_NONE && reloc == BFD_RELOC_UNUSED)
@@ -1272,7 +1272,7 @@ s390_elf_cons (int nbytes /* 1=.byte, 2=.word, 4=.long */)
                {
                  BFD_RELOC_UNUSED,             /* ELF_SUFFIX_NONE  */
                  BFD_RELOC_32_GOT_PCREL,       /* ELF_SUFFIX_GOT  */
-                 BFD_RELOC_390_PLT32,          /* ELF_SUFFIX_PLT  */
+                 BFD_RELOC_32_PLT_PCREL,       /* ELF_SUFFIX_PLT  */
                  BFD_RELOC_UNUSED,             /* ELF_SUFFIX_GOTENT  */
                  BFD_RELOC_32_GOTOFF,          /* ELF_SUFFIX_GOTOFF  */
                  BFD_RELOC_390_GOTPLT32,       /* ELF_SUFFIX_GOTPLT  */
@@ -1292,7 +1292,7 @@ s390_elf_cons (int nbytes /* 1=.byte, 2=.word, 4=.long */)
                {
                  BFD_RELOC_UNUSED,             /* ELF_SUFFIX_NONE  */
                  BFD_RELOC_390_GOT64,          /* ELF_SUFFIX_GOT  */
-                 BFD_RELOC_390_PLT64,          /* ELF_SUFFIX_PLT  */
+                 BFD_RELOC_64_PLT_PCREL,       /* ELF_SUFFIX_PLT  */
                  BFD_RELOC_UNUSED,             /* ELF_SUFFIX_GOTENT  */
                  BFD_RELOC_390_GOTOFF64,       /* ELF_SUFFIX_GOTOFF  */
                  BFD_RELOC_390_GOTPLT64,       /* ELF_SUFFIX_GOTPLT  */
@@ -2390,9 +2390,9 @@ tc_s390_fix_adjustable (fixS *fixP)
       || fixP->fx_r_type == BFD_RELOC_390_PLT12DBL
       || fixP->fx_r_type == BFD_RELOC_390_PLT16DBL
       || fixP->fx_r_type == BFD_RELOC_390_PLT24DBL
-      || fixP->fx_r_type == BFD_RELOC_390_PLT32
+      || fixP->fx_r_type == BFD_RELOC_32_PLT_PCREL
       || fixP->fx_r_type == BFD_RELOC_390_PLT32DBL
-      || fixP->fx_r_type == BFD_RELOC_390_PLT64
+      || fixP->fx_r_type == BFD_RELOC_64_PLT_PCREL
       || fixP->fx_r_type == BFD_RELOC_390_GOT12
       || fixP->fx_r_type == BFD_RELOC_390_GOT20
       || fixP->fx_r_type == BFD_RELOC_390_GOT16
@@ -2454,12 +2454,12 @@ tc_s390_force_relocation (struct fix *fixp)
     case BFD_RELOC_390_GOTPCDBL:
     case BFD_RELOC_390_GOT64:
     case BFD_RELOC_390_GOTENT:
-    case BFD_RELOC_390_PLT32:
+    case BFD_RELOC_32_PLT_PCREL:
     case BFD_RELOC_390_PLT12DBL:
     case BFD_RELOC_390_PLT16DBL:
     case BFD_RELOC_390_PLT24DBL:
     case BFD_RELOC_390_PLT32DBL:
-    case BFD_RELOC_390_PLT64:
+    case BFD_RELOC_64_PLT_PCREL:
     case BFD_RELOC_390_GOTPLT12:
     case BFD_RELOC_390_GOTPLT16:
     case BFD_RELOC_390_GOTPLT20:
@@ -2730,7 +2730,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
          break;
        case BFD_RELOC_32_GOT_PCREL:
        case BFD_RELOC_390_PLTOFF32:
-       case BFD_RELOC_390_PLT32:
+       case BFD_RELOC_32_PLT_PCREL:
        case BFD_RELOC_390_GOTPLT32:
          if (fixP->fx_done)
            md_number_to_chars (where, value, 4);
@@ -2757,7 +2757,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
 
        case BFD_RELOC_390_GOT64:
        case BFD_RELOC_390_PLTOFF64:
-       case BFD_RELOC_390_PLT64:
+       case BFD_RELOC_64_PLT_PCREL:
        case BFD_RELOC_390_GOTPLT64:
          if (fixP->fx_done)
            md_number_to_chars (where, value, 8);