aboutsummaryrefslogtreecommitdiff
path: root/bfd/ecoff.c
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-05-18 18:08:25 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-10-19 09:19:32 -0700
commitff6f4d9b2d6c25ac144bab869df6e3d6123a6f8f (patch)
tree59e6a3f173dd8987b985d830a745f06e6b881f9d /bfd/ecoff.c
parent95e42ad4425f0ab0ebfb90035a891be576f9fca4 (diff)
downloadgdb-ff6f4d9b2d6c25ac144bab869df6e3d6123a6f8f.zip
gdb-ff6f4d9b2d6c25ac144bab869df6e3d6123a6f8f.tar.gz
gdb-ff6f4d9b2d6c25ac144bab869df6e3d6123a6f8f.tar.bz2
RISC-V: Add R_RISCV_DELETE, which marks bytes for deletion
We currently delete bytes by shifting an entire BFD backwards to overwrite the bytes we no longer need. The result is that relaxing a BFD is quadratic time. This patch adds an additional relocation that specifies a byte range that will be deleted from the final object file, and adds a relaxation pass (between the existing passes that delete bytes and the alignment pass) that actually deletes the bytes. Note that deletion is still quadratic time, and nothing uses R_RISCV_DELETE yet. I've been meaning to go convert all the other relaxations to use R_RISCV_DELETE and then make it faster, but this patch has been sitting around for months so it looks like that won't happen for a bit. The PCREL->GPREL relaxation that comes next uses this, and since we've been using these two patches out of tree since I wrote them months ago I figure it's better to just get them in now. I (or someone else :)) can convert all the relocations later... R_RISCV_DELETE will never be emitted into ELF objects, so therefor isn't exposed to the rest of binutils. As such, we're not considering this as part of the ABI. bfd/ChangeLog 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com> * elfnn-riscv (R_RISCV_DELETE): New define. (_bfd_riscv_relax_delete): New function. (perform_relocation): Handle R_RISCV_DELETE. (_bfd_riscv_relax_section): Likewise. ld/ChangeLog 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com> * emultempl/riscvelf.em (riscv_elf_before_allocation): Add a third relaxation pass.
Diffstat (limited to 'bfd/ecoff.c')
0 files changed, 0 insertions, 0 deletions