aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-04-24 20:51:27 +0000
committerSteve Chamberlain <steve@cygnus>1991-04-24 20:51:27 +0000
commit4cddd1c9048abf7852e9faa4e46a9ce96d7f9436 (patch)
treeecfd460dcc357d90d1e917805f77494104b76dd7 /bfd/bfd.c
parenta36f604047f7006445325a8e3d962c7f2c115a09 (diff)
downloadgdb-4cddd1c9048abf7852e9faa4e46a9ce96d7f9436.zip
gdb-4cddd1c9048abf7852e9faa4e46a9ce96d7f9436.tar.gz
gdb-4cddd1c9048abf7852e9faa4e46a9ce96d7f9436.tar.bz2
Changed the shape of the howto type yet again.
Now m88kbcs support can self host.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 291850b..b661d71 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -760,12 +760,23 @@ bfd *output_bfd;
{
/*
Anything which started out as pc relative should end up that
- way too
+ way too.
+
+ There are two ways we can see a pcrel instruction. Sometimes
+ the pcrel displacement has been partially calculated, it
+ includes the distance from the start of the section to the
+ instruction in it (eg sun3), and sometimes the field is
+ totally blank - eg m88kbcs.
*/
+
relocation -=
output_base + input_section->output_offset;
+ if (howto->pcrel_offset == true) {
+ relocation -= reloc_entry->address;
+ }
+
}
if (output_bfd!= (bfd *)NULL) {