Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Implement stable symbol-name generation algorithm. #31539

Closed

Commits on Mar 15, 2016

  1. Configuration menu
    Copy the full SHA
    1dae394 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d4b55d2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95c0daf View commit details
    Browse the repository at this point in the history
  4. Make library paths passed by compiletest tool absolute.

    Otherwise, changing the current working directory can mess up runtime linking.
    michaelwoerister committed Mar 15, 2016
    Configuration menu
    Copy the full SHA
    410caeb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    446d4ec View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b2eed71 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b5a7fd9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    eb4de06 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4d1259e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e3a78d8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6351081 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9a1465c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a3dc048 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b327213 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    25cbff1 View commit details
    Browse the repository at this point in the history
  16. Make the compiler emit an error if the crate graph contains two crate…

    …s with the same crate-name and crate-salt but different SVHs.
    michaelwoerister committed Mar 15, 2016
    Configuration menu
    Copy the full SHA
    9d5ce13 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    00c206f View commit details
    Browse the repository at this point in the history
  18. Add a "link-guard" to avoid accidentally linking to a wrong dylib at …

    …runtime.
    
    We want to prevent compiling something against one version
    of a dynamic library and then, at runtime accidentally
    using a different version of the dynamic library. With the
    old symbol-naming scheme this could not happen because every
    symbol had the SVH in it and you'd get an error by the
    dynamic linker when using the wrong version of a dylib. With
    the new naming scheme this isn't the case any more, so this
    patch adds the "link-guard" to prevent this error case.
    
    This is implemented as follows:
    
    - In every crate that we compile, we emit a function called
      "__rustc_link_guard_<crate-name>_<crate-svh>"
    - The body of this function contains calls to the
      "__rustc_link_guard" functions of all dependencies.
    - An executable contains a call to it's own
      "__rustc_link_guard" function.
    
    As a consequence the "__rustc_link_guard" function call graph
    mirrors the crate graph and the dynamic linker will fail if a
    wrong dylib is loaded somewhere because its
    "__rustc_link_guard" function will contain a different SVH in
    its name.
    michaelwoerister committed Mar 15, 2016
    Configuration menu
    Copy the full SHA
    f6b0f17 View commit details
    Browse the repository at this point in the history