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 Laaca(R) Homepage, Czech republic, 28.03.2017, 22:59

> > And even if I use the external linking switch (FPC.EXE -Xe test.pas) the
> > generated .EXE is compatible with UPX.
>
> Is this a typo, or do you mean INcompatible here?

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

-Xe parameter calls utility LD.EXE (older version 2.17) which is the same version like in f.e. FPC 2.4.2

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)

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.

However the modification in DJGPP/BinUtils is planned and documented but the FPC incompatibility seems to be some unplanned sideffect.

---
DOS-u-akbar!

 

Complete thread:

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