Skip to content

Conversation

tomsons26
Copy link
Contributor

@tomsons26 tomsons26 commented Sep 7, 2025

Avoids having to remap these functions whenever the source file changes as the number after E changes seemingly based on line numbers
image

Should matches!(section_kind, SectionKind::Code | SectionKind::Data | SectionKind::Bss) be moved to is_symbol_compiler_generated as techically _$E appears only in code sections while the existing @ is for data?

@tomsons26 tomsons26 changed the title Implement automatic symbol pairing for MSVC generated static functions Implement automatic symbol pairing for MSVC generated static inits Sep 7, 2025
@tomsons26 tomsons26 changed the title Implement automatic symbol pairing for MSVC generated static inits Implement automatic symbol pairing for MSVC generated static functions Sep 7, 2025
@encounter
Copy link
Owner

Looks good, thanks!

Should matches!(section_kind, SectionKind::Code | SectionKind::Data | SectionKind::Bss) be moved to is_symbol_compiler_generated as techically _$E appears only in code sections while the existing @ is for data?

I think it's fine as-is! I don't think there's a scenario where we'd have symbol names that match the patterns and shouldn't have this behavior.

@encounter encounter merged commit 532b684 into encounter:main Sep 7, 2025
24 checks passed
@tomsons26 tomsons26 deleted the msvc_static_match branch September 7, 2025 19:35
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.

2 participants