Free Pascal 3.0.2 - external linker? (Announce)
> > 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:
- Freepascal 3.0.2rc1 - Laaca, 30.12.2016, 23:54 (Announce)
- Free Pascal 3.0.2 (rc1) - Rugxulo, 08.01.2017, 20:14
- Free Pascal 3.0.2 (rc1) - marcov, 12.01.2017, 15:23
- Free Pascal 3.0.2 (final?) - Rugxulo, 23.02.2017, 16:17
- Free Pascal 3.0.2 (final?) - marcov, 27.02.2017, 13:06
- Free Pascal 3.0.2 (final?) - marcov, 27.02.2017, 14:03
- Free Pascal 3.0.2 - Rugxulo, 28.02.2017, 19:15
- Free Pascal 3.0.2 - marcov, 01.03.2017, 11:34
- Free Pascal 3.0.2 - Rugxulo, 02.03.2017, 22:17
- Free Pascal 3.0.2 - marcov, 03.03.2017, 15:56
- Free Pascal 3.0.2 - external linker? - Laaca, 24.03.2017, 21:13
- Free Pascal 3.0.2 - external linker? - marcov, 28.03.2017, 10:21
- Free Pascal 3.0.2 - external linker? - Laaca, 28.03.2017, 22:59
- Free Pascal 3.0.2 - external linker? - marcov, 29.03.2017, 13:08
- Free Pascal 3.0.2 - external linker? - Laaca, 28.03.2017, 22:59
- Free Pascal 3.0.2 - external linker? - marcov, 28.03.2017, 10:21
- Free Pascal 3.0.2 - bug in the PTC library - Laaca, 07.04.2017, 01:51
- Free Pascal 3.0.2 - bug in the PTC library - marcov, 09.04.2017, 13:36
- Free Pascal - May 2017 SourceForge.net Project of the Month - Rugxulo, 05.05.2017, 10:18
- Free Pascal - May 2017 SourceForge.net Project of the Month - marcov, 06.05.2017, 17:48
- Free Pascal - May 2017 SourceForge.net Project of the Month - Rugxulo, 05.05.2017, 10:18
- Free Pascal 3.0.2 - bug in the PTC library - marcov, 09.04.2017, 13:36
- Free Pascal 3.0.2 - external linker? - Laaca, 24.03.2017, 21:13
- Free Pascal 3.0.2 - marcov, 03.03.2017, 15:56
- Free Pascal 3.0.2 - Rugxulo, 02.03.2017, 22:17
- Free Pascal 3.0.2 - Rugxulo, 01.04.2017, 23:01
- Free Pascal 3.0.2 - marcov, 01.03.2017, 11:34
- Free Pascal 3.0.2 - Rugxulo, 28.02.2017, 19:15
- Free Pascal 3.0.2 (final?) - marcov, 27.02.2017, 14:03
- Free Pascal 3.0.2 (final?) - marcov, 27.02.2017, 13:06
- Free Pascal 3.0.2 (final?) - Rugxulo, 23.02.2017, 16:17
- Free Pascal 3.0.2 (rc1) - marcov, 12.01.2017, 15:23
- Free Pascal 3.0.2 (rc1) - Rugxulo, 08.01.2017, 20:14