Running the test program from the attached tarfile produces the expected output:
shared_lib/testuser> export LD_LIBRARY_PATH=../installed_lib shared_lib/testuser> ./appl_main Here is appl_main, now calling Pkg.Proc ... Pkg.Proc: X is 2 Here is appl_main, back from calling Pkg.Proc: end of program. However, the program hangs after the last output, i.e. does not relinquish control back to the command line. I tried this with FSF GCC versions 4.2.1 and svn 4.4 trunk as well as with GNATGPL-2007 and 2008. Same behavior with all. -- Summary: Main program runs fine but hangs on exit when linked with Ada shared lib Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: oliver dot kellogg at eads dot com GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38832