Hi John,
It appears that LD in binutils versions after 2.35 is producing segfault executables with Free Pascal 2.6.4. You cannot build a working HelloWorld.
Please could you file a bug report about this issue using the binutils bugzilla system: https://sourceware.org/bugzilla/enter_bug.cgi?product=binutils
I have written up a full report, please see https://gitlab.com/freepascal.org/fpc/source/-/issues/39324 <https://gitlab.com/freepascal.org/fpc/source/-/issues/39324>
Has anyone been able to track down the exact cause of the segmentation fault ? For example is the loader rejecting the executable as being malformed, or is the startup code branching off into a random memory location, or something else ?
The Free Pascal developers believe this is a regression of a similar LD bug that previously occurred and was fixed in LD.
Do you know which bug this was ?
They put a workaround/redesign in later versions of FreePascal, the 3.x series, but are unable to backport their fix to FPC 2.6.4.
Not to be mean, but if the 3.x series is working, why worry about the 2.6.4 release ? If people want to use that release, can't they also stick with binutils 2.35 ? Cheers Nick