Skip to content

Updating link-section to use private sections#469

Merged
mmastrac merged 10 commits into
masterfrom
link-section-names
May 28, 2026
Merged

Updating link-section to use private sections#469
mmastrac merged 10 commits into
masterfrom
link-section-names

Conversation

@mmastrac

@mmastrac mmastrac commented May 19, 2026

Copy link
Copy Markdown
Owner

For sections that don't use unsafe, we'll generate a per-section unique hash based on the location of the section to ensure that multiple sections with the same base name don't collide.

For sections that do use unsafe, we will only use the hash if the name overflows the platform-specific length maximum.

The crate now explictly disallows anything but name = when unsafe is used, and unsafe is now required if the proc_macro feature is not enabled.

scattered-collect gets updated for all the various changes.

mmastrac added a commit that referenced this pull request May 28, 2026
Implements a new umbrella macro `combine!` that handles string and ident
concatenation for various things we need. Replaces the old macros with
compat stubs for now - we'll be reworking things in the future.

This is like a version of `concat!` and `stringify!` on steroids. It
mostly performs string concatenation, but callers may embed
`__FUNCTION__(...)` calls internally which are evaluated before being
appending to the ident or string.

Extracted from #469
@mmastrac mmastrac force-pushed the link-section-names branch from 746a28e to b9150d6 Compare May 28, 2026 20:28
@mmastrac mmastrac marked this pull request as ready for review May 28, 2026 22:17
@mmastrac mmastrac merged commit f8b097f into master May 28, 2026
36 checks passed
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.

1 participant