Skip to content

Default to erroring out link stage if there are any remaining undefined symbols. #2714

Closed

Description

@juj

Similar to issue #2713, we would like to mature towards having Emscripten linker behave conformant to how native linkers work. The native linkers fail with an error if linking to an executable results in any undefined symbols that were not found. Currently by default, Emscripten will only issue a warning, but still continue and return with a success and error code of 0.

We should instead behave like native linkers do, and by default raise an error if the link step finishes with undefined symbols. This error should be presented with a helpful error message that instructs how the developer can acknowledge that the symbols are expected to be missing (e.g. "Pass the linker flag -s ERROR_UNDEFINED_SYMBOLS=0 to hide this warning").

Activity

  1. self-assigned this
    on Aug 25, 2014
  2. juj commented on Aug 8, 2017

    @juj
    CollaboratorAuthor

    We have this now implemented, but we don't yet default to -s ERROR_UNDEFINED_SYMBOLS=1. Also, we have warned users in https://groups.google.com/d/msg/emscripten-discuss/1bB-OnNmM0g/40bxdgOkBwAJ that at some point -s ERROR_UNDEFINED_SYMBOLS=1 will become the default.

    I think with a good error message like "Pass the linker flag -s ERROR_UNDEFINED_SYMBOLS=0 to revert to old behavior" we should be ready to flip this now?

  3. kripken commented on Aug 8, 2017

    @kripken
    Member

    Sounds ok to me.

  4. stale commented on Aug 30, 2019

    @stale

    This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions