diff options
author | Michael Meissner <gnu@the-meissners.org> | 1995-09-27 15:37:54 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1995-09-27 15:37:54 +0000 |
commit | 0e31d0ce8a723c3743c00289327be63155428c41 (patch) | |
tree | bf34b97b071961c7dc736d6c664b09edf26fdac2 /gas/config/tc-ppc.c | |
parent | a2b970c9258d3150a6de094b533957db1bcda10a (diff) | |
download | gdb-0e31d0ce8a723c3743c00289327be63155428c41.zip gdb-0e31d0ce8a723c3743c00289327be63155428c41.tar.gz gdb-0e31d0ce8a723c3743c00289327be63155428c41.tar.bz2 |
Undo md_apply_fix3 changes
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r-- | gas/config/tc-ppc.c | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index df9ef85..095dd8a 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -3681,8 +3681,6 @@ md_apply_fix3 (fixp, valuep, seg) segT seg; { valueT value; - char *where; - unsigned long insn; /* FIXME FIXME FIXME: The value we are passed in *valuep includes the symbol values. Since we are using BFD_ASSEMBLER, if we are @@ -3722,6 +3720,8 @@ md_apply_fix3 (fixp, valuep, seg) { int opindex; const struct powerpc_operand *operand; + char *where; + unsigned long insn; opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; @@ -3819,13 +3819,42 @@ md_apply_fix3 (fixp, valuep, seg) #endif switch (fixp->fx_r_type) { - case BFD_RELOC_32: /* fixup errant PC relative relocations */ + case BFD_RELOC_32: case BFD_RELOC_CTOR: if (fixp->fx_pcrel) { fixp->fx_r_type = BFD_RELOC_32_PCREL; value += fixp->fx_frag->fr_address + fixp->fx_where; - } + } /* fall through */ + + case BFD_RELOC_32_PCREL: + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value, 4); + break; + + case BFD_RELOC_LO16: + case BFD_RELOC_HI16: + case BFD_RELOC_HI16_S: + case BFD_RELOC_PPC_TOC16: + case BFD_RELOC_16: + case BFD_RELOC_GPREL16: + if (fixp->fx_pcrel) + abort (); + + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value, 2); + break; + + case BFD_RELOC_8: + if (fixp->fx_pcrel) + abort (); + + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value, 1); + break; + + default: + abort (); } } |