Skip to content

Remove dead code in R2RPEBuilder #115953

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

elinor-fung
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings May 23, 2025 23:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes unused code from R2RPEBuilder to simplify section relocation logic.

  • Deletes the SectionRVADelta struct and its list field
  • Removes RelocateRVA and RelocateDirectoryEntry methods
  • Drops the SDataSectionName constant and related dead comments

@@ -210,16 +161,13 @@ public R2RPEBuilder(
_sectionBuilder.SetDllNameForExportDirectoryTable(outputFileSimpleName);
}

if (_sectionBuilder.FindSection(R2RPEBuilder.RelocSectionName) == null)
Copy link
Member Author

Choose a reason for hiding this comment

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

We create the section builder and add any sections above - there's no need to check if the reloc section already exists.

@elinor-fung elinor-fung merged commit 9a6481d into dotnet:main May 28, 2025
94 checks passed
@elinor-fung elinor-fung deleted the r2rpebuilder-deadCode branch May 28, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants