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>
Tue, 14 Mar 2017 16:51:29 +0000 (09:51 -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 4d638b4d10dd25cab780c373e0806e521420ccb6..1478cdfd2336f50884f3fecd9b83f735928b78f1 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 3744e84d99ad6bacf38b9a0ddd980e2f262c12eb..723ccbafb0f8383cd62d877b6b08fa69facd48cf 100644 (file)
@@ -1966,6 +1966,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;
                    }
This page took 0.029041 seconds and 4 git commands to generate.