+2020-06-06  Alan Modra  <amodra@gmail.com>
+
+       * reloc.c: Rename
+       BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
+       BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
+       BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
+       BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34.
+       * elf64-ppc.c: Update throughout for reloc renaming.
+       (ppc64_elf_reloc_name_lookup): Handle old reloc names.
+       * libbfd.h: Regenerate.
+       * bfd-in2.h: Regenerate.
+
 2020-06-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/26080
 
   BFD_RELOC_PPC64_DTPREL16_HIGHESTA,
   BFD_RELOC_PPC64_TPREL34,
   BFD_RELOC_PPC64_DTPREL34,
-  BFD_RELOC_PPC64_GOT_TLSGD34,
-  BFD_RELOC_PPC64_GOT_TLSLD34,
-  BFD_RELOC_PPC64_GOT_TPREL34,
-  BFD_RELOC_PPC64_GOT_DTPREL34,
+  BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
+  BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
+  BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
+  BFD_RELOC_PPC64_GOT_DTPREL_PCREL34,
   BFD_RELOC_PPC64_TLS_PCREL,
 
 /* IBM 370/390 relocations  */
 
   HOW (R_PPC64_DTPREL34, 4, 34, 0x3ffff0000ffffULL, 0, FALSE, signed,
        ppc64_elf_unhandled_reloc),
 
