Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    be565320
    build: bring back libgcc_s.so · be565320
    Avi Kivity authored
    
    Commit c9e61d4a ("build: link libstdc++, libgcc_s only once") threw
    away libgcc_s.so since we already link with libgcc.a and libgcc_eh.a, which
    provide the same symbols, and since having the same symbols in multiple
    objects violates certain C++ rules.
    
    However, libgcc_eh.a provides certain symbols only as local symbols, which
    means they aren't available to the payload.  This manifests itself in errors
    such as failing to find _Unwind_Resume if an exception is thrown.
    
    (This is likely due to the requirement that mulitple objects linked with
    libgcc_eh.a work together, which also brings some confidence that the ODR
    violations of having two versions of the library won't bite us).
    
    Fix the problem by adding libgcc_s.so to the filesystem and allowing
    the payload to link to it.
    
    Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
    Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
    be565320
    History
    build: bring back libgcc_s.so
    Avi Kivity authored
    
    Commit c9e61d4a ("build: link libstdc++, libgcc_s only once") threw
    away libgcc_s.so since we already link with libgcc.a and libgcc_eh.a, which
    provide the same symbols, and since having the same symbols in multiple
    objects violates certain C++ rules.
    
    However, libgcc_eh.a provides certain symbols only as local symbols, which
    means they aren't available to the payload.  This manifests itself in errors
    such as failing to find _Unwind_Resume if an exception is thrown.
    
    (This is likely due to the requirement that mulitple objects linked with
    libgcc_eh.a work together, which also brings some confidence that the ODR
    violations of having two versions of the library won't bite us).
    
    Fix the problem by adding libgcc_s.so to the filesystem and allowing
    the payload to link to it.
    
    Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
    Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>