bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/26025] riscv gas inserts relocation for BFD_RELOC_RISCV_CFA in


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gas/26025] riscv gas inserts relocation for BFD_RELOC_RISCV_CFA in last section of file, instead of relevant section
Date: Sun, 24 May 2020 23:43:28 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26025

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Jim Wilson <address@hidden>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=72393fd1030f4d55cd12e2a84a91ce42212d037c

commit 72393fd1030f4d55cd12e2a84a91ce42212d037c
Author: Jim Wilson <address@hidden>
Date:   Sun May 24 16:42:21 2020 -0700

    RISC-V: Gas inserts cfa relocs in wrong section.

    The frag code makes a distinction between inserting frags before the frag
    chains are chained together and afterward.  After chaining, we need to set
    now_seg before creating the frag.  tc-xtensa.c has a function called
    fix_new_exp_in_seg that handles this right, but switches segments twice
each
    time it is called.  In this case, we can inline it and pull the save and
    restore out of the loop to get better code.

            gas/
            PR 26025
            * config/tc-riscv.c (riscv_pre_output_hook): Change s type from
const
            asection to segT.  New locals seg and subseg.  Call subseg_set
before
            fix_new_exp.  Call subseg_set after loop to restore original
values.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]