From: Ian Lance Taylor Date: Thu, 15 Jul 1993 20:23:43 +0000 (+0000) Subject: * config/obj-coffbfd.c (fixup_segment): If TC_M88K, don't adjust X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2368ec638a408324c68d012073523d4115135877;p=binutils-gdb.git * 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 8b331fd43ef..f4d86ea2fe3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ Thu Jul 15 11:51:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + * 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. + * Preliminary support for m88k-coff. * configure.in (m88k-*-coff*): New target. Use coffbfd and m88kcoff. diff --git a/gas/config/obj-coffbfd.c b/gas/config/obj-coffbfd.c index 04967397056..a54ed989314 100644 --- a/gas/config/obj-coffbfd.c +++ b/gas/config/obj-coffbfd.c @@ -2529,7 +2529,11 @@ DEFUN (fixup_segment, (segP, this_segment_type), if (pcrel) { +#ifndef TC_M88K + /* This adjustment is not correct on the m88k, for which the + linker does all the computation. */ add_number -= md_pcrel_from (fixP); +#endif if (add_symbolP == 0) { fixP->fx_addsy = &abs_symbol; diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c index 2178be3d52e..5c8d602aba7 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 */