diff options
author | Kuan-Lin Chen <rufus@andestech.com> | 2017-02-10 14:58:52 +0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2017-03-14 09:51:29 -0700 |
commit | 2aece2ba02457e83fd2a780a8ac596b6a90adf29 (patch) | |
tree | 798480ee9d350c33dcc3ed9ff89b1600adde8a27 /gas | |
parent | c1b465c94e26be629315bf28e3763dea9dea8336 (diff) | |
download | gdb-2aece2ba02457e83fd2a780a8ac596b6a90adf29.zip gdb-2aece2ba02457e83fd2a780a8ac596b6a90adf29.tar.gz gdb-2aece2ba02457e83fd2a780a8ac596b6a90adf29.tar.bz2 |
RISC-V: Fix DW_CFA_advance_loc relocation.
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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-riscv.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 4d638b4..1478cdf 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 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 for CFA relocations. diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 3744e84..723ccba 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -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; } |