Date: Tue, 7 Sep 1999 13:42:13 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Keith McCormick cc: djgpp AT delorie DOT com, "Mark E." Subject: Re: Need help building Allegro!?! In-Reply-To: <936657184.703540@ridge.spiritone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 6 Sep 1999, Keith McCormick wrote: > Another thing I changed myself (as intimated in mail archive) is the > COFF_DEFAULT_SECTION_ALIGNMENT_POWER. I changed it to 4 instead of 2. That might just be your problem. AFAIK, naive changes like that break the static constructors and destructors, which are called from `__main', and that is exactly where your program crashes. Mark, am I right in assuming that section alignment can cause these crashes? So either try the same setup with Binutils 2.8.1 from SimTel, or rebuild Binutils 2.9.1 after reverting to the original alignment, and see if the problem goes away. > Also, does this actually do anything because the linker scripts have an > ALIGN statement. Of course, this changes something. The ALIGN directives in the linker script are for the beginning of the section, whereas COFF_DEFAULT_SECTION_ALIGNMENT_POWER is for *subsections*. Subsections are the parts of code generated for each object file. If the object code for each .o file is 4-byte aligned, then you cannot get a better alignment for your code even if the section beginning is aligned better.