Commit 1d104c93 authored by Palmer Dabbelt's avatar Palmer Dabbelt
Browse files

(WIP) 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.

R_RISCV_DELETE will never be emitted into ELF objects, so therefor isn't exposed
to the rest of binutils.
parent 272f43e3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment