/* BFD back-end for ALPHA Extended-Coff files.
- Copyright 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
bfd *output_bfd = relocateable ? abfd : (bfd *) NULL;
bfd_vma gp;
boolean gp_undefined;
+ bfd_vma gp;
bfd_vma stack[RELOC_STACKSIZE];
int tos = 0;
/* Get the GP value for the output BFD. */
gp_undefined = false;
- if (ecoff_data (abfd)->gp == 0)
+ gp = _bfd_get_gp_value (abfd);
+ if (gp == 0)
{
if (relocateable != false)
{
|| strcmp (sec->name, ".lita") == 0))
lo = sec->vma;
}
- ecoff_data (abfd)->gp = lo + 0x8000;
+ gp = lo + 0x8000;
+ _bfd_set_gp_value (abfd, gp);
}
else
{
|| h->type != bfd_link_hash_defined)
gp_undefined = true;
else
- ecoff_data (abfd)->gp = (h->u.def.value
- + h->u.def.section->output_section->vma
- + h->u.def.section->output_offset);
+ {
+ gp = (h->u.def.value
+ + h->u.def.section->output_section->vma
+ + h->u.def.section->output_offset);
+ _bfd_set_gp_value (abfd, gp);
+ }
}
}
- gp = ecoff_data (abfd)->gp;
for (; *reloc_vector != (arelent *) NULL; reloc_vector++)
{
output, the .lita section is limited to 64KB. . */
lita_sec = symndx_to_section[RELOC_SECTION_LITA];
- gp = ecoff_data (output_bfd)->gp;
+ gp = _bfd_get_gp_value (output_bfd);
if (! info->relocateable && lita_sec != NULL)
{
struct ecoff_section_tdata *lita_sec_data;
lita_sec_data->gp = gp;
}
- ecoff_data (output_bfd)->gp = gp;
+ _bfd_set_gp_value (output_bfd, gp);
}
gp_undefined = (gp == 0);
input_bfd, input_section, r_vaddr - input_section->vma)))
return false;
/* Only give the error once per link. */
- ecoff_data (output_bfd)->gp = gp = 4;
+ gp = 4;
+ _bfd_set_gp_value (output_bfd, gp);
gp_undefined = false;
}
}
alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
alpha_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
_bfd_ecoff_set_alignment_hook, _bfd_ecoff_slurp_symbol_table,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
},
/* Supported architecture. */
bfd_arch_alpha,