-  HOW (R_PPC64_GOT_TLSGD34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed,
+  HOW (R_PPC64_GOT_TLSGD_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed,
        ppc64_elf_unhandled_reloc),
 
-  HOW (R_PPC64_GOT_TLSLD34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed,
+  HOW (R_PPC64_GOT_TLSLD_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed,
        ppc64_elf_unhandled_reloc),
 
-  HOW (R_PPC64_GOT_TPREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed,
+  HOW (R_PPC64_GOT_TPREL_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed,
        ppc64_elf_unhandled_reloc),
 
-  HOW (R_PPC64_GOT_DTPREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed,
+  HOW (R_PPC64_GOT_DTPREL_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed,
        ppc64_elf_unhandled_reloc),
 
   HOW (R_PPC64_ADDR16_HIGHER34, 1, 16, 0xffff, 34, FALSE, dont,
 }
 
 static reloc_howto_type *
-ppc64_elf_reloc_type_lookup (bfd *abfd,
-                            bfd_reloc_code_real_type code)
+ppc64_elf_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
 {
   enum elf_ppc64_reloc_type r = R_PPC64_NONE;
 
       break;
     case BFD_RELOC_PPC64_DTPREL34:             r = R_PPC64_DTPREL34;
       break;
-    case BFD_RELOC_PPC64_GOT_TLSGD34:          r = R_PPC64_GOT_TLSGD34;
+    case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:    r = R_PPC64_GOT_TLSGD_PCREL34;
       break;
-    case BFD_RELOC_PPC64_GOT_TLSLD34:          r = R_PPC64_GOT_TLSLD34;
+    case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:    r = R_PPC64_GOT_TLSLD_PCREL34;
       break;
-    case BFD_RELOC_PPC64_GOT_TPREL34:          r = R_PPC64_GOT_TPREL34;
+    case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:    r = R_PPC64_GOT_TPREL_PCREL34;
       break;
-    case BFD_RELOC_PPC64_GOT_DTPREL34:         r = R_PPC64_GOT_DTPREL34;
+    case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:   r = R_PPC64_GOT_DTPREL_PCREL34;
       break;
     case BFD_RELOC_PPC64_ADDR16_HIGHER34:      r = R_PPC64_ADDR16_HIGHER34;
       break;
 };
 
 static reloc_howto_type *
-ppc64_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
-                            const char *r_name)
+ppc64_elf_reloc_name_lookup (bfd *abfd, const char *r_name)
 {
   unsigned int i;
+  static char *compat_map[][2] = {
+    { "R_PPC64_GOT_TLSGD34", "R_PPC64_GOT_TLSGD_PCREL34" },
+    { "R_PPC64_GOT_TLSLD34", "R_PPC64_GOT_TLSLD_PCREL34" },
+    { "R_PPC64_GOT_TPREL34", "R_PPC64_GOT_TPREL_PCREL34" },
+    { "R_PPC64_GOT_DTPREL34", "R_PPC64_GOT_DTPREL_PCREL34" }
+  };
 
   for (i = 0; i < ARRAY_SIZE (ppc64_elf_howto_raw); i++)
     if (ppc64_elf_howto_raw[i].name != NULL
        && strcasecmp (ppc64_elf_howto_raw[i].name, r_name) == 0)
       return &ppc64_elf_howto_raw[i];
 
+  /* Handle old names of relocations in case they were used by
+     .reloc directives.
+     FIXME: Remove this soon.  Mapping the reloc names is very likely
+     completely unnecessary.  */
+  for (i = 0; i < ARRAY_SIZE (compat_map); i++)
+    if (strcasecmp (compat_map[i][0], r_name) == 0)
+      {
+       _bfd_error_handler (_("warning: %s should be used rather than %s"),
+                           compat_map[i][1], compat_map[i][0]);
+       return ppc64_elf_reloc_name_lookup (abfd, compat_map[i][1]);
+      }
+
   return NULL;
 }
 
        case R_PPC64_DTPREL34:
        case R_PPC64_PCREL34:
        case R_PPC64_GOT_PCREL34:
-       case R_PPC64_GOT_TLSGD34:
-       case R_PPC64_GOT_TLSLD34:
-       case R_PPC64_GOT_TPREL34:
-       case R_PPC64_GOT_DTPREL34:
+       case R_PPC64_GOT_TLSGD_PCREL34:
+       case R_PPC64_GOT_TLSLD_PCREL34:
+       case R_PPC64_GOT_TPREL_PCREL34:
+       case R_PPC64_GOT_DTPREL_PCREL34:
        case R_PPC64_PLT_PCREL34:
        case R_PPC64_PLT_PCREL34_NOTOC:
        case R_PPC64_PCREL28:
        case R_PPC64_GOT_TLSLD16_LO:
        case R_PPC64_GOT_TLSLD16_HI:
        case R_PPC64_GOT_TLSLD16_HA:
-       case R_PPC64_GOT_TLSLD34:
+       case R_PPC64_GOT_TLSLD_PCREL34:
          tls_type = TLS_TLS | TLS_LD;
          goto dogottls;
 
        case R_PPC64_GOT_TLSGD16_LO:
        case R_PPC64_GOT_TLSGD16_HI:
        case R_PPC64_GOT_TLSGD16_HA:
-       case R_PPC64_GOT_TLSGD34:
+       case R_PPC64_GOT_TLSGD_PCREL34:
          tls_type = TLS_TLS | TLS_GD;
          goto dogottls;
 
        case R_PPC64_GOT_TPREL16_LO_DS:
        case R_PPC64_GOT_TPREL16_HI:
        case R_PPC64_GOT_TPREL16_HA:
-       case R_PPC64_GOT_TPREL34:
+       case R_PPC64_GOT_TPREL_PCREL34:
          if (bfd_link_dll (info))
            info->flags |= DF_STATIC_TLS;
          tls_type = TLS_TLS | TLS_TPREL;
        case R_PPC64_GOT_DTPREL16_LO_DS:
        case R_PPC64_GOT_DTPREL16_HI:
        case R_PPC64_GOT_DTPREL16_HA:
-       case R_PPC64_GOT_DTPREL34:
+       case R_PPC64_GOT_DTPREL_PCREL34:
          tls_type = TLS_TLS | TLS_DTPREL;
        dogottls:
          sec->has_tls_reloc = 1;
                    {
                    case R_PPC64_GOT_TLSLD16:
                    case R_PPC64_GOT_TLSLD16_LO:
-                   case R_PPC64_GOT_TLSLD34:
+                   case R_PPC64_GOT_TLSLD_PCREL34:
                      expecting_tls_get_addr = 1;
                      found_tls_get_addr_arg = 1;
                      /* Fall through.  */
 
                    case R_PPC64_GOT_TLSGD16:
                    case R_PPC64_GOT_TLSGD16_LO:
-                   case R_PPC64_GOT_TLSGD34:
+                   case R_PPC64_GOT_TLSGD_PCREL34:
                      expecting_tls_get_addr = 1;
                      found_tls_get_addr_arg = 1;
                      /* Fall through. */
                      tls_type = TLS_TLS | TLS_GD;
                      break;
 
-                   case R_PPC64_GOT_TPREL34:
+                   case R_PPC64_GOT_TPREL_PCREL34:
                    case R_PPC64_GOT_TPREL16_DS:
                    case R_PPC64_GOT_TPREL16_LO_DS:
                    case R_PPC64_GOT_TPREL16_HI:
            }
          break;
 
-       case R_PPC64_GOT_TPREL34:
+       case R_PPC64_GOT_TPREL_PCREL34:
          if ((tls_mask & TLS_TLS) != 0
              && (tls_mask & TLS_TPREL) == 0)
            {
            }
          break;
 
-       case R_PPC64_GOT_TLSGD34:
+       case R_PPC64_GOT_TLSGD_PCREL34:
          if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_GD) == 0)
            {
              pinsn = bfd_get_32 (input_bfd, contents + rel->r_offset);
                {
                  /* IE, pla -> pld  */
                  pinsn += (-2ULL << 56) + (57ULL << 26) - (14ULL << 26);
-                 r_type = R_PPC64_GOT_TPREL34;
+                 r_type = R_PPC64_GOT_TPREL_PCREL34;
                }
              else
                {
            }
          break;
 
-       case R_PPC64_GOT_TLSLD34:
+       case R_PPC64_GOT_TLSLD_PCREL34:
          if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_LD) == 0)
            {
              pinsn = bfd_get_32 (input_bfd, contents + rel->r_offset);
        case R_PPC64_GOT_TLSGD16_LO:
        case R_PPC64_GOT_TLSGD16_HI:
        case R_PPC64_GOT_TLSGD16_HA:
-       case R_PPC64_GOT_TLSGD34:
+       case R_PPC64_GOT_TLSGD_PCREL34:
          tls_type = TLS_TLS | TLS_GD;
          goto dogot;
 
        case R_PPC64_GOT_TLSLD16_LO:
        case R_PPC64_GOT_TLSLD16_HI:
        case R_PPC64_GOT_TLSLD16_HA:
-       case R_PPC64_GOT_TLSLD34:
+       case R_PPC64_GOT_TLSLD_PCREL34:
          tls_type = TLS_TLS | TLS_LD;
          goto dogot;
 
        case R_PPC64_GOT_TPREL16_LO_DS:
        case R_PPC64_GOT_TPREL16_HI:
        case R_PPC64_GOT_TPREL16_HA:
-       case R_PPC64_GOT_TPREL34:
+       case R_PPC64_GOT_TPREL_PCREL34:
          tls_type = TLS_TLS | TLS_TPREL;
          goto dogot;
 
        case R_PPC64_GOT_DTPREL16_LO_DS:
        case R_PPC64_GOT_DTPREL16_HI:
        case R_PPC64_GOT_DTPREL16_HA:
-       case R_PPC64_GOT_DTPREL34:
+       case R_PPC64_GOT_DTPREL_PCREL34:
          tls_type = TLS_TLS | TLS_DTPREL;
          goto dogot;
 
            relocation = got->output_section->vma + got->output_offset + off;
            addend = 0;
            if (!(r_type == R_PPC64_GOT_PCREL34
-                 || r_type == R_PPC64_GOT_TLSGD34
-                 || r_type == R_PPC64_GOT_TLSLD34
-                 || r_type == R_PPC64_GOT_TPREL34
-                 || r_type == R_PPC64_GOT_DTPREL34))
+                 || r_type == R_PPC64_GOT_TLSGD_PCREL34
+                 || r_type == R_PPC64_GOT_TLSLD_PCREL34
+                 || r_type == R_PPC64_GOT_TPREL_PCREL34
+                 || r_type == R_PPC64_GOT_DTPREL_PCREL34))
              addend = -(TOCstart + htab->sec_info[input_section->id].toc_off);
          }
          break;
        case R_PPC64_GOT_PCREL34:
        case R_PPC64_TPREL34:
        case R_PPC64_DTPREL34:
