From: Kuan-Lin Chen Date: Fri, 10 Feb 2017 06:58:52 +0000 (+0800) Subject: RISC-V: Fix DW_CFA_advance_loc relocation. X-Git-Tag: users/ARM/embedded-binutils-2_28-branch-2017q2~115 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4fc0b698948d38d317913bd9c9452648b304710d;p=thirdparty%2Fbinutils-gdb.git RISC-V: Fix DW_CFA_advance_loc relocation. gas/ChangeLog: 2017-03-02 Kuan-Lin Chen * config/tc-riscv.c (md_apply_fix): Set fx_frag and fx_next->fx_frag for CFA_advance_loc relocations. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 50a7303995e..465ad9f61d8 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2017-03-02 Kuan-Lin Chen + + * config/tc-riscv.c (md_apply_fix): Set fx_frag and + fx_next->fx_frag for CFA_advance_loc relocations. + 2017-03-02 Kuan-Lin Chen * config/tc-riscv.c (md_apply_fix): Compute the correct offsets diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index c79f3136178..4d280426efc 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -1956,6 +1956,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) if (subtype < 0x80 && (subtype & 0x40)) { /* DW_CFA_advance_loc */ + fixP->fx_frag = (fragS *) fixP->fx_frag->fr_opcode; + fixP->fx_next->fx_frag = fixP->fx_frag; fixP->fx_r_type = BFD_RELOC_RISCV_SET6; fixP->fx_next->fx_r_type = BFD_RELOC_RISCV_SUB6; }