]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
RISC-V: Fix DW_CFA_advance_loc relocation.
authorKuan-Lin Chen <rufus@andestech.com>
Fri, 10 Feb 2017 06:58:52 +0000 (14:58 +0800)
committerPalmer Dabbelt <palmer@dabbelt.com>
Thu, 30 Mar 2017 20:00:16 +0000 (13:00 -0700)
gas/ChangeLog:

2017-03-02  Kuan-Lin Chen  <rufus@andestech.com>

        * config/tc-riscv.c (md_apply_fix): Set fx_frag and
        fx_next->fx_frag for CFA_advance_loc relocations.

gas/ChangeLog
gas/config/tc-riscv.c

index 50a7303995e8aaaf0ad963c6dd747e48a49d2e7c..465ad9f61d87c04714e78585b02d14fcd55e1729 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-02  Kuan-Lin Chen  <rufus@andestech.com>
+
+       * 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  <rufus@andestech.com>
 
        * config/tc-riscv.c (md_apply_fix): Compute the correct offsets
index c79f313617837eeced1107b15c36e2ab528f5001..4d280426efc584662f10539f887bcbad4437c473 100644 (file)
@@ -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;
                    }