Skip to content

Add define_anonymous_data function to cranelift-module #2220

@bjorn3

Description

@bjorn3

Feature

Add a method to cranelift-module that defines a data object without creating a new symbol.

Benefit

Avoiding symbols for anonymous data objects improves linker times.

Implementation

For cranelift-simplejit symbol names are unused for everything except for imports and exports already. For cranelift-object the data object could be added to the right section and then the section id and offset could be stored to generate the right relocations in the future.

Alternatives

Using Linkage::Local requires you to generate an unique name and has a negative impact on compilation times.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions