-
Notifications
You must be signed in to change notification settings - Fork 23
Proposal: remove linkme #21
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
linkme is a tool for collecting elements across crates during linking. We use it to maintain trap callbacks.
Why
However, there are currently the following issues:
-
The trap callback slice we create using
linkmewill only have 0 or 1 items. It's somewhat overkill. -
It doesn't work well on bare metal (
target_os = "none"), because bare metal applications typically require writing a linker script and then maintaining each usedlinkmesection (linkme_XXX/linkm2_XXX), otherwise it will become Orphan Sections, and then be placed in a (potentially inappropriate) location by the linker.
Possible Alternatives
- Use
crate_interfaceor similar methods to leverage weak symbols to define trap callbacks. - Patch
linkmeand rename the generated symbols to.rodata.xxx, etc., which might solve the problem (unverified).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed