PowerPC addpcis fix
[deliverable/binutils-gdb.git] / bfd / elf32-ppc.c
index 834ef67d00ea2014ec56ec023aa279e7f0bcda27..d98b776a4836e06eb5215626646b9ee97da34b67 100644 (file)
@@ -1746,6 +1746,21 @@ static reloc_howto_type ppc_elf_howto_raw[] = {
         0x1fffc1,              /* dst_mask */
         TRUE),                 /* pcrel_offset */
 
+  /* A split-field reloc for addpcis, non-relative (gas internal use only).  */
+  HOWTO (R_PPC_16DX_HA,                /* type */
+        16,                    /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        16,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_signed, /* complain_on_overflow */
+        ppc_elf_addr16_ha_reloc, /* special_function */
+        "R_PPC_16DX_HA",       /* name */
+        FALSE,                 /* partial_inplace */
+        0,                     /* src_mask */
+        0x1fffc1,              /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
   /* GNU extension to record C++ vtable hierarchy.  */
   HOWTO (R_PPC_GNU_VTINHERIT,  /* type */
         0,                     /* rightshift */
@@ -2002,6 +2017,7 @@ ppc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
     case BFD_RELOC_LO16_PCREL:         r = R_PPC_REL16_LO;             break;
     case BFD_RELOC_HI16_PCREL:         r = R_PPC_REL16_HI;             break;
     case BFD_RELOC_HI16_S_PCREL:       r = R_PPC_REL16_HA;             break;
+    case BFD_RELOC_PPC_16DX_HA:                r = R_PPC_16DX_HA;              break;
     case BFD_RELOC_PPC_REL16DX_HA:     r = R_PPC_REL16DX_HA;           break;
     case BFD_RELOC_VTABLE_INHERIT:     r = R_PPC_GNU_VTINHERIT;        break;
     case BFD_RELOC_VTABLE_ENTRY:       r = R_PPC_GNU_VTENTRY;          break;
@@ -4351,6 +4367,7 @@ ppc_elf_check_relocs (bfd *abfd,
        case R_PPC_RELAX:
        case R_PPC_RELAX_PLT:
        case R_PPC_RELAX_PLTREL24:
+       case R_PPC_16DX_HA:
          break;
 
          /* These should only appear in dynamic objects.  */
This page took 0.027879 seconds and 4 git commands to generate.