From: "Kernel Panic" Newsgroups: comp.os.msdos.djgpp References: <1030288855 DOT 880883 AT queeg DOT ludd DOT luth DOT se> Subject: Re: Alignment problem in GCC 2.95.2 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2417.2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Date: Sun, 25 Aug 2002 21:08:52 GMT NNTP-Posting-Host: 62.234.42.113 X-Trace: castor.casema.net 1030309732 62.234.42.113 (Sun, 25 Aug 2002 23:08:52 MEST) NNTP-Posting-Date: Sun, 25 Aug 2002 23:08:52 MEST Organization: Euronet Internet To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Martin Stromberg wrote: > Can I see those macros? I'm interested myself in such aligning. Well, I can't remember exactly, but it was just something like #define ALIGN(X) asm("\n.balign "X"\n"), so it's not something that could substitute the alignment attribute. And then you also have to check manually if the structure is at the beginning of the data segment (in the assembly file), and if it is, put a dummy variable before the macro (so that the macro doesn't appear before the declaration of the data segment). > FreeBSD is perhaps using something other than COFF? It uses ELF; well, I forgot to say, on DJGPP I was also compiling to ELF (I rebuilt the binutils). I've just tried it on CYGWIN, and it gives the same warning (which in my case is actually an error), but defaults to 16 rather than 4. > I wrote my own linker script that aligns the .bss section to 4096 [...] Unfortunately, this is not suitable for me, because I'm compiling a microkernel (Hazelnut), and there are far more structures that have to be aligned on a certain boundary than it's possible to put together into the beginning of the section.. > Compiled in default, perhaps. Is there any possible way to change it without rebuilding GCC?.. Thanks!