Skip to content

Audit dependencies of libcore #27200

Closed
Closed
@eefriedman

Description

@eefriedman

Current output of objdump -t libcore-7e44814b.rlib | grep UND on x86-64 Linux:

0000000000000000         *UND*  0000000000000000 __morestack
0000000000000000         *UND*  0000000000000000 __powidf2
0000000000000000         *UND*  0000000000000000 __powisf2
0000000000000000         *UND*  0000000000000000 ceil
0000000000000000         *UND*  0000000000000000 ceilf
0000000000000000         *UND*  0000000000000000 exp
0000000000000000         *UND*  0000000000000000 exp2
0000000000000000         *UND*  0000000000000000 exp2f
0000000000000000         *UND*  0000000000000000 expf
0000000000000000         *UND*  0000000000000000 floor
0000000000000000         *UND*  0000000000000000 floorf
0000000000000000         *UND*  0000000000000000 fma
0000000000000000         *UND*  0000000000000000 fmaf
0000000000000000         *UND*  0000000000000000 fmod
0000000000000000         *UND*  0000000000000000 fmodf
0000000000000000         *UND*  0000000000000000 log
0000000000000000         *UND*  0000000000000000 log10
0000000000000000         *UND*  0000000000000000 log10f
0000000000000000         *UND*  0000000000000000 log2
0000000000000000         *UND*  0000000000000000 log2f
0000000000000000         *UND*  0000000000000000 logf
0000000000000000         *UND*  0000000000000000 memcmp
0000000000000000         *UND*  0000000000000000 memcpy
0000000000000000         *UND*  0000000000000000 memset
0000000000000000         *UND*  0000000000000000 pow
0000000000000000         *UND*  0000000000000000 powf
0000000000000000         *UND*  0000000000000000 round
0000000000000000         *UND*  0000000000000000 roundf
0000000000000000         *UND*  0000000000000000 rust_begin_unwind
0000000000000000         *UND*  0000000000000000 rust_eh_personality
0000000000000000         *UND*  0000000000000000 trunc
0000000000000000         *UND*  0000000000000000 truncf

rust_eh_personality and rust_begin_unwind are lang-items expected to be defined by the user. __morestack, __powidf2, and __powisf2 are defined by libgcc. memcpy, memset, and memcmp (?) have to be defined somewhere because LLVM can insert calls to them implicitly.

The various floating-point functions are a bit dubious; it probably doesn't make sense to require freestanding environments to define log2().

We should make sure this list is appropriate, and have an automated test to make sure it doesn't change accidentally.

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