Skip to content

Commit

Permalink
RISC-V: Prepare for more generic PCREL relaxations
Browse files Browse the repository at this point in the history
There's not only Global-pointer Relaxation defined by the RISC-V psABI
Specification.  There is also the Zero-page relaxation, making the name
"pcgp" not suitable for storage to PC-relative relocations used in the
linker relaxation passes.

This commit prepares for future changes including proper zero-page
relaxation.

bfd/ChangeLog:

	* elfnn-riscv.c
	(struct riscv_pcgp_hi_reloc): Rename to...
	(struct riscv_pc_relax_hi_reloc): ...here.
	(struct riscv_pcgp_lo_reloc): Rename to...
	(struct riscv_pc_relax_lo_reloc): ...here.
	(riscv_init_pcgp_relocs): Rename to...
	(riscv_init_pc_relax_relocs): ...here.
	(riscv_free_pcgp_relocs): Rename to...
	(riscv_free_pc_relax_relocs): ...here.
	(riscv_record_pcgp_hi_reloc): Rename to...
	(riscv_record_pc_relax_hi_reloc): ...here.
	(riscv_find_pcgp_hi_reloc): Rename to...
	(riscv_find_pc_relax_hi_reloc): ...here.
	(riscv_record_pcgp_lo_reloc): Rename to...
	(riscv_record_pc_relax_lo_reloc): ...here.
	(riscv_find_pcgp_lo_reloc): Rename to...
	(riscv_find_pc_relax_lo_reloc): ...here.
	(riscv_update_pcgp_relocs): Rename to...
	(riscv_update_pc_relax_relocs): ...here.
	(_riscv_relax_delete_bytes, _riscv_relax_delete_piecewise,
	_riscv_relax_delete_immediate, _bfd_riscv_relax_call,
	_bfd_riscv_relax_tls_le, _bfd_riscv_relax_align,
	_bfd_riscv_relax_section): Reflect name changes.
	(_bfd_riscv_relax_lui, _bfd_riscv_relax_pc):
	Likewise.  Also change "GP-relative" to "GP/zero-relative"
	in the function description comment.
  • Loading branch information
a4lg committed Oct 19, 2023
1 parent f94a0a1 commit c74a857
Showing 1 changed file with 75 additions and 68 deletions.
Loading

0 comments on commit c74a857

Please sign in to comment.