Mail Archives: djgpp/2002/08/25/21:29:15
Martin Stromberg <ams AT speedy DOT ludd DOT luth DOT se> 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!
- Raw text -