diff options
author | Ian Lance Taylor <ian@airs.com> | 1993-07-15 20:23:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1993-07-15 20:23:43 +0000 |
commit | 2368ec638a408324c68d012073523d4115135877 (patch) | |
tree | 6f2bc8d916d8939b87fc1adaacae31a46967ce95 /gas/config/tc-m88k.c | |
parent | 6585e9e3474f6cc1e79f01f6b9d4a9fd47db1a3a (diff) | |
download | gdb-2368ec638a408324c68d012073523d4115135877.zip gdb-2368ec638a408324c68d012073523d4115135877.tar.gz gdb-2368ec638a408324c68d012073523d4115135877.tar.bz2 |
* config/obj-coffbfd.c (fixup_segment): If TC_M88K, don't adjust
by md_pcrel_from if we are relocating against a symbol (we still
need md_pcrel_from for a PC relative relocation within the same
file).
* config/tc-m88k.c (md_pcrel_from): Corrected return value.
Diffstat (limited to 'gas/config/tc-m88k.c')
-rw-r--r-- | gas/config/tc-m88k.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c index 2178be3..5c8d602 100644 --- a/gas/config/tc-m88k.c +++ b/gas/config/tc-m88k.c @@ -1442,7 +1442,16 @@ long md_pcrel_from (fixp) fixS *fixp; { - return fixp->fx_frag->fr_address + fixp->fx_where + 4; + switch (fixp->fx_r_type) + { + case RELOC_PC16: + return fixp->fx_frag->fr_address + fixp->fx_where - 2; + case RELOC_PC26: + return fixp->fx_frag->fr_address + fixp->fx_where; + default: + abort (); + } + /*NOTREACHED*/ } #endif /* M88KCOFF */ |