shows that other things ended up being earlier than
the stuff in pload:
C:\devel\pdos\src>grep main pload.c
pload.c: /* Released to the Public Domain */
pload.c: int main(void)
pload.c: /* we need to enter here to avoid Watcom name mangling of main() */ pload.c: main();
C:\devel\pdos\src>grep dumplong pload.c
pload.c: void dumplong(unsigned long x);
pload.c: /* now you can do debugging with dumplong/dumpbuf, without pload.c: void dumplong(unsigned long x)
C:\devel\pdos\src>
Almost everything appears to have been moved to here:
012C0H 09455H 08196H COMDAT_SEG1 CODE
and then rearranged in an order that I don't actually want.
Any idea what is happening?
I have no idea what "COMDAT_SEG1" means.
I looked at all the link options and didn't see anything
that might keep things in the right order.
From mutazilah@gmail.com@21:1/5 to All on Fri Jun 23 02:59:37 2023
Switching from -O2 to -Ox solved the problem.
I think because -O2 must have -Gy which separates
functions into separate segments (or something like
that) so that the linker can eliminate dead code.
So now I have a bigger executable, but at least it is
in the right order so that I can minimize the number
of sectors that the boot sector needs to load.