[Llvm-bgq-discuss] Exception handling, dynamic linking and toolchain-fixup-4.7.2

Hal Finkel hfinkel at anl.gov
Sun Apr 5 07:53:50 CDT 2015


Hi everyone,

For those following the nightly builds, as of r234111-20150405, an additional rpm will need to be installed: toolchain-fixup-4.7.2 (the download link is near the bottom of the nightly builds page). This rpm contains a rebuild of libgcc_s.so.1 from the 4.7.2 toolchain which properly handles unwinding for dynamically linked applications.

Why? Unfortunately, because of the way that IBM patched and built the 4.7.2 toolchain, the libgcc_s.so.1 provided does not work correctly. Specifically, it does not properly restore the TOC pointer in register r2 when entering a catch block (which happens because of the way that IBM changed the static/dynamic linking default in their patch), and does not properly match exception types (a problem that can be replicated in cross-compiling configurations even without IBM's patch, and seems to be a problem with cross-compiled 4.7.2 on PPC generally). With the library in toolchain-fixup-4.7.2, instead of crashing whenever a dynamically-linked application using the 4.7.2 toolchain throws an exception, exception handling should now work for dynamically linked applications as it does for statically-linked applications.

 -Hal

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-bgq-discuss mailing list