-       case R_PPC64_GOT_TLSGD34:
-       case R_PPC64_GOT_TLSLD34:
-       case R_PPC64_GOT_TPREL34:
-       case R_PPC64_GOT_DTPREL34:
+       case R_PPC64_GOT_TLSGD_PCREL34:
+       case R_PPC64_GOT_TLSLD_PCREL34:
+       case R_PPC64_GOT_TPREL_PCREL34:
+       case R_PPC64_GOT_DTPREL_PCREL34:
        case R_PPC64_PLT_PCREL34:
        case R_PPC64_PLT_PCREL34_NOTOC:
        case R_PPC64_D28:
 
   "BFD_RELOC_PPC64_DTPREL16_HIGHESTA",
   "BFD_RELOC_PPC64_TPREL34",
   "BFD_RELOC_PPC64_DTPREL34",
-  "BFD_RELOC_PPC64_GOT_TLSGD34",
-  "BFD_RELOC_PPC64_GOT_TLSLD34",
-  "BFD_RELOC_PPC64_GOT_TPREL34",
-  "BFD_RELOC_PPC64_GOT_DTPREL34",
+  "BFD_RELOC_PPC64_GOT_TLSGD_PCREL34",
+  "BFD_RELOC_PPC64_GOT_TLSLD_PCREL34",
+  "BFD_RELOC_PPC64_GOT_TPREL_PCREL34",
+  "BFD_RELOC_PPC64_GOT_DTPREL_PCREL34",
   "BFD_RELOC_PPC64_TLS_PCREL",
   "BFD_RELOC_I370_D12",
   "BFD_RELOC_CTOR",
 
 ENUMX
   BFD_RELOC_PPC64_DTPREL34
 ENUMX
