Skip to content

Make GFp_armcap_P/ring_core_*_OPENSSL_armcap_P a hidden symbol #1808

Closed
@briansmith

Description

@briansmith

When one tries to create a --crate-type=staticlib or similar, GFp_armcap_P will be exported from the staticlib. If that static library is then linked into Rust program that depends on ring, the user will get "duplicate symbol" errors for this symbol. The hypothesis is that this is due to the symbol not having visibility=hidden.

This symbol is special because it is prefixed_export! which means it gets a #[export_name = "..."] annotation. Other symbols aren't so affected on ARM because they are defined in C and are given visibility=hidden.

On non-ARM/Aarch64/x86/x86-64 targets, bn_mul_mont is affected in the same way for the same reason. That should be rectified as well. Basically we need to remove prefixed_export! and all its uses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions