From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Mon, 25 Jun 2001 13:27:17 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: gcc 3.0 released Message-ID: <3B373C35.10153.49AF6E@localhost> References: In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com > Then please explain how come we now need to change it because of a new > version of GCC. Because the gcc 3.0 port has been configured to take advantage of advanced features. For example, link-once sections reduce code bloat from using C++ templates. But the linker script has to be changed so the linker knows where to put these sections (either in .text, .data, etc.) after the duplicates have been discarded. Another example is the -finit-priority feature in gcc 2.95 and above. It allows control over the order in which static C++ file scope objects are constructed and destructed. gcc outputs info into .ctors.xxxxx and .dtors.xxxxx sections (where xxxxx is a number based on the priority). The linker script much be changed to sort these .[cd]tors.* sections and place them so they get called in the right order. Mark