Skip to content

duplicated intrinsic implementations linked into libstd #542

@klensy

Description

@klensy

duplicated intrinsic implementations linked into libstd, for example 1.73.0-nightly (da6b55cc5 2023-07-17). checked on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc.

running cargo expand will show, for example, that __adddf3 will be exported via 2 paths:
compiler_builtins::float::add::__adddf3 and
compiler_builtins::float::add::__adddf3::__adddf3
maybe it's the reason?

        pub extern "C" fn __adddf3(a: f64, b: f64) -> f64 {
            add(a, b)
        }
        pub mod __adddf3 {
            #[no_mangle]
            pub extern "C" fn __adddf3(a: f64, b: f64) -> f64 {
                super::__adddf3(a, b)
            }
        }

There can be few cases:

  1. think function + implementation: for example __adddf3, where thunk (compiler_builtins::float::add::__adddf3::__adddf3) function is just jump to actual implementation compiler_builtins::float::add::__adddf3
  2. 2 copies of the same implementation, for example __ashldi3
  3. 2 different implementations (in asm representation), for example __divmodti4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions