This causes __heap_start on CP/M-65 to be an absolute value rather than a relocatable one, even though it's defined in a relocatable segment, which meant the heap address wasn't getting relocated to the right place, causing big chunks of the program to be overwritten --- with different results on each target platform because they each loaded binaries in different places...
In the GNU linker language,
ALIGN(alignment)
actually produces an absolute value, whileALIGN(address, alignment)
produces a relocatable value. See https://sourceware.org/binutils/docs/ld/Builtin-Functions.html#index-ALIGN_0028align_0029 which states that the first is equivalent toALIGN(ABSOLUTE(address), alignment)
. Wheee!This causes
__heap_start
on CP/M-65 to be an absolute value rather than a relocatable one, even though it's defined in a relocatable segment, which meant the heap address wasn't getting relocated to the right place, causing big chunks of the program to be overwritten --- with different results on each target platform because they each loaded binaries in different places...