Skip to content

core.internal.array.equality causes large, unneeded module to be linked in from library #4915

@vandys

Description

@vandys

I have a small app, linking against a static library (i.e., a library.a format). It needs only a couple very small things, and yet one of the library's largest members was linking against the app. After much fiddling, I determined that the symbol:

D4core8internal5array8equality__T8__equalsTaTaZQoFNaNbNiNeMxAaMxQeZb

was undefined in my small app (nm shows "U") but was defined in the large library object ("W"). This brought in the whole module, swelling the app executable with the resulting whole chain of dependencies.

This is present in 1.40.1 on x86_64 on Linux. I can easily work around this with a local array compare, but you should ensure that either all uses of this array compare create a local symbol--or none.

I note that curl.o from the supplied library of 1.40.1 has this W symbol, unlike all the other references which are U. Hopefully that can lead you to the cause of this? Otherwise I can make code available, but it's not tiny.

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