Skip to content

linker-diff for RISC-V#920

Merged
marxin merged 3 commits intowild-linker:mainfrom
lapla-cogito:riscv_diff
Sep 29, 2025
Merged

linker-diff for RISC-V#920
marxin merged 3 commits intowild-linker:mainfrom
lapla-cogito:riscv_diff

Conversation

@lapla-cogito
Copy link
Copy Markdown
Member

close #776

@lapla-cogito lapla-cogito force-pushed the riscv_diff branch 10 times, most recently from ea61a6a to ad9252f Compare June 23, 2025 10:20
@lapla-cogito lapla-cogito force-pushed the riscv_diff branch 2 times, most recently from b9afdb3 to 2ca34f7 Compare July 26, 2025 08:10
@marxin
Copy link
Copy Markdown
Collaborator

marxin commented Aug 29, 2025

I would like to continue working on the RISC-V port somewhen in September. @lapla-cogito Are you planning to work on this PR, please? It's definitely something that will make my life easier.

@lapla-cogito
Copy link
Copy Markdown
Member Author

Sorry for the delay, I'll work on this in this week.

@lapla-cogito lapla-cogito force-pushed the riscv_diff branch 5 times, most recently from fc2a912 to 65cd0ed Compare September 7, 2025 06:04
@marxin
Copy link
Copy Markdown
Collaborator

marxin commented Sep 10, 2025

Sorry for the delay, I'll work on this in this week.

Don't hurry, it's great you've been working on it and don't hesitate to ask me about anything if you feel you're stuck.

@lapla-cogito lapla-cogito force-pushed the riscv_diff branch 6 times, most recently from b1a8650 to b75adc6 Compare September 23, 2025 13:07
@lapla-cogito
Copy link
Copy Markdown
Member Author

lapla-cogito commented Sep 23, 2025

I'm not sure why some tests hang and never finish when I run them with WILD_TEST_CROSS=riscv64. The same thing happens both locally and in the CI environment...

@marxin
Copy link
Copy Markdown
Collaborator

marxin commented Sep 23, 2025

I'm not sure why some tests hang and never finish when I run them with WILD_TEST_CROSS=riscv64.

Based on my initial investigation, it's connected to your changes where you decode the instructions with objdump (linker_diff::utils::decode_insn_with_objdump), So I guess you're either doing too many invocations of the tool, or there's some glitch connected to read/write with the sub-process. Please add some verbose logging that will help you.

`add_diff` is relatively expensive in linker-diff, so items that don't need difference calculations should avoid using it.
@lapla-cogito lapla-cogito marked this pull request as ready for review September 25, 2025 22:49
@lapla-cogito
Copy link
Copy Markdown
Member Author

This PR didn't implement relaxation itself, which caused some tests to hang due to repeated calls to the relatively heavy add_diff function within report_section_diffs. I addressed this by checking which sections should be ignored before calling add_diff, preventing unnecessary calls where possible.

Copy link
Copy Markdown
Member

@davidlattimore davidlattimore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I tried running it on my VF2 and the tests passed - well, except one, but it seems it was already failing. Thanks for your work on this!

Perhaps wait a bit in case @marxin has any comments.

@lapla-cogito lapla-cogito requested a review from marxin September 27, 2025 12:27
@marxin marxin merged commit fbfeeb6 into wild-linker:main Sep 29, 2025
36 of 37 checks passed
@marxin
Copy link
Copy Markdown
Collaborator

marxin commented Sep 29, 2025

Thank you for working on that @lapla-cogito!

@lapla-cogito lapla-cogito deleted the riscv_diff branch September 30, 2025 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RISC-V linker-diff support

3 participants