binutils-gdb/ld/emultempl
Palmer Dabbelt ff6f4d9b2d 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.
2017-10-19 09:19:32 -07:00
..
aarch64elf.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
aix.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
alphaelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
arclinux.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
armcoff.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
armelf.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
astring.sed
avrelf.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
beos.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
bfin.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
cr16elf.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
crxelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
elf32.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
elf-generic.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
epiphanyelf_4x4.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
genelf.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
generic.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
gld960.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
gld960c.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
hppaelf.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
ia64elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
irix.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
linux.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
lnk960.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
m68hc1xelf.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
m68kcoff.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
m68kelf.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
metagelf.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
mipself.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
mmix-elfnmmo.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
mmixelf.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
mmo.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
msp430.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
nds32elf.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
needrelax.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
netbsd.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
nios2elf.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
ostring.sed
pe.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
pep.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
ppc32elf.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
ppc64elf.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
pruelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
README Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
riscvelf.em RISC-V: Add R_RISCV_DELETE, which marks bytes for deletion 2017-10-19 09:19:32 -07:00
rxelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
s390.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
scoreelf.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
sh64elf.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
solaris2.em Solaris2/LD: Fix anonymous version script acceptance bug 2017-01-24 12:53:52 +00:00
spu_icache.o_c
spu_icache.S
spu_ovl.o_c Regenerate spu_ovl.o_c 2016-10-15 12:53:57 +10:30
spu_ovl.S ld whitespace fixes 2017-10-12 23:30:43 +10:30
spuelf.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
sunos.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
tic6xdsbt.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
ticoff.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
v850elf.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
vanilla.em ELF: Call check_relocs after opening all inputs 2017-10-16 03:50:13 -07:00
vms.em ld whitespace fixes 2017-10-12 23:30:43 +10:30
vxworks.em ld internationalization fixes 2017-10-11 15:04:59 +10:30
xtensaelf.em Fix assertion failure for xtensa linker. 2017-08-02 11:48:07 +01:00
z80.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are sourced by genscripts.sh, after
setting some variables to substitute in, to produce
C source files that contain jump tables for each emulation.

Copyright (C) 2012-2017 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.