-  BFD_RELOC_PPC64_GOT_TLSGD34
+  BFD_RELOC_PPC64_GOT_TLSGD_PCREL34
 ENUMX
-  BFD_RELOC_PPC64_GOT_TLSLD34
+  BFD_RELOC_PPC64_GOT_TLSLD_PCREL34
 ENUMX
-  BFD_RELOC_PPC64_GOT_TPREL34
+  BFD_RELOC_PPC64_GOT_TPREL_PCREL34
 ENUMX
-  BFD_RELOC_PPC64_GOT_DTPREL34
+  BFD_RELOC_PPC64_GOT_DTPREL_PCREL34
 ENUMX
   BFD_RELOC_PPC64_TLS_PCREL
 ENUMDOC
 
+2020-06-06  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.h: Rename
+       R_PPC64_GOT_TLSGD34 to R_PPC64_GOT_TLSGD_PCREL34,
+       R_PPC64_GOT_TLSLD34 to R_PPC64_GOT_TLSLD_PCREL34,
+       R_PPC64_GOT_TPREL34 to R_PPC64_GOT_TPREL_PCREL34, and
+       R_PPC64_GOT_DTPREL34 to R_PPC64_GOT_DTPREL_PCREL34.
+
 2020-01-18  Nick Clifton  <nickc@redhat.com>
 
        Binutils 2.34 branch created.
 
   R_PPC64_PCREL28 = 145,
   R_PPC64_TPREL34 = 146,
   R_PPC64_DTPREL34 = 147,
-  R_PPC64_GOT_TLSGD34 = 148,
-  R_PPC64_GOT_TLSLD34 = 149,
-  R_PPC64_GOT_TPREL34 = 150,
-  R_PPC64_GOT_DTPREL34 = 151,
+  R_PPC64_GOT_TLSGD_PCREL34 = 148,
+  R_PPC64_GOT_TLSLD_PCREL34 = 149,
+  R_PPC64_GOT_TPREL_PCREL34 = 150,
+  R_PPC64_GOT_DTPREL_PCREL34 = 151,
 
   R_PPC_VLE_REL8 = 216,
   R_PPC_VLE_REL15 = 217,
 
+2020-06-06  Alan Modra  <amodra@gmail.com>
+
+       * config/tc-ppc.c: Update throughout for reloc renaming.
+
 2020-06-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
        * config/tc-bpf.c (md_apply_fix): Avoid GCC 10 warning
 
     MAP64 ("got@pcrel",                BFD_RELOC_PPC64_GOT_PCREL34),
     MAP64 ("plt@pcrel",                BFD_RELOC_PPC64_PLT_PCREL34),
     MAP64 ("tls@pcrel",                BFD_RELOC_PPC64_TLS_PCREL),
-    MAP64 ("got@tlsgd@pcrel",  BFD_RELOC_PPC64_GOT_TLSGD34),
-    MAP64 ("got@tlsld@pcrel",  BFD_RELOC_PPC64_GOT_TLSLD34),
-    MAP64 ("got@tprel@pcrel",  BFD_RELOC_PPC64_GOT_TPREL34),
-    MAP64 ("got@dtprel@pcrel", BFD_RELOC_PPC64_GOT_DTPREL34),
+    MAP64 ("got@tlsgd@pcrel",  BFD_RELOC_PPC64_GOT_TLSGD_PCREL34),
+    MAP64 ("got@tlsld@pcrel",  BFD_RELOC_PPC64_GOT_TLSLD_PCREL34),
+    MAP64 ("got@tprel@pcrel",  BFD_RELOC_PPC64_GOT_TPREL_PCREL34),
+    MAP64 ("got@dtprel@pcrel", BFD_RELOC_PPC64_GOT_DTPREL_PCREL34),
     MAP64 ("higher34",         BFD_RELOC_PPC64_ADDR16_HIGHER34),
     MAP64 ("highera34",                BFD_RELOC_PPC64_ADDR16_HIGHERA34),
     MAP64 ("highest34",                BFD_RELOC_PPC64_ADDR16_HIGHEST34),
     case BFD_RELOC_64_PCREL:
     case BFD_RELOC_64_PLT_PCREL:
     case BFD_RELOC_PPC64_GOT_PCREL34:
-    case BFD_RELOC_PPC64_GOT_TLSGD34:
-    case BFD_RELOC_PPC64_GOT_TLSLD34:
-    case BFD_RELOC_PPC64_GOT_TPREL34:
-    case BFD_RELOC_PPC64_GOT_DTPREL34:
+    case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:
+    case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:
+    case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:
+    case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:
     case BFD_RELOC_PPC64_PCREL28:
     case BFD_RELOC_PPC64_PCREL34:
     case BFD_RELOC_PPC64_PLT_PCREL34:
                  /* Fall through.  */
                case BFD_RELOC_PPC64_GOT_PCREL34:
                case BFD_RELOC_PPC64_PLT_PCREL34:
-               case BFD_RELOC_PPC64_GOT_TLSGD34:
-               case BFD_RELOC_PPC64_GOT_TLSLD34:
-               case BFD_RELOC_PPC64_GOT_TPREL34:
-               case BFD_RELOC_PPC64_GOT_DTPREL34:
+               case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:
+               case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:
+               case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:
+               case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:
                  if (operand->bitm != 0x3ffffffffULL
                      || (operand->flags & PPC_OPERAND_NEGATIVE) != 0)
                    as_warn (_("%s unsupported on this instruction"), "@pcrel");
        case BFD_RELOC_PPC64_DTPREL16_HIGHESTA:
        case BFD_RELOC_PPC64_TPREL34:
        case BFD_RELOC_PPC64_DTPREL34:
-       case BFD_RELOC_PPC64_GOT_TLSGD34:
-       case BFD_RELOC_PPC64_GOT_TLSLD34:
-       case BFD_RELOC_PPC64_GOT_TPREL34:
-       case BFD_RELOC_PPC64_GOT_DTPREL34:
+       case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:
+       case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:
+       case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:
+       case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:
          gas_assert (fixP->fx_addsy != NULL);
          S_SET_THREAD_LOCAL (fixP->fx_addsy);
          fieldval = 0;
 
+2020-06-06  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc: Update throughout for reloc renaming.
+
 2020-05-22  Alan Modra  <amodra@gmail.com>
 
        PR 25882
 
     case elfcpp::R_PPC64_TLSLD:
     case elfcpp::R_PPC64_TPREL34:
     case elfcpp::R_PPC64_DTPREL34:
-    case elfcpp::R_PPC64_GOT_TLSGD34:
-    case elfcpp::R_PPC64_GOT_TLSLD34:
-    case elfcpp::R_PPC64_GOT_TPREL34:
-    case elfcpp::R_PPC64_GOT_DTPREL34:
+    case elfcpp::R_PPC64_GOT_TLSGD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
+    case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
       ref = Symbol::TLS_REF;
       break;
 
       target->got_section(symtab, layout);
       break;
 
-    case elfcpp::R_PPC64_GOT_TLSGD34:
+    case elfcpp::R_PPC64_GOT_TLSGD_PCREL34:
     case elfcpp::R_POWERPC_GOT_TLSGD16:
     case elfcpp::R_POWERPC_GOT_TLSGD16_LO:
     case elfcpp::R_POWERPC_GOT_TLSGD16_HI:
       }
       break;
 
-    case elfcpp::R_PPC64_GOT_TLSLD34:
+    case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
     case elfcpp::R_POWERPC_GOT_TLSLD16:
     case elfcpp::R_POWERPC_GOT_TLSLD16_LO:
     case elfcpp::R_POWERPC_GOT_TLSLD16_HI:
       }
       break;
 
-    case elfcpp::R_PPC64_GOT_DTPREL34:
+    case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
     case elfcpp::R_POWERPC_GOT_DTPREL16:
     case elfcpp::R_POWERPC_GOT_DTPREL16_LO:
     case elfcpp::R_POWERPC_GOT_DTPREL16_HI:
       }
       break;
 
-    case elfcpp::R_PPC64_GOT_TPREL34:
+    case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
     case elfcpp::R_POWERPC_GOT_TPREL16:
     case elfcpp::R_POWERPC_GOT_TPREL16_LO:
     case elfcpp::R_POWERPC_GOT_TPREL16_HI:
     case elfcpp::R_PPC64_PLT_PCREL34:
     case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
     case elfcpp::R_PPC64_GOT_PCREL34:
-    case elfcpp::R_PPC64_GOT_TLSGD34:
-    case elfcpp::R_PPC64_GOT_TLSLD34:
-    case elfcpp::R_PPC64_GOT_DTPREL34:
-    case elfcpp::R_PPC64_GOT_TPREL34:
+    case elfcpp::R_PPC64_GOT_TLSGD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
+    case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
+    case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
       target->set_power10_stubs();
       break;
     default:
       target->got_section(symtab, layout);
       break;
 
-    case elfcpp::R_PPC64_GOT_TLSGD34:
+    case elfcpp::R_PPC64_GOT_TLSGD_PCREL34:
     case elfcpp::R_POWERPC_GOT_TLSGD16:
     case elfcpp::R_POWERPC_GOT_TLSGD16_LO:
     case elfcpp::R_POWERPC_GOT_TLSGD16_HI:
       }
       break;
 
-    case elfcpp::R_PPC64_GOT_TLSLD34:
+    case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
     case elfcpp::R_POWERPC_GOT_TLSLD16:
     case elfcpp::R_POWERPC_GOT_TLSLD16_LO:
     case elfcpp::R_POWERPC_GOT_TLSLD16_HI:
       }
       break;
 
-    case elfcpp::R_PPC64_GOT_DTPREL34:
+    case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
     case elfcpp::R_POWERPC_GOT_DTPREL16:
     case elfcpp::R_POWERPC_GOT_DTPREL16_LO:
     case elfcpp::R_POWERPC_GOT_DTPREL16_HI:
       }
       break;
 
-    case elfcpp::R_PPC64_GOT_TPREL34:
+    case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
     case elfcpp::R_POWERPC_GOT_TPREL16:
     case elfcpp::R_POWERPC_GOT_TPREL16_LO:
     case elfcpp::R_POWERPC_GOT_TPREL16_HI:
     case elfcpp::R_PPC64_PLT_PCREL34:
     case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
     case elfcpp::R_PPC64_GOT_PCREL34:
-    case elfcpp::R_PPC64_GOT_TLSGD34:
-    case elfcpp::R_PPC64_GOT_TLSLD34:
-    case elfcpp::R_PPC64_GOT_DTPREL34:
-    case elfcpp::R_PPC64_GOT_TPREL34:
+    case elfcpp::R_PPC64_GOT_TLSGD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
+    case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
+    case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
       target->set_power10_stubs();
       break;
     default:
           || r_type == elfcpp::R_POWERPC_GOT_TLSGD16_LO
           || r_type == elfcpp::R_POWERPC_GOT_TLSGD16_HI
           || r_type == elfcpp::R_POWERPC_GOT_TLSGD16_HA
-          || r_type == elfcpp::R_PPC64_GOT_TLSGD34)
+          || r_type == elfcpp::R_PPC64_GOT_TLSGD_PCREL34)
     {
       // First instruction of a global dynamic sequence, arg setup insn.
       const bool final = gsym == NULL || gsym->final_value_is_known();
              gold_assert(object->local_has_got_offset(r_sym, got_type));
              value = object->local_got_offset(r_sym, got_type);
            }
