Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Free Pascal 3.0.2 - external linker? (Announce)

posted by marcov(R), 29.03.2017, 13:08

> "FPC -Xi test.pas" makes binary which is not compatible with UPX.
> "FPC -Xe test.pas" produces binary which has no problem with UPX.


Clear, so it is internal linker vs external linker.


> No parameter or -Xi parameter calls own FPC linking code. So it shows that
> this incompatibility has nothing to do with DJGPP 2.05 incompatibility,
> resp. Binutils 2.23.2 incompatibility (which can be observed f.e.
> here)

The point was that the incompatibility was only with UPX, not DJGPP or its utils itself.

> I suspect some change in the OGCOFF.PAS file in \COMPILER subdirectory
> The change was done after FPC 2.6.4 which is after March 2014
> http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/ogcoff.pas?view=log
>
> It seems that UPX checks the COFF header very strictly and rejects all
> deviations.

The whole dos internal linker is post 2.6.x afaik. And I wouldn't call it strictly, but merely a subset hacked till it worked with DJGPP.

This has happened before, *nix derived tools are hardly tested with anything else than what gcc supports. Often (like here) not even attempt was made to support the standard fully.

 

Complete thread:

Back to the forum
Board view  Mix view
15112 Postings in 1359 Threads, 249 registered users, 20 users online (0 registered, 20 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum