@Trev
Is this patch in adtools? My cross-compiler doesn't align sections on 64K boundaries. Was it implemented in a host-specific way? I haven't looked at adtools source in over a year....
Not sure if is "a patch", its just seems that alignment-based-linker-scripts now used by default (as well as on my cross-compiler setup too, btw). Maybe for previous versions by default SDKs use non-alignment linker scripts ..
@TonyW
Where is that "-N" supposed to go? I tried it in the compile options "-O2 -N ..." and in the link options "-N -L. ..." and neither made any difference here for one system component.
"gcc -N 1.c -o 1" quoted few times in topic
You can start from simple hello-world binary, check the differences in size with -N and without , and then step by step try to add it to bigger componets.
-N itself passed to linker (LD), and handles via ldscripts in /sdk/gcc/ppc-amigaos/lib/ldscripts/, but when you run it via gcc you don't need to worry. By logic you can mimik it like this when you pass -N to gcc:
shell:> cc1 1.c -o 1.s
shell:> as 1.s -o 1.o
shell:> ld -q -N 1.o -o 1
But of course when you just use gcc, you just pass -N , linker scripts do the work, and your binary builds as non-alignment 64k segments. If it make no differences for you, that mean that or you use beta-version of SDK where is by default non-alignment-ldscripts are used, or you just pass -N to objects (but should pass to final linking line), or you just do something wrong. The best ways its just check on hello_world example, if you have differences in size with and without -N, then all works for you, just you do something wrong for your programms. And if no differences, then your SDK by some reassons worry about already.
You always can do that: gcc -v 1.c , and you will see all the stuff which happens in background. The latest strings will be final-linking strings, and if you have -N here, then its all automatic for you already, if not , then check via hello_world example, etc
You also can check sdk/gcc/ppc-amigaos/lib/ldscripts directory. Files which ends on "n" (like amigaos.xn and elf32ppc.xbn) are linker scripts which handle that -N. And in those scripts you can find how binary builds on that matter. In coments it says "script for -N: mix text and data on same page; don't align data". And in the whole scripts many comments which explain how -N will reacts at low level (i.e. when construct elf)
@all
Anyway, just to add, i do not know if we use on amigaos4 PPC SVR4 ABI or PPC EABI ? Because by specifications:
PPC SVR4 ABI, pg. 5-1: The PPC SVR4 ABI specifies that segments are aligned on 64K (0x10000) boundaries.
PPC EABI, pg. 19: The PPC EABI says that there are no program loading requirements.
As we have alignment right now by default, i assume we going via PPC SVR4 ABI ? And if so, then have 64k alignment for segments by default are "right".