This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Tested on i686-linux, committed on trunk Because Ada finalization is global, "dlclosing" a shared Stand-Alone Library was doing Ada finalization. Then after that it was no longer possible to use some services (such as writing to a file) in the main program that need runtime support. This patch ensures that Ada finalization is not called when a shared Stand-Alone Library is "dlclosed". The test for this is to have a main program that output to standard output before and after dlopening then dlcosing a shared Stand-Alone Library. No exception should be raised when writing to standard output after dlclosing the SAL. Also take into account .NET specific needs in the binder generated file. Previously, there was an unconditional WITH of System.Restrictions in the binder generated file, and the associated data was unconditionally initialized. With this patch, this only happens if there is an explicit use of System.Restrictions somewhere in the partition. This is particularly important in the context of the configurable run time, where this unit might not be present. To test, compile a simple program, and bind it procedure h is begin null; end; Now search for the string Restri in the binder file grep -i restri b~h.adb With this patch in place, the string will not be present 2007-06-06 Arnaud Charlet <charlet@adacore.com> Vincent Celier <celier@adacore.com> Robert Dewar <dewar@adacore.com> * bindgen.adb (Gen_Output_File_Ada): Generate pragma No_Run_Time when needed. (Gen_Output_File_Ada, Gen_Output_File_C): Never use __attribute ((destructor)) for adafinal, even when switch -a is used. Do not issue pragma Linker_Destructor for adafinal when switch -a is used. (Gen_Object_Files_Options): Add formatting of Linker Options, when Output_Linker_Option_List is set. Suppress this formatting when Zero_Formatting is set. Add case for CLI_Target. (System_Restrictions_Used): New flag, used to avoid generating with of System_Restrictions and initialization of the data unless there is some use of System.Restrictions in the partition. (Check_System_Restrictions_Used): New procedure * s-stalib.adb: Remove with of System.Restrictions. No longer needed since we only with this unit in the binder file if it is used elsewhere in the partition.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |