Hi, On Tue, 25 Jan 2022, Thorsten Otto via fpc-devel wrote:
> > And of course i have to find out what causes vlink to put that strange > > program flags in the header. > > I think i found the reason for that. The offending lines in vlink/main.c are: > (...) > (at this point the option argument has already been checked to start > with -tos-). fpc passes the arguments "-tos-flags fastload,fastram". So > what happens is that sscanf does not find a valid number, does not write > any value to "fl", and a (more or less) random value is used as > gv->tosflags. Whoops. Good catch. I agree this is a bug in vlink, so I think I'll report this to Frank Wille. At least the fact that it should error on invalid argument. And of course FPC should pass the right thing. > So the documentation in vlink is a bit misleading. It either supports > "-tos-flags <number>, or alternatively -tos-fastalloc, -tos-fastram > etc., but not the syntax fpc uses. That should be changed to "-tos-flags > 7" instead. Indeed, I misunderstood the documentation back then. This actually explains some weird random things I've been experiencing with the TOS version all along, so thanks a lot! > gnu-ld has a similar switch, but it already uses 7 as default, so there > is need to change that too. vlink should imho also be changed to check > that a valid number was passed, but that's another issue ;) So at least in FPC I fixed this in b3cbf07. Free Pascal (main branch) now passes "-tos-flags 7" to vlink, and also allows to override that 7 value using the newly introduced platform specific -WF parameter. Further details I've posted to the Atari Forum topic. Cheers, -- Charlie _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel