- if (r_type == R_PPC_VLE_SDAREL_LO16A)
- ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
- contents + rel->r_offset, value,
- split16a_type,
- htab->params->vle_reloc_fixup);
- else if (r_type == R_PPC_VLE_SDAREL_LO16D)
- ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
- contents + rel->r_offset, value,
- split16d_type,
- htab->params->vle_reloc_fixup);
- else if (r_type == R_PPC_VLE_SDAREL_HI16A)
- {
- value = value >> 16;
- ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
- contents + rel->r_offset, value,
- split16a_type,
- htab->params->vle_reloc_fixup);
- }
- else if (r_type == R_PPC_VLE_SDAREL_HI16D)
- {
- value = value >> 16;
- ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
- contents + rel->r_offset, value,
- split16d_type,
- htab->params->vle_reloc_fixup);
- }
- else if (r_type == R_PPC_VLE_SDAREL_HA16A)
- {
- value = (value + 0x8000) >> 16;
- ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
- contents + rel->r_offset, value,
- split16a_type,
- htab->params->vle_reloc_fixup);
- }
- else if (r_type == R_PPC_VLE_SDAREL_HA16D)
- {
- value = (value + 0x8000) >> 16;
- ppc_elf_vle_split16 (input_bfd, input_section, rel->r_offset,
- contents + rel->r_offset, value,
- split16d_type,
- htab->params->vle_reloc_fixup);
- }
- }
- goto copy_reloc;
+ if (sda == NULL || !is_static_defined (sda))
+ {
+ unresolved_reloc = true;
+ break;
+ }
+ value = relocation + addend - SYM_VAL (sda);
+
+ if (r_type == R_PPC_VLE_SDAREL_LO16A)
+ r = ppc_elf_vle_split16 (input_bfd, input_section,
+ rel->r_offset,
+ contents + rel->r_offset, value,
+ split16a_type,
+ htab->params->vle_reloc_fixup);
+ else if (r_type == R_PPC_VLE_SDAREL_LO16D)
+ r = ppc_elf_vle_split16 (input_bfd, input_section,
+ rel->r_offset,
+ contents + rel->r_offset, value,
+ split16d_type,
+ htab->params->vle_reloc_fixup);
+ else if (r_type == R_PPC_VLE_SDAREL_HI16A)
+ {
+ value = value >> 16;
+ r = ppc_elf_vle_split16 (input_bfd, input_section,
+ rel->r_offset,
+ contents + rel->r_offset, value,
+ split16a_type,
+ htab->params->vle_reloc_fixup);
+ }
+ else if (r_type == R_PPC_VLE_SDAREL_HI16D)
+ {
+ value = value >> 16;
+ r = ppc_elf_vle_split16 (input_bfd, input_section,
+ rel->r_offset,
+ contents + rel->r_offset, value,
+ split16d_type,
+ htab->params->vle_reloc_fixup);
+ }
+ else if (r_type == R_PPC_VLE_SDAREL_HA16A)
+ {
+ value = (value + 0x8000) >> 16;
+ r = ppc_elf_vle_split16 (input_bfd, input_section,
+ rel->r_offset,
+ contents + rel->r_offset, value,
+ split16a_type,
+ htab->params->vle_reloc_fixup);
+ }
+ else if (r_type == R_PPC_VLE_SDAREL_HA16D)
+ {
+ value = (value + 0x8000) >> 16;
+ r = ppc_elf_vle_split16 (input_bfd, input_section,
+ rel->r_offset,
+ contents + rel->r_offset, value,
+ split16d_type,
+ htab->params->vle_reloc_fixup);
+ }
+ else
+ abort ();
+ }
+ goto report_reloc;