Re: 438-byte Hello, world Win32 EXE in D
On 9/7/14, Vladimir Panteleev via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Thanks to recent advances in DMD (-betterC and -m32mscoff), I could get a Hello, world program on Win32 down to just 438 bytes when compiled. This is without assembly, linker scripts, custom Phobos/Druntime, or manual post-build tweaks. I guess this is great news for virus writers. :P And, I guess scene devs. ^^
Re: 438-byte Hello, world Win32 EXE in D
On Monday, 8 September 2014 at 07:01:19 UTC, Andrej Mitrovic via Digitalmars-d-announce wrote: On 9/7/14, Vladimir Panteleev via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: I guess this is great news for virus writers. :P A std.virus or core.virus module? ;;) Nothing sweeter than having it as a standard...
Re: 438-byte Hello, world Win32 EXE in D
On Monday, 8 September 2014 at 07:01:19 UTC, Andrej Mitrovic via Digitalmars-d-announce wrote: I guess this is great news for virus writers. :P Why? Modern viruses are bloatware: https://www.virustotal.com/en/file/73559b15d1f55a9f08a5674fd4320a7ba9ff4e98f0949a1b2a756ec8eafd5caf/analysis/
Re: 438-byte Hello, world Win32 EXE in D
On Sunday, 7 September 2014 at 21:03:17 UTC, Vladimir Panteleev wrote: The 438-byte Hello, world program is achieved using Crinkler, which is a COFF linker with aggressive compression and header optimization. It was created for compressing 4K demos. Pretty cool! Up to now D had little chance to compete in 4k and 64k demo competitions because of the inability to use Crinkler.
Re: 438-byte Hello, world Win32 EXE in D
On Sunday, 7 September 2014 at 21:03:17 UTC, Vladimir Panteleev wrote: The 438-byte Hello, world program is achieved using Crinkler, which is a COFF linker with aggressive compression and header optimization. It was created for compressing 4K demos. Pretty nice! Is the format correct too, or can it break on OS upgrades?
Re: 438-byte Hello, world Win32 EXE in D
On Monday, 8 September 2014 at 07:59:37 UTC, Ola Fosheim Grøstad wrote: «Smallest PE file that downloads a file over WebDAV and executes it: 133 bytes» http://www.phreedom.org/research/tinype/ But that downloaded file is bloatware, because it has to implement functionality, which is not provided by the system. That tiny pe file doesn't download anything, it's completely done by the system.
Re: 438-byte Hello, world Win32 EXE in D
On Monday, 8 September 2014 at 08:08:23 UTC, Kagamin wrote: But that downloaded file is bloatware, because it has to implement functionality, which is not provided by the system. That tiny pe file doesn't download anything, it's completely done by the system. Yeah… http://stackoverflow.com/questions/284797/hello-world-in-less-than-20-bytes
Re: 438-byte Hello, world Win32 EXE in D
On Monday, 8 September 2014 at 08:06:37 UTC, Ola Fosheim Grøstad wrote: On Sunday, 7 September 2014 at 21:03:17 UTC, Vladimir Panteleev wrote: The 438-byte Hello, world program is achieved using Crinkler, which is a COFF linker with aggressive compression and header optimization. It was created for compressing 4K demos. Pretty nice! Is the format correct too, or can it break on OS upgrades? From the Crinkler manual: COMPATIBILITY - The goal of Crinkler is for the produced EXE files to be compatible with all widely used Windows versions and configurations. As of version 1.4, the EXE files produced by Crinkler are, to the best of our knowledge, compatible with Windows XP, Windows Vista, Windows 7 and Windows 8, both 32 bit and 64 bit versions. They are compatible with Data Execution Prevention and with execution hooks that inspect the import or export table of launched executables (graphics drivers are known to do this). It is not a primary goal of Crinkler to anticipate incompatibilities that may arise in the future as a consequence of new Windows versions, graphics drivers or other widespread system changes. Guaranteeing such compatibility would require Crinkler to follow the EXE file format specification to the letter, precluding most of the header hacks that Crinkler utilizes in order to reduce the size overhead of the EXE format as much as possible. Rather, we strive to continually monitor the compatibility situation and release a new, fixed version of Crinkler whenever a situation arises that affects the compatibility severely (such as a new, incompatible version of Windows). This has occurred several times already throughout the history of Crinkler. Each new version of Crinkler not only produces executables that are compatible with the current majority of targeted systems. It also includes a way of fixing old Crinkler executables to have the same level of compatibility. See the section on recompression for more details on this feature. This compatibility strategy ensures that intros made using Crinkler will continue to be accessible to their audience, even if the Windows EXE loader changes in an incompatible way that could not be anticipated at the time the intro was produced.