bfd_vma symbol,
bfd_vma *addendp, asection *input_section)
{
- Elf_Internal_Rela outrel[3];
+ Elf_Internal_Rela outrel;
asection *sreloc;
bfd *dynobj;
int r_type;
BFD_ASSERT (sreloc->contents != NULL);
BFD_ASSERT (sreloc->reloc_count * SCORE_ELF_REL_SIZE (output_bfd) < sreloc->size);
- outrel[0].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[0].r_offset);
- outrel[1].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[1].r_offset);
- outrel[2].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[2].r_offset);
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset);
- if (outrel[0].r_offset == MINUS_ONE)
+ if (outrel.r_offset == MINUS_ONE)
/* The relocation field has been deleted. */
return true;
- if (outrel[0].r_offset == MINUS_TWO)
+ if (outrel.r_offset == MINUS_TWO)
{
/* The relocation field has been converted into a relative value of
some sort. Functions like _bfd_elf_write_section_eh_frame expect
/* The relocation is always an REL32 relocation because we don't
know where the shared library will wind up at load-time. */
- outrel[0].r_info = ELF32_R_INFO ((unsigned long) indx, R_SCORE_REL32);
+ outrel.r_info = ELF32_R_INFO ((unsigned long) indx, R_SCORE_REL32);
/* For strict adherence to the ABI specification, we should
generate a R_SCORE_64 relocation record by itself before the
invocation if ABI_64_P, and here we should generate an
additional relocation record with R_SCORE_64 by itself for a
NULL symbol before this relocation record. */
- outrel[1].r_info = ELF32_R_INFO (0, R_SCORE_NONE);
- outrel[2].r_info = ELF32_R_INFO (0, R_SCORE_NONE);
/* Adjust the output offset of the relocation to reference the
correct location in the output file. */
- outrel[0].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
- outrel[1].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
- outrel[2].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
/* Put the relocation back out. We have to use the special
relocation outputter in the 64-bit case since the 64-bit
relocation format is non-standard. */
bfd_elf32_swap_reloc_out
- (output_bfd, &outrel[0],
- (sreloc->contents + sreloc->reloc_count * sizeof (Elf32_External_Rel)));
+ (output_bfd, &outrel,
+ sreloc->contents + sreloc->reloc_count * sizeof (Elf32_External_Rel));
/* We've now added another relocation. */
++sreloc->reloc_count;
bfd_vma symbol,
bfd_vma *addendp, asection *input_section)
{
- Elf_Internal_Rela outrel[3];
+ Elf_Internal_Rela outrel;
asection *sreloc;
bfd *dynobj;
int r_type;
BFD_ASSERT (sreloc->contents != NULL);
BFD_ASSERT (sreloc->reloc_count * SCORE_ELF_REL_SIZE (output_bfd) < sreloc->size);
- outrel[0].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[0].r_offset);
- outrel[1].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[1].r_offset);
- outrel[2].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[2].r_offset);
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset);
- if (outrel[0].r_offset == MINUS_ONE)
+ if (outrel.r_offset == MINUS_ONE)
/* The relocation field has been deleted. */
return true;
- if (outrel[0].r_offset == MINUS_TWO)
+ if (outrel.r_offset == MINUS_TWO)
{
/* The relocation field has been converted into a relative value of
some sort. Functions like _bfd_elf_write_section_eh_frame expect
/* The relocation is always an REL32 relocation because we don't
know where the shared library will wind up at load-time. */
- outrel[0].r_info = ELF32_R_INFO ((unsigned long) indx, R_SCORE_REL32);
+ outrel.r_info = ELF32_R_INFO ((unsigned long) indx, R_SCORE_REL32);
/* For strict adherence to the ABI specification, we should
generate a R_SCORE_64 relocation record by itself before the
invocation if ABI_64_P, and here we should generate an
additional relocation record with R_SCORE_64 by itself for a
NULL symbol before this relocation record. */
- outrel[1].r_info = ELF32_R_INFO (0, R_SCORE_NONE);
- outrel[2].r_info = ELF32_R_INFO (0, R_SCORE_NONE);
/* Adjust the output offset of the relocation to reference the
correct location in the output file. */
- outrel[0].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
- outrel[1].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
- outrel[2].r_offset += (input_section->output_section->vma
- + input_section->output_offset);
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
/* Put the relocation back out. We have to use the special
relocation outputter in the 64-bit case since the 64-bit
relocation format is non-standard. */
bfd_elf32_swap_reloc_out
- (output_bfd, &outrel[0],
- (sreloc->contents + sreloc->reloc_count * sizeof (Elf32_External_Rel)));
+ (output_bfd, &outrel,
+ sreloc->contents + sreloc->reloc_count * sizeof (Elf32_External_Rel));
/* We've now added another relocation. */
++sreloc->reloc_count;