-         if (r_type == elfcpp::R_PPC64_GOT_TLSGD34)
+         if (r_type == elfcpp::R_PPC64_GOT_TLSGD_PCREL34)
            value += target->got_section()->address();
          else
            value -= target->got_section()->got_base_offset(object);
        }
       if (tls_type == tls::TLSOPT_TO_IE)
        {
-         if (r_type == elfcpp::R_PPC64_GOT_TLSGD34)
+         if (r_type == elfcpp::R_PPC64_GOT_TLSGD_PCREL34)
            {
              Insn* iview = reinterpret_cast<Insn*>(view);
              uint64_t pinsn = elfcpp::Swap<32, big_endian>::readval(iview);
              elfcpp::Swap<32, big_endian>::writeval(iview, pinsn >> 32);
              elfcpp::Swap<32, big_endian>::writeval(iview + 1,
                                                     pinsn & 0xffffffff);
-             r_type = elfcpp::R_PPC64_GOT_TPREL34;
+             r_type = elfcpp::R_PPC64_GOT_TPREL_PCREL34;
            }
          else
            {
        }
       else if (tls_type == tls::TLSOPT_TO_LE)
        {
-         if (r_type == elfcpp::R_PPC64_GOT_TLSGD34)
+         if (r_type == elfcpp::R_PPC64_GOT_TLSGD_PCREL34)
            {
              Insn* iview = reinterpret_cast<Insn*>(view);
              uint64_t pinsn = elfcpp::Swap<32, big_endian>::readval(iview);
           || r_type == elfcpp::R_POWERPC_GOT_TLSLD16_LO
           || r_type == elfcpp::R_POWERPC_GOT_TLSLD16_HI
           || r_type == elfcpp::R_POWERPC_GOT_TLSLD16_HA
-          || r_type == elfcpp::R_PPC64_GOT_TLSLD34)
+          || r_type == elfcpp::R_PPC64_GOT_TLSLD_PCREL34)
     {
       // First instruction of a local dynamic sequence, arg setup insn.
       const tls::Tls_optimization tls_type = target->optimize_tls_ld();
       if (tls_type == tls::TLSOPT_NONE)
        {
          value = target->tlsld_got_offset();
-         if (r_type == elfcpp::R_PPC64_GOT_TLSLD34)
+         if (r_type == elfcpp::R_PPC64_GOT_TLSLD_PCREL34)
            value += target->got_section()->address();
          else
            value -= target->got_section()->got_base_offset(object);
       else
        {
          gold_assert(tls_type == tls::TLSOPT_TO_LE);
-         if (r_type == elfcpp::R_PPC64_GOT_TLSLD34)
+         if (r_type == elfcpp::R_PPC64_GOT_TLSLD_PCREL34)
            {
              Insn* iview = reinterpret_cast<Insn*>(view);
              uint64_t pinsn = elfcpp::Swap<32, big_endian>::readval(iview);
           || r_type == elfcpp::R_POWERPC_GOT_DTPREL16_LO
           || r_type == elfcpp::R_POWERPC_GOT_DTPREL16_HI
           || r_type == elfcpp::R_POWERPC_GOT_DTPREL16_HA
-          || r_type == elfcpp::R_PPC64_GOT_DTPREL34)
+          || r_type == elfcpp::R_PPC64_GOT_DTPREL_PCREL34)
     {
       // Accesses relative to a local dynamic sequence address,
       // no optimisation here.
          gold_assert(object->local_has_got_offset(r_sym, GOT_TYPE_DTPREL));
          value = object->local_got_offset(r_sym, GOT_TYPE_DTPREL);
        }
-      if (r_type == elfcpp::R_PPC64_GOT_DTPREL34)
+      if (r_type == elfcpp::R_PPC64_GOT_DTPREL_PCREL34)
        value += target->got_section()->address();
       else
        value -= target->got_section()->got_base_offset(object);
           || r_type == elfcpp::R_POWERPC_GOT_TPREL16_LO
           || r_type == elfcpp::R_POWERPC_GOT_TPREL16_HI
           || r_type == elfcpp::R_POWERPC_GOT_TPREL16_HA
-          || r_type == elfcpp::R_PPC64_GOT_TPREL34)
+          || r_type == elfcpp::R_PPC64_GOT_TPREL_PCREL34)
     {
       // First instruction of initial exec sequence.
       const bool final = gsym == NULL || gsym->final_value_is_known();
              gold_assert(object->local_has_got_offset(r_sym, GOT_TYPE_TPREL));
              value = object->local_got_offset(r_sym, GOT_TYPE_TPREL);
            }
-         if (r_type == elfcpp::R_PPC64_GOT_TPREL34)
+         if (r_type == elfcpp::R_PPC64_GOT_TPREL_PCREL34)
            value += target->got_section()->address();
          else
            value -= target->got_section()->got_base_offset(object);
       else
        {
          gold_assert(tls_type == tls::TLSOPT_TO_LE);
-         if (r_type == elfcpp::R_PPC64_GOT_TPREL34)
+         if (r_type == elfcpp::R_PPC64_GOT_TPREL_PCREL34)
            {
              Insn* iview = reinterpret_cast<Insn*>(view);
              uint64_t pinsn = elfcpp::Swap<32, big_endian>::readval(iview);
     case elfcpp::R_PPC64_PLT_PCREL34:
     case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
     case elfcpp::R_PPC64_PCREL28:
-    case elfcpp::R_PPC64_GOT_TLSGD34:
-    case elfcpp::R_PPC64_GOT_TLSLD34:
-    case elfcpp::R_PPC64_GOT_TPREL34:
-    case elfcpp::R_PPC64_GOT_DTPREL34:
+    case elfcpp::R_PPC64_GOT_TLSGD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
+    case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
     case elfcpp::R_PPC64_REL16_HIGHER34:
     case elfcpp::R_PPC64_REL16_HIGHERA34:
     case elfcpp::R_PPC64_REL16_HIGHEST34:
     case elfcpp::R_PPC64_PCREL28:
     case elfcpp::R_PPC64_TPREL34:
     case elfcpp::R_PPC64_DTPREL34:
-    case elfcpp::R_PPC64_GOT_TLSGD34:
-    case elfcpp::R_PPC64_GOT_TLSLD34:
-    case elfcpp::R_PPC64_GOT_TPREL34:
-    case elfcpp::R_PPC64_GOT_DTPREL34:
+    case elfcpp::R_PPC64_GOT_TLSGD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
+    case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
       overflow = Reloc::CHECK_SIGNED;
       break;
     }
     case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
     case elfcpp::R_PPC64_TPREL34:
     case elfcpp::R_PPC64_DTPREL34:
-    case elfcpp::R_PPC64_GOT_TLSGD34:
-    case elfcpp::R_PPC64_GOT_TLSLD34:
-    case elfcpp::R_PPC64_GOT_TPREL34:
-    case elfcpp::R_PPC64_GOT_DTPREL34:
+    case elfcpp::R_PPC64_GOT_TLSGD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
+    case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
+    case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
       if (size == 32)
        goto unsupp;
       status = Reloc::addr34(view, value, overflow);
 
+2020-06-06  Alan Modra  <amodra@gmail.com>
+
+       * elf/ppc64.h (elf_ppc64_reloc_type): Rename
+       R_PPC64_GOT_TLSGD34 to R_PPC64_GOT_TLSGD_PCREL34,
+       R_PPC64_GOT_TLSLD34 to R_PPC64_GOT_TLSLD_PCREL34,
+       R_PPC64_GOT_TPREL34 to R_PPC64_GOT_TPREL_PCREL34, and
+       R_PPC64_GOT_DTPREL34 to R_PPC64_GOT_DTPREL_PCREL34.
+
 2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
        * opcode/cgen.h: Get an `endian' argument in both
 
   RELOC_NUMBER (R_PPC64_PCREL28,          145)
   RELOC_NUMBER (R_PPC64_TPREL34,          146)
   RELOC_NUMBER (R_PPC64_DTPREL34,         147)
-  RELOC_NUMBER (R_PPC64_GOT_TLSGD34,      148)
-  RELOC_NUMBER (R_PPC64_GOT_TLSLD34,      149)
-  RELOC_NUMBER (R_PPC64_GOT_TPREL34,      150)
-  RELOC_NUMBER (R_PPC64_GOT_DTPREL34,     151)
+  RELOC_NUMBER (R_PPC64_GOT_TLSGD_PCREL34, 148)
+  RELOC_NUMBER (R_PPC64_GOT_TLSLD_PCREL34, 149)
+  RELOC_NUMBER (R_PPC64_GOT_TPREL_PCREL34, 150)
+  RELOC_NUMBER (R_PPC64_GOT_DTPREL_PCREL34, 151)
 
 #ifndef RELOC_MACROS_GEN_FUNC
 /* Relocation only used internally by gas or ld.  If you need to use
 #define IS_PPC64_TLS_RELOC(R)                                          \
   (((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA)            \
    || ((R) >= R_PPC64_TPREL16_HIGH && (R) <= R_PPC64_DTPREL16_HIGHA)   \
-   || ((R) >= R_PPC64_TPREL34 && (R) <= R_PPC64_GOT_DTPREL34))
+   || ((R) >= R_PPC64_TPREL34 && (R) <= R_PPC64_GOT_DTPREL_PCREL34))
 
 /* e_flags bits specifying ABI.
    1 for original function descriptor using ABI,