Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    c1c1ec36
    elf: fix symbol resolution order to use load order · c1c1ec36
    Avi Kivity authored
    This fixes an issue where a symbol exists in multiple objects; when just
    one is loaded it is resolved to one of the modules, but after the second is
    loaded, it resolves to the second.  To the program this appears as if the
    address or contents of a static variable has changed.
    
    In our case this was triggered by both statically and dynamically linking
    a library.
    c1c1ec36
    History
    elf: fix symbol resolution order to use load order
    Avi Kivity authored
    This fixes an issue where a symbol exists in multiple objects; when just
    one is loaded it is resolved to one of the modules, but after the second is
    loaded, it resolves to the second.  To the program this appears as if the
    address or contents of a static variable has changed.
    
    In our case this was triggered by both statically and dynamically linking
    a library.