Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaning and Optimization: Linker Relaxation Passes #107

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

a4lg
Copy link
Owner

@a4lg a4lg commented Feb 10, 2023

@a4lg a4lg added the enhancement New feature or request label Feb 10, 2023
@a4lg a4lg force-pushed the riscv-bfd-tidying-2 branch from 38674b8 to 26a512c Compare February 10, 2023 10:37
Commit 43025f0 ("RISC-V: Improve link time complexity.") reduced the
time complexity of the linker relaxation but some code portions did not
reflect this change.

This commit fixes a comment describing each relaxation pass and reduces
actual number of passes for the RISC-V linker relaxation from 3 to 2.
Though it does not change the functionality, it marginally improves the
performance while linking large programs (with many relocations).

bfd/ChangeLog:

	* elfnn-riscv.c (_bfd_riscv_relax_section): Fix a comment to
	reflect current roles of each relaxation pass.

ld/ChangeLog:

	* emultempl/riscvelf.em: Reduce the number of linker relaxation
	passes from 3 to 2.
@a4lg a4lg force-pushed the riscv-bfd-tidying-2 branch from 26a512c to 779b250 Compare February 10, 2023 11:03
@a4lg a4lg merged commit 779b250 into master Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant