aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-i960.c
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-05-11 02:22:21 +0000
committerSteve Chamberlain <steve@cygnus>1991-05-11 02:22:21 +0000
commit8e3c8f47554a4f15fde5aa49ba69976f490f68c5 (patch)
tree1c78d50cfa8db9b2669d4ae86c9f81d340557003 /bfd/coff-i960.c
parent22ddf9bcc545247e940cc0177a234362cb239457 (diff)
downloadgdb-8e3c8f47554a4f15fde5aa49ba69976f490f68c5.zip
gdb-8e3c8f47554a4f15fde5aa49ba69976f490f68c5.tar.gz
gdb-8e3c8f47554a4f15fde5aa49ba69976f490f68c5.tar.bz2
*** empty log message ***
Diffstat (limited to 'bfd/coff-i960.c')
-rw-r--r--bfd/coff-i960.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index cb34740..cbbd49e 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -62,24 +62,24 @@ asection *ignore_input_section;
result = bfd_reloc_dangerous;
}
else {
- switch (bfd_h_get_x(abfd, & cs->native->n_sclass))
+ switch (cs->native->n_sclass)
{
case C_LEAFSTAT:
case C_LEAFEXT:
/* This is a call to a leaf procedure, replace instruction with a bal
to the correct location */
{
- AUXENT *aux = (AUXENT *)(cs->native+2);
+ union internal_auxent *aux = (union internal_auxent *)(cs->native+2);
int word = bfd_getlong(abfd, data + reloc_entry->address);
- BFD_ASSERT(bfd_h_get_x(abfd, &cs->native->n_numaux)==2);
+ int olf = (aux->x_bal.x_balntry - cs->native->n_value);
+ BFD_ASSERT(cs->native->n_numaux==2);
/* We replace the original call instruction with a bal to */
/* the bal entry point - the offset of which is described in the */
/* 2nd auxent of the original symbol. We keep the native sym and */
/* auxents untouched, so the delta between the two is the */
/* offset of the bal entry point */
- word = ((word + (bfd_h_get_x(abfd, &aux->x_bal.x_balntry) -
- bfd_h_get_x(abfd, &cs->native->n_value)))
- & BAL_MASK) | BAL;
+
+ word = ((word + olf) & BAL_MASK) | BAL;
bfd_putlong(abfd, word, data+reloc_entry->address);
}
result = bfd_reloc_ok;