Crinkler by Loonies [web] & TBC
[nfo]
|
||||||||
---|---|---|---|---|---|---|---|---|
|
||||||||
|
popularity : 82% |
|||||||
alltime top: #95 |
|
|||||||
added on the 2005-07-21 14:31:55 by Blueberry |
popularity helper
comments
!
rulez added on the 2005-07-21 15:19:16 by beton
An executable packer is not a demotool...
I don't know, its a tool created by sceners explicitly for the purpose of efficiently packing 4kb intros. It deserves to be here a lot more than some other "demotool" prods.
Personally, I'm more interested in Blueberry's unreleased Amiga packer...
On a totally unrelated note, the best-named packer in history was "Turtle Smasher". Pure genius!
Personally, I'm more interested in Blueberry's unreleased Amiga packer...
On a totally unrelated note, the best-named packer in history was "Turtle Smasher". Pure genius!
how is a tool used in demo and/or intro-making not a demotool, zoom?
nice idea to include its own linker!
just tested it and it improved my size with only 6 bytes compared to 20to4.. but it seems like it's far more stable then 20to4 atleast ;)
so long all the problem with cab dropping
so long all the problem with cab dropping
and oh, i must ask, doesnt the link.exe trick work with VS 6.0 ?
i just want to say that this packer truly rocks! i love you guys!
a very elegant solution. neat VS integration, neat exe only output. and most importantly, great compression rate.
reflecting to the manual: avoiding dropping is elegant, but cabinet.dll is no cheating (just like opengl32.dll is no cheating either). it is even possible to use cabinet.dll and LZX without writing to the disk. this still has unexposed potential.
reflecting to the manual: avoiding dropping is elegant, but cabinet.dll is no cheating (just like opengl32.dll is no cheating either). it is even possible to use cabinet.dll and LZX without writing to the disk. this still has unexposed potential.
nice tool m8, gonna try it
my first feedback: crinkler-.exe was slightly bigger (5000 something) then using a .cab-hack (4800 something)..
good work, maybe i should stop working on 20to4 as obviously crinkler is (at least for me)
a much better solution right now :)
a much better solution right now :)
Blueberry: I will as soon as i think i have a version that's worth it.. Also this was just a quick try (getting it to work somehow), so i bet i will squeeze some few more bytes out of the crinkler-.exe somehow..
anyways: wonderful work!
anyways: wonderful work!
this packer rulez!
Looks promising... but XP only?
Really good.
saved my life. really good!
I like crinkler very much, but what happend to www.crinkler.net? I have 403 - "You don't have permission to access..." Btw. when will be next release?
wow. big ups for all you 4k gurus releasing stuff like this. it allows incompetent sluts like me to make 4ks that don't even totally suck!! thanks guys (muhmac too, ofc)
how do i get the compression stats in VC6? I turned on compiling debuginfo but it didnt seem to work.
Impressive, I already used it in two prods, and the compression rates are awesome. When's the next version out?
Wow... Knocked nearly 150 bytes off the release version of anorgatronikum! Guess I'll use this instead of my custom cabdropper thingie for my next prod.
Oh my litte p**** waves with joy! This was just awsome and the integration with Visual Studio was amazing!!!! It didn't like HeapAlloc but who cares?
actually best packer in the world... for windows xp.
"Using an external compressor somehow seems like cheating, and this whole dropping business is a mess"
That sentence alone deserves some serious thumb ups :)
That sentence alone deserves some serious thumb ups :)
Great! I've just tested with same params than 0.2 and i win 28 bytes, really great.
congrats.
congrats.
I lose about 20-30 bytes on all my prods
Actually, all the intros that I've tested (openGL) get quite bigger with crinkler 0.3, so i'll stick with 0.2, even with call transformation.
Neat compactor!
Blueberry for president of cruncher country :D
Does it work with VS 2005 now btw?
Does it work with VS 2005 now btw?
awesome. 'nuff sed.
packed files don't work in win98 or in wine emulation (even if set to winxp) :-( i hope wine poeple will be able to make it work...
This baby gets my thumb of approval
Really useful piece of code, when it comes to 4k prods. :)
Just today I measured a 4k with apack and with crinkler and crinkler saved an incredible 450 bytes (using GCC). Given you require an additional 450 for your unpacker its an amazing achievement. Great work Mentor and Blueberry. When I get a heart - you get it.
Why don't you Free the memory you use for decompressing? If freeing this Memory uses to much space you could make an option for guys who don't need this space.
Here's my thumb up!
Better late than never :)
Better late than never :)
It works with VS.net 2005, and you don't even need the link.exe trick.
Just add a crinkler command-line step in Project Properties / Build Events / Post-Build Event, something like this:
Crinkler.exe /CRINKLER /VERBOSE:IMPORTS /OUT:$(OutDir)\$(InputName)_crinkled.exe <libs> <objects>
Just add a crinkler command-line step in Project Properties / Build Events / Post-Build Event, something like this:
Crinkler.exe /CRINKLER /VERBOSE:IMPORTS /OUT:$(OutDir)\$(InputName)_crinkled.exe <libs> <objects>
PS: Of course in this case you have to include the obj and lib files manually.
I'll use it next week. Hopefuly.
Great tool!
Btw, does it work with Windows Vista?
Btw, does it work with Windows Vista?
Good!
Blueberry: a Vista-fixed version of Crinkler perhaps? (0.4b?)
Perfectly timed, ment! Cheers. :D
We use it and it's good!
THANKS.
THANKS.
i have to thumb it, anyhow, since the autors mailserver did not have the best of starts to the new year, i'll try it here :)
that is basically the errormessage:
: fatal error: LNK 0: could not find symbol '__imp___imp_??2@YAPAXI@Z'
intro : error PRJ0003 : Error spawning 'link.exe'.
any hints?
/abuctee
that is basically the errormessage:
: fatal error: LNK 0: could not find symbol '__imp___imp_??2@YAPAXI@Z'
intro : error PRJ0003 : Error spawning 'link.exe'.
any hints?
/abuctee
: fatal error: LNK 0: could not find symbol '___ImageBase'
Anyone that knows a solution to this?? Compiled in VS 2005 Express.
tried 'EXTERN_C IMAGE_DOS_HEADER __ImageBase;'
Thanks.
Anyone that knows a solution to this?? Compiled in VS 2005 Express.
tried 'EXTERN_C IMAGE_DOS_HEADER __ImageBase;'
Thanks.
DON'T use the C runtime library startup code. really. just don't.
ryg: do I feel like a real jerk right now?? You bet I am! :(
I declared/defined a virtual destructor in separate h/cpp file. Then i got a linker error on using both vs2003 and vs2005:
: fatal error: LNK 0: could not find symbol '??_EB@@UAEPAXI@Z'
If i remove the virtual keyword it works.
If i declare/define the same in the cpp file where main() is defined, the error also disappears.
Whats the problem?
: fatal error: LNK 0: could not find symbol '??_EB@@UAEPAXI@Z'
If i remove the virtual keyword it works.
If i declare/define the same in the cpp file where main() is defined, the error also disappears.
Whats the problem?
_THE_ packer for 4ks
kickass
mentor: this sounds good.
Why does a cm-based packer like crinkler need the lempel-ziv lib lz32.dll for decompressing?
Ueber!
Self-thumb away, this rules and you know it ;)
Mentor: Thanks for the answer, it makes sense now. I was just irritated about this library import. :)
amazing tool!
Great stuff. Looking forward to weak externals support.
Mentor, Blueberry, I have a small request that you probably will not like to implement, probably it doesn't fit in Crinkler's way of working but...
as you know floating point numbers compress bad, so people is using the trick of truncating the mantisa with 16 bit of zeros (collapse/necrostudios, farbraush, myself, and probably others). I'm not even sure if Crinkler has enought information to know if a specific constant in the .data segment is a float or not, but would it be possible that you automatically do the truncation for me at linking time? In other to avoid truncating every float (sometimes you don't want truncation for precision issues), only those constants starting like "ct16_" (Crinkler Truncate 16 bits) could be truncated...
I'm saying impossible things? Sorry for asking more from you... Second thumb up to compensate for it :)
as you know floating point numbers compress bad, so people is using the trick of truncating the mantisa with 16 bit of zeros (collapse/necrostudios, farbraush, myself, and probably others). I'm not even sure if Crinkler has enought information to know if a specific constant in the .data segment is a float or not, but would it be possible that you automatically do the truncation for me at linking time? In other to avoid truncating every float (sometimes you don't want truncation for precision issues), only those constants starting like "ct16_" (Crinkler Truncate 16 bits) could be truncated...
I'm saying impossible things? Sorry for asking more from you... Second thumb up to compensate for it :)
another option I would be happy with is to do it per .cpp./obj somehow (like the .obj starting with the indicated prefix) or by function (but this I understand means some logic to inspect the binary the code at link time.
Hi. I'm currently writing direct assembly by hand. Would it be possible to have tips/information on crinkler (and it's packing algorithm and segment reordering) so I could perhaps better align the code/data. I expect my data segment to be vastly bigger than the code segment, and the data segment could be split quite freely. Website or the Manual.txt would be a good place for this information.
Thanks again for this great tool. :)
Thanks again for this great tool. :)
Great tool!!!
When i compile my simple code with masm32, and link it with clinkler, when i try to run i got windows error like "*.exe has encountered an error...", what im compiling is simple program that just use ExitProcess function, it's my first attempt to create as small exe as possible and i simply can't get it to work so i need some help from more experienced user's.
it's indeed amazing stuff ... !!! Hammer !!!
dear team... as far as I see crinkler (version 1.0a) is compatible with XP64 and Vista 64 bit, but not Windows Server 2003 64 bit. Is this a known issue? (if so I can help debugging it). May be Server versions do carefully inspect the exe headers? (that's what you pay for when you have a server version?)
done
This tool rocks. For when the float truncation?
now :)
Although as 256B intro coder I have never used Crinkler, I enjoyed a lot of productions created with using it, and I must say rulez here.
thanks guys - really terrific.
unbelievable!!!
Will there ever be a gcc version?
Although I'm not a coder I must say "this rocks hard."
once more, thanks a lot for this little toy !! :)
yep, that html output helps a lot :)
@Blueberry: I've actually got it to work :D
Dev-C++ outputs the .o files (mirrors of VC++'s .obj files) automatically, so I just made all my code one file and copied VC++'s .lib files that I needed and it works just fine now.
I'm acessing the same dll's so there's no need to use gcc's .a files instead of the .lib files crinkler needs.
All in all I got it to work and it was much easier than I thought. Also, CAB dropping got 1.92kb and this got 1.5...so you are a beast, Crinkler!! :D
Dev-C++ outputs the .o files (mirrors of VC++'s .obj files) automatically, so I just made all my code one file and copied VC++'s .lib files that I needed and it works just fine now.
I'm acessing the same dll's so there's no need to use gcc's .a files instead of the .lib files crinkler needs.
All in all I got it to work and it was much easier than I thought. Also, CAB dropping got 1.92kb and this got 1.5...so you are a beast, Crinkler!! :D
thank you very much, guys. this is impressive :D
@Ferris: I'd be happy to know how you got it to work... I've got some problems with it still using GCC.
Any chance for a Solaris compatible version? Would be awesome to VNC to my uni and abuse their CPU farm.
YEAH...THIS FRIKKIN CRINKLER JUST ROXX.!
THANX A LOT.!!
THANX A LOT.!!
masterpiece)
Speaking of Wine: Latest versions of wine (at least 0.9.59, perhaps also older versions) are now crinkler compatible - correctly running crinkled files.
Great tool without any doubts! Always proving how lame I am at theory of information. I still get surprised by the increased packed size, while original size is decreased by 10-30 bytes of data or code (badly influencing surrounding context?). Also I sometimes get worse rates when I have more data_seg-s. More advices on dealing with this masterpiece would be highly appreciated 8)
Fantastic packer!
Thanks !
Great tool! Question though. I was working on building a very minimal exe using VS 2008. I went the route of putting the crinkler.exe file in my $SolutionDir and renaming it. But, when I run it I keep getting the following error:
fatal error: LNK 0: could not find symbol '__imp__LoadLibraryA@4'
I am not linking against any crt and my project builds fine in Release and debug mode. I am *not* including kernel32.lib in my linker dependencides, which solves the problem. Why is this needed and is there a way I can get around it?
Thanks.
fatal error: LNK 0: could not find symbol '__imp__LoadLibraryA@4'
I am not linking against any crt and my project builds fine in Release and debug mode. I am *not* including kernel32.lib in my linker dependencides, which solves the problem. Why is this needed and is there a way I can get around it?
Thanks.
Great tool!
2 caseyd: I suppose crinkler uses LoadLibrary to avoid import table, so you need to link with kernel32.lib. Good luck ;)
2 caseyd: I suppose crinkler uses LoadLibrary to avoid import table, so you need to link with kernel32.lib. Good luck ;)
Ized: Yeah, that makes sense. Thanks.
Never used this myself but looking how much the quality of Windows 4ks have increased past few years I can only give thumbs up!
I am using it now. Great stuff!
What visa sayed
Hi, thumb up and, of course, I have got newbie question too. I'm using CodeBlocks w/MinGW (thus it's not VC++, because I've problems with registering VC++ 2008 Express Edition). I took aulds OGL Framework from in4k.untergrund.net and placed it in main.c.
Compiling and linking looks like this (/range, /transform-calls and other option temporary disabled, since the code currently is small)
mingw32-gcc.exe -Wall -Os -c main.c -o Release\main.obj
crinkler.exe /subsystem:windows /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib" /out:Release\AuldOGLFramework.exe opengl32.lib gdi32.lib kernel32.lib user32.lib Release\main.obj /COMPMODE:SLOW /HASHSIZE:256 /HASHTRIES:256 /ORDERTRIES:1024 /UNSAFEIMPORT /PROGRESSGUI
This leds to 641 bytes, through aulds talks about results of around 482 bytes. Is there any switches to compiler and linker I'm missing?
and a second q, I've tried to rename main.c, to main.cpp and got the following error from crinkler:
fatal error: LNK 0: could not find symbol 'WinMainCRTStartup'
Looking into main.obj, I saw this
__Z17WinMainCRTStartupv@0
How to make it look like _WinMainCRTStartup@0?
Compiling and linking looks like this (/range, /transform-calls and other option temporary disabled, since the code currently is small)
mingw32-gcc.exe -Wall -Os -c main.c -o Release\main.obj
crinkler.exe /subsystem:windows /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib" /out:Release\AuldOGLFramework.exe opengl32.lib gdi32.lib kernel32.lib user32.lib Release\main.obj /COMPMODE:SLOW /HASHSIZE:256 /HASHTRIES:256 /ORDERTRIES:1024 /UNSAFEIMPORT /PROGRESSGUI
This leds to 641 bytes, through aulds talks about results of around 482 bytes. Is there any switches to compiler and linker I'm missing?
and a second q, I've tried to rename main.c, to main.cpp and got the following error from crinkler:
fatal error: LNK 0: could not find symbol 'WinMainCRTStartup'
Looking into main.obj, I saw this
__Z17WinMainCRTStartupv@0
How to make it look like _WinMainCRTStartup@0?
declare your function as 'extern "C" __stdcall void WinMainCRTStartup()'.
@SLeo: he got 482 bytes using dropper, apack and ordinal import turned on.
Using MSVC the best I got here was 614 bytes
Using MSVC the best I got here was 614 bytes
O_o--b
I've got the following error:
.\release\main.obj : fatal error: LNK 0: failed to load file 'F:\TRUE4K\_TRUE4K\MSVC\TRUEINTROSYSTEM\RELEASE\MAIN.OBJ'
the main.obj exist and its in that folder,
I'm using MSVCExpress2008 (v9?) is this the problem? or is the big path ?
.\release\main.obj : fatal error: LNK 0: failed to load file 'F:\TRUE4K\_TRUE4K\MSVC\TRUEINTROSYSTEM\RELEASE\MAIN.OBJ'
the main.obj exist and its in that folder,
I'm using MSVCExpress2008 (v9?) is this the problem? or is the big path ?
solved: "Crinkler does not support the whole program optimization feature of
Visual Studio (General/Whole Program Optimization). Do not turn it on.
"
Visual Studio (General/Whole Program Optimization). Do not turn it on.
"
brilliant stuff!!!
I'm trying get out of msvcr90.dll with this
/REPLACEDLL:[oldDLL=newDLL]
/REPLACEDLL:msvcr90=msvcrt
but I got the sadly error: fatal error: LNK 0: import '_crt_debugger_hook' could not be found in 'msvcrt'
I know thats because new 90.dll from m$ :S how can we use las VC and use the msvcrt.dll at same time? or at least desactivate the "hook" weird thing..?
/REPLACEDLL:[oldDLL=newDLL]
/REPLACEDLL:msvcr90=msvcrt
but I got the sadly error: fatal error: LNK 0: import '_crt_debugger_hook' could not be found in 'msvcrt'
I know thats because new 90.dll from m$ :S how can we use las VC and use the msvcrt.dll at same time? or at least desactivate the "hook" weird thing..?
Hey, this looks brilliant :P but im having a problem, I linked my intro using Crinlker, without problems in the compiling/linking step, but then when I run the final executable, I get this weird windows error:
Runtime error!
Program: myintro.exe
R6034
An application has made an attempt to load the C runtime library incorrectly.
I'm using VC++2005 in a WinXP SP3 box. Any clue? :)
Thanks for the tool, I'm sure this problem on my intro will eventually be fixed and it was the only way to get it under 4k :P
Runtime error!
Program: myintro.exe
R6034
An application has made an attempt to load the C runtime library incorrectly.
I'm using VC++2005 in a WinXP SP3 box. Any clue? :)
Thanks for the tool, I'm sure this problem on my intro will eventually be fixed and it was the only way to get it under 4k :P
Oh and thumbs up :S
CRiNKLOR!
acidbrain: are you sure that you have only options enabled that are supported by crinkler? E.g. I often forget to turn off the "whole program optimization"-feature in the visual studio options.
oh, and disable the standard runtime library.
4k++ since 2005
a pleasure to work with. I truly love the compression report, it makes it easier to adapt a more compression friendly dataset layout.
Huge hugs!
Huge hugs!
the best demo tool i came across so far. i use it all the time. makes life so much easier...
when i try to use crinkler on obj created by masm here is what i get :
warning: LNK: Entry point hunk has alignment greater than 1, forcing alignment
of 1
error: LNK: Cannot find symbol '__imp__MessageBoxA@16'
the strange thing is i dont have any MessageBox call inside my asm file
C:\masm32\bin\Link.exe /STACK:0x200000,0x200000 /LIBPATH:"C:\masm32\lib" /SUBSYSTEM:WINDOWS framework.obj => works
crinkler framework.obj /SUBSYSTEM:WINDOWS /ENTRY:EntryPoint /LIBPATH:"C:\masm32\lib" /CRINKLER => error message
warning: LNK: Entry point hunk has alignment greater than 1, forcing alignment
of 1
error: LNK: Cannot find symbol '__imp__MessageBoxA@16'
the strange thing is i dont have any MessageBox call inside my asm file
C:\masm32\bin\Link.exe /STACK:0x200000,0x200000 /LIBPATH:"C:\masm32\lib" /SUBSYSTEM:WINDOWS framework.obj => works
crinkler framework.obj /SUBSYSTEM:WINDOWS /ENTRY:EntryPoint /LIBPATH:"C:\masm32\lib" /CRINKLER => error message
Quote:
CRiNKLOR!
I was giving a try to the latest crinkler and I got the following error message:
error PRJ0002 : Error result 3 returned from 'link.exe'
I'm on an xp64 machine, at home with my xp32 it works all fine. Any idea?
error PRJ0002 : Error result 3 returned from 'link.exe'
I'm on an xp64 machine, at home with my xp32 it works all fine. Any idea?
i didn't know this beauty was here!
ups
Please, explain how to use this cool stuff with NASM. Give an example of a simple "MessageBox" application and a command line to build it. Thanks...
I've been using it all the time and have not yet given my thumb. Really Mentor&Blueberry, you rock! Keep up the great work.
IT ROOOOOOOOOOOOX!!!!
Never had to use (yet) but it's obviously good stuff, nice work.
yes excellent tool thank you!
Thankyouverymuch
thanx for bringing so much support and joy to the demoscene.
ca roule ;)
although im no coder nor ever participated in a 4k, i still believe that crinkler helped make 4k's as good as they are today ..
thumbs up rune and aske ..
thumbs up rune and aske ..
Thumbs up for this great tool!
Thank you for this software :)
I'm having trouble executing any 4k compressed by crinkler under Windows 7, I guess you should take a look at that. It might be a problem of the beta, but still, it could be that MS is changing the way they execute programs.
i can confirm that the current version doesn't work with windows 7... musician complained ;)... btw... at BP i said i weren't using gap contexts... i was wrong there... what i didn't use was context with gaps in them... there can be a gap between the context and the current position... and they are, of course, important for compression
:)
gets the job done. thanks
The Windows 7 problem is present on RC1 as well
@Blueberry
Some thoughts regarding Windows 7 and ntdll.dll issues with older software...
Is it possible to write a 'stub' dll which retrieves a correct address for each api? Such 'transparent' solution will help to run a lot of incompatible software on Vista/W7.
Please think about it.
Quote:
Problem signature:
Problem Event Name: BEX
Application Name: elevated_1280x1024.exe
Application Version: 0.0.0.0
Application Timestamp: 38a66ae8
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7127.0
Fault Module Timestamp: 4a03d5a1
Exception Offset: 0001e815
Exception Code: c0000409
Exception Data: 00000000
OS Version: 6.1.7127.2.0.0.256.1
Some thoughts regarding Windows 7 and ntdll.dll issues with older software...
Is it possible to write a 'stub' dll which retrieves a correct address for each api? Such 'transparent' solution will help to run a lot of incompatible software on Vista/W7.
Please think about it.
I love the thumbing for tools. I wonder what the rating for bass wouldve been if it was added 10 (?) years ago.
Is tools added to top10? If so, it would mean that all demomakers (ie not at all the majority of pouet users) would thumb up the proper tools and therefor removing themselves from top10.. if pouet where from/by demomakers that is.
The moral is that we never should have any censorship or let the demoscene outreach people govern this site. The majority of pouet.net is not demomakers they are just here because Iam. It's my fansite and you all have accounts to enlarge me.
Thank you very much.
yours,
stefan
Is tools added to top10? If so, it would mean that all demomakers (ie not at all the majority of pouet users) would thumb up the proper tools and therefor removing themselves from top10.. if pouet where from/by demomakers that is.
The moral is that we never should have any censorship or let the demoscene outreach people govern this site. The majority of pouet.net is not demomakers they are just here because Iam. It's my fansite and you all have accounts to enlarge me.
Thank you very much.
yours,
stefan
stfu
See http://www.harmonysecurity.com/blog/2009/06/retrieving-kernel32s-base-address.html - it's only 2 bytes larger.
Also, all programs are called from kernel32:BaseThreadInitThunk, so you can use 11 bytes to get the base:
EntryPoint: ; can be 1 or SectionAlign+1
pop edx ; 'Z'
push edx
FindMZ:
dec edx
cwd ; AX must be set <8000h before
cmp word[edx],'MZ'
jne FindMZ
Also, all programs are called from kernel32:BaseThreadInitThunk, so you can use 11 bytes to get the base:
EntryPoint: ; can be 1 or SectionAlign+1
pop edx ; 'Z'
push edx
FindMZ:
dec edx
cwd ; AX must be set <8000h before
cmp word[edx],'MZ'
jne FindMZ
I wrote a little loader in an attempt to be able to watch intros working under win7. It doesn't work with all, but at least it works with some.
http://www.pouet.net/prod.php?which=53400
http://www.pouet.net/prod.php?which=53400
and the forgotten thumb coming right up (from behind)
Cool.
That was new to me. You really should write an article about Crinkler's headers - I doubt anyone has tested the whims of various loaders as thoroughly as you. It would make writing custom compressors a lot easier.
So, I guess the days of the lz32.dll import are over now? :)
So, I guess the days of the lz32.dll import are over now? :)
I forgot the thumb in my previous comment, so here it is!
Looking forward to the next version with win7 fix :)
Looking forward to the next version with win7 fix :)
When linking mingw .o files against msvcrt (vc6 one), crinkler is unable to find __alloca. Which seems to be not very sane, as msvcrt should have one. Making all variables static solves this (and I believe this is the right way to make a 4k, however, i've seen quite contradictory compression results with statc/not static vars using gz-dropping on linux).
i think __alloca is just an alias for __chkstk (the guard page "make sure to hit every page at least once" mojo), but i'm not certain.
blueberry, not if it's part of the crt startup code that's always linked statically :) lemme check...
Code:
alloca_8: ; 8 byte aligned alloca
_alloca_probe_8 = alloca_8
push ecx
lea ecx, [esp] + 8 ; TOS before entering this function
sub ecx, eax ; New TOS
and ecx, (8 - 1) ; Distance from 8 bit align (align down)
add eax, ecx ; Increase allocation Size
sbb ecx, ecx ; ecx = 0xFFFFFFFF if size wrapped around
or eax, ecx ; cap allocation size on wraparound
pop ecx ; Restore ecx
jmp _chkstk
i think that's the equivalent in current versions of the CRT. so, yeah, __chsktk wrapper taking 8-byte alignment into account.
my exe is still running in the background after i end by esc when using crinkler, i have to end the process in the task manager. common problem?
i always call ExitProcess(0);
For some reason, whatever I try, I can't get crinkler to work on any other COMPMODE than INSTANT. Everything else crashes crinkler when compression should begin. I'm running Windows XP x64 SP2 and using VC++ 2008 Express.
Even with INSTANT I get amazing results, but it'd be awesome to see what the difference would be with say SLOW for instance.
Even with INSTANT I get amazing results, but it'd be awesome to see what the difference would be with say SLOW for instance.
just tested with 1.1 (had been using 1.1a before) and it works fine.
just for the record, I had exactly the same problem as shinmai, Windows XP x64 SP2, VC++ 2008 Professional.
I have no clue since I couldn't have gone beyond seeing the title bar of the Crinkler project on Mentor's laptop while fixing Muon Baryon, but it sounds like a 64-bit issue. I might be wrong though.
The tool itself rules, but, any hint about a win7 fix?
( and no, activating windows xp sp3 compatibility in the exe settings won't make it :) )
thx in advance..
( and no, activating windows xp sp3 compatibility in the exe settings won't make it :) )
thx in advance..
I second the Windows 7 (x64) fix. Blueberry: if you need a tester, just mail me.
I'll be willing to test too! I'll be able to run a lot of crippled demos. :D
Specs if yer interested:
Dell Inspiron 1520 running Windows 7 RC1 64 bit Build 7100
Latest official nVidia mobile drivers (186.81 WHQL) and DirectX Drivers
320GB 7,200RPM HDD
4GB RAM
T7250 Core2Duo 2x2.0Ghz
Geforce 8600M GT 256MB
"Code us happy!"
Specs if yer interested:
Dell Inspiron 1520 running Windows 7 RC1 64 bit Build 7100
Latest official nVidia mobile drivers (186.81 WHQL) and DirectX Drivers
320GB 7,200RPM HDD
4GB RAM
T7250 Core2Duo 2x2.0Ghz
Geforce 8600M GT 256MB
"Code us happy!"
Jeg elsker dig som jeg sagde! :D
This is somehow odd. You two really deserve it!
I would like to thumb it up again, just for the effort you guys put in this. Eternal love.
At last!
Thank you very much, guys! I just recompressed the Elevated and it run under Windows 7 like a charm now!
Thank you very much, guys! I just recompressed the Elevated and it run under Windows 7 like a charm now!
mentor: you is a superhelt
also: blueberry.
also: blueberry.
The danes - pants-dropping and compression. Delivered.
yay! :)
You are awesome guys! Keep the good work!
Sensational!
Thanks :)
We got a message while using crinkler v1.2 in VS2005; compilation fails with the following message :
"|-- Estimating models for code ----------------------------|
Project : error PRJ0002 : Error result 3 returned from 'E:\tits-910d\link.exe'."
Getting back on v1.1 resolved the issue.
Still, wonderful tool
"|-- Estimating models for code ----------------------------|
Project : error PRJ0002 : Error result 3 returned from 'E:\tits-910d\link.exe'."
Getting back on v1.1 resolved the issue.
Still, wonderful tool
nice! (thumb up)
great job, too bad i can't thumb it twice :D
Windows 7 support \o/
v1.2 and 1.1a crash for me with any program being compiled! 1.1 works fine. I tested it with VC++ 2008 and Vista 32 and 64 bit. Any guess?
Anybody tried /RECOMPRESS+/REPORT combo? Is this a feature or a byproduct? ;)
(also I really miss double-thumbing option)
(also I really miss double-thumbing option)
I get the same crash on XP (HE 2002) SP3, if the info helps at all. VC++ 2005 (yeah I know). Trying to compile an opengl prog with glsl, win32. Works with older crinklers.
Hi Mentor. I have some improvements regarding the decompression header. Could we continue on email?
This sounds so scary that I wonder how the heck you can gain bytes from an already optimized-to-death code.
I've tried producing some extremely low entropy code (99% of it are mov/push/call, all using just eax register), and I have just one question from my side: is there any way of removing import-by-hash code in favor of native system imports (there is not much functions in D3D code anyway) or moving import code to the end of the code section (which would mean one extra jmp, but entropy gains may be worth it)? Maybe I'm totally wrong about it, but I think import code sitting in front of intro code may sometimes setup prediction tables for different coding style, than rest of the intro uses.
Decipher: Certainly rrrola has different definition of optimized-to-death (maybe we should call it optimizing-to-afterlife). ;)
Decipher: Certainly rrrola has different definition of optimized-to-death (maybe we should call it optimizing-to-afterlife). ;)
Do you answer mails lately or shall i paste it here ?
Yep.
It seem pretty certain that it's the intel compiler (at least the currently used version) producing crashing code for amd systems.
As i explained in the email it crashes because of an array which isn't initialized properly (null pointer) why would a compiler produce such code ?
I'm on an AMD system as well and I get the "Error result 3 returned..." or a crash as well. Both with VS 2008 RTM and SP1, Windows 7.
My laptop is XP and Intel-based, and on that system everything comes up roses.
Hope this helps you guys fix a great tool, and thanks in advance!
My laptop is XP and Intel-based, and on that system everything comes up roses.
Hope this helps you guys fix a great tool, and thanks in advance!
Is possible to decompress everything from EXE file?
After i recompiled my 4k with VS2010 and crinkler i notice the exe is much bigger. I check it again with VS2008 and the exe was smaler. Without using crinkler in both VS Studios the exe file was same size. I quick my both report files but i dont have to much time now to find out.
can someone confirm this ????
can someone confirm this ????
Ciclope: the uncompressed file sizes are probably the same because they are aligned to 512 bytes size.
Just make sure no extra bullshit such as the path the the PDB is embedded within the executable. You have to know your compiler as if it's your partner's body. :)
@ Decipher
I have in both VS the same compiler and linker settings. And of course is the same Code. Now i will look the ASM report file from crinkler to find out.
Gargaj: Yes i know what you mean, but i mean the real exe size not the aligned size saved on HD.
I have in both VS the same compiler and linker settings. And of course is the same Code. Now i will look the ASM report file from crinkler to find out.
Gargaj: Yes i know what you mean, but i mean the real exe size not the aligned size saved on HD.
I'm crinkled!
helped me no end in making my first 1k :)
Awesome tool!
I'm using Crinkler for some months. Currently, I'm writing a synth that will probably produce an OBJ and I want to know if Crinkler removes dead code where present or if, on the other side, I should remove it manually before producing the OBJ.
"1>Project : error PRJ0002 : Error result 3 returned from [...]" too .. :(
Win Xp + VC 2008 SP1 & 2010
Win Xp + VC 2008 SP1 & 2010
ciclope, the compiler/linker is also aligning the .exe
merry, shouldn't your linker take care of REAL dead code? (however, neither crinkler, the compiler nor the linker will do runtime analysis to remove your pseudo dead code).
merry, shouldn't your linker take care of REAL dead code? (however, neither crinkler, the compiler nor the linker will do runtime analysis to remove your pseudo dead code).
XT95, same setup, same problem here,
did you find a solution ?
did you find a solution ?
p4p4 -> I saw many people who have this problem, and actually no solution :(
We found a usable workaround for AMD systems, until the problem is fixed:
Use the old crinkler 1.1 (which can compress but generates exes that crashes on windows 7) as linker, and then make a post build event that uses crinkler 1.2 /recompress to get the final exe without doing any further compression. That's only 1-2 seconds additional build time for your crinkler builds.
Use the old crinkler 1.1 (which can compress but generates exes that crashes on windows 7) as linker, and then make a post build event that uses crinkler 1.2 /recompress to get the final exe without doing any further compression. That's only 1-2 seconds additional build time for your crinkler builds.
hi, im trying to compress my exe and gets error.
in crinkler 1.1: fatal error: LNK 0: failed to load file 'file.exe';
in 1.2: error: LNK: Unsupported file type.
i have an exe-file. i changed entry point to: mainCRTStartup. using Visual C++ Express 2008 with release build. no manifest. x86. subsystem: windows.
ive tried different command line options without luck.
im running Vista 32bit on laptop w. intel dual cpu. any ideas?
in crinkler 1.1: fatal error: LNK 0: failed to load file 'file.exe';
in 1.2: error: LNK: Unsupported file type.
i have an exe-file. i changed entry point to: mainCRTStartup. using Visual C++ Express 2008 with release build. no manifest. x86. subsystem: windows.
ive tried different command line options without luck.
im running Vista 32bit on laptop w. intel dual cpu. any ideas?
rudi: crinkler replace your linker, it's not something you run on an exe-file...
i thought it was an exe-packer all along. :P got it to work. thanks.
oh thank god for the AMD fix - thanks guys.
Also thanks for fixing the issue with absolute paths!
kringler!
I'd thumb it up again if I could... Thanks Blueberry!
I'll thumb it up for you, RareWtFailWhale. Here you go.
crinkler - making awesome 4ks possible!
.
Thank you very much for the crash bug fix. I have used crinkler for many years now and under a virtual machine because of the crash bug. But now I don't need a virtual machine anymore to run crinkler. Thank you guys!
You are the best!
Hi everyone,
I'm trying to use crlinker tonight for the first time with visual studio 2010 express (simply hello world). I placed crlinker to my project folder and renamed to link.exe. I have strictly followed the installation part in manual.txt. But ... the linking step failed with the error code -1073740777. Is this kind of error was arrived to one of you? Of course my project compile fine if I remove /CRLINKER option.
I'm trying to use crlinker tonight for the first time with visual studio 2010 express (simply hello world). I placed crlinker to my project folder and renamed to link.exe. I have strictly followed the installation part in manual.txt. But ... the linking step failed with the error code -1073740777. Is this kind of error was arrived to one of you? Of course my project compile fine if I remove /CRLINKER option.
"/CRLINKER" ? should be "/CRINKLER" for starters.
Another thing to be sure of is, make sure it's in your solution directory, not the project directory (though they might be the same). Look for the .sln file.
Another thing to be sure of is, make sure it's in your solution directory, not the project directory (though they might be the same). Look for the .sln file.
Oh, hands down the best cruncher around and I haven't even thumbed it up!
Hi Ferris, thanks to answer so quickly.
Sorry for my typing mistake in my previous post. I use /CRINKLER in additionnal link option.
Well, link.exe is in the same folder of my .sln file. I have launched a build without /CRINKLER option only for checking my project with the visual studio linker and it works. With /CRINKLER I got the error.
Sorry for my typing mistake in my previous post. I use /CRINKLER in additionnal link option.
Well, link.exe is in the same folder of my .sln file. I have launched a build without /CRINKLER option only for checking my project with the visual studio linker and it works. With /CRINKLER I got the error.
I can not believe I never placed a comment here. Thank you so much for sharing this truly wonderful tool.
Blueberry: I use the 1.3 on an Intel I5
Thanks for your help
Thanks for your help
I'm having some problems every time I use any componented of the standard template library or some other simple functions (std::string, std::ofstream, exit(0)).
I get this error whenever I use any of the std componentes: LNK: Cannot find symbol '___security_cookie'
If I use exit(0) I get this error: LNK: Cannot find symbol '__imp__exit'
Which libraries am I missing?
I'm using Visual Studio 2010 & Windows 7 64bit (I compile as 32 bit). Is VS2010 and Win7 supported?
I get this error whenever I use any of the std componentes: LNK: Cannot find symbol '___security_cookie'
If I use exit(0) I get this error: LNK: Cannot find symbol '__imp__exit'
Which libraries am I missing?
I'm using Visual Studio 2010 & Windows 7 64bit (I compile as 32 bit). Is VS2010 and Win7 supported?
I managed to fix the problems by linking the following libs:"comsupp.lib" "delayimp.lib" "libcmt.lib" "libcpmt.lib" "libcpmt1.lib" "msvcmrt.lib" "msvcprt.lib" "msvcrt.lib"
"msvcurt.lib" "oldnames.lib" "vcomp.lib" "ptrustu.lib" "RunTmChk.lib" "pgort.lib" "pgobootrun.lib"
:D
"msvcurt.lib" "oldnames.lib" "vcomp.lib" "ptrustu.lib" "RunTmChk.lib" "pgort.lib" "pgobootrun.lib"
:D
Replacing exit(0) with ExitProcess(0) did the trick.
Question: I want to use DirectX 11 for graphics, but I always get the ___security_cookie error whenever I try to use any DX11 code. Is it possible for me to use it or would I have to use some older DX9 version for graphics?
Question: I want to use DirectX 11 for graphics, but I always get the ___security_cookie error whenever I try to use any DX11 code. Is it possible for me to use it or would I have to use some older DX9 version for graphics?
Oops, haven't thumbed this yet :)
I just got the following message from crinkler 1.3:
I'm not having large arrays or structs inside my function, but it's recursive, which ends up being the same: MSVC thinks you're using (its definition of) lots of stack and ends up generating __chkstk calls.
You can work around this by supplying the /Gs option with a sufficiently large value, such as /Gs999999 (http://support.microsoft.com/kb/100775/en-us).
Perhaps you might want to mention that in crinkler's hint message too.
Quote:
error: LNK: Cannot find symbol '__chkstk'.
* HINT: Avoid declaring large arrays or structs inside functions. Use global variables instead.
I'm not having large arrays or structs inside my function, but it's recursive, which ends up being the same: MSVC thinks you're using (its definition of) lots of stack and ends up generating __chkstk calls.
You can work around this by supplying the /Gs option with a sufficiently large value, such as /Gs999999 (http://support.microsoft.com/kb/100775/en-us).
Perhaps you might want to mention that in crinkler's hint message too.
Oh, actually I AM using lots of local storage, nothing to do with being recursive. Still, /Gs is able to fix it for me.
Late but very deserved thumb :)
I've used it and it rules -> thumb. I only wish that the source code was available..
I just used it to compress the first working release build for windows of an old 4k intro, which I'm using to port my engine from linux.
Crinkler saved *326* bytes so far, and I'm sure that it will be able to save much more with some tweaking!
Crinkler saved *326* bytes so far, and I'm sure that it will be able to save much more with some tweaking!
Is there a way to replace the IBH code and do "some other things"? :)
What Tjoppen said.
What Tjoppen said.
after hand-crafting some linux elf32 executables and gz-dropping them afterwards, i would pretty much like to get this baby ported to linux. how deep is it win32/PE-specific? is it at all possible to get just the bare packing algorithm? i could do the linking stage for elf32 myself
Mandatory thumb. Very impressive material here.
Excellent Cruncher
Is there any update planned? Any idea of when forwarded RVAs will be supported?
Anyway, THE cruncher. The only. Completely amazing piece of work.
Anyway, THE cruncher. The only. Completely amazing piece of work.
Messrs C. Rinkler and Sons, bespoke byte removal services
I had a quick look at this today, and I see some things in the import code:
64678B4730 mov eax,fs:[bx+30]
could be
6467A13000 mov eax,fs:[30]
(maybe a zero in the instruction helps somehow)
mov ebx,<image base>
could be
mov ebx,[eax+08]
if placed after the fs: line, for a 2 bytes saving.
also, the check for DLL loading:
test ebp,ebp
jne OUT
push 00000000
push 00000000
push edx
push 00000000
could be
test ebp,ebp
jne OUT
push ebp
push ebp
push edx
push ebp
since ebp is known to be zero at that point, for a 3 bytes saving.
the code in the header could be shortened by at least 3 bytes, but I didn't see any advantage because it seems that nothing can move into the gap.
64678B4730 mov eax,fs:[bx+30]
could be
6467A13000 mov eax,fs:[30]
(maybe a zero in the instruction helps somehow)
mov ebx,<image base>
could be
mov ebx,[eax+08]
if placed after the fs: line, for a 2 bytes saving.
also, the check for DLL loading:
test ebp,ebp
jne OUT
push 00000000
push 00000000
push edx
push 00000000
could be
test ebp,ebp
jne OUT
push ebp
push ebp
push edx
push ebp
since ebp is known to be zero at that point, for a 3 bytes saving.
the code in the header could be shortened by at least 3 bytes, but I didn't see any advantage because it seems that nothing can move into the gap.
even better: ebx=fs:[30] on process start (it's even documented somewhere), so push ebx in the header, pop eax in the second stage, no need for the fs: line at all.
mov eax,[edx+1C]
add eax,ebp
mov eax,[eax+4*ecx]
mov [esp+1C],eax
if ebp and edx were exchanged, you could use
add edx,[ebp+1C]
mov eax,[edx+4*ecx]
mov [esp+1C],eax
for a 2 bytes saving
extending that:
mov eax,[edx+4*ecx]
mov [esp+1C],eax
popad
could be
pop eax
push [edx+4*ecx]
popad
for a 3 bytes saving.
of course, the actual savings after compressing these might be 0 or worse. :-/
add eax,ebp
mov eax,[eax+4*ecx]
mov [esp+1C],eax
if ebp and edx were exchanged, you could use
add edx,[ebp+1C]
mov eax,[edx+4*ecx]
mov [esp+1C],eax
for a 2 bytes saving
extending that:
mov eax,[edx+4*ecx]
mov [esp+1C],eax
popad
could be
pop eax
push [edx+4*ecx]
popad
for a 3 bytes saving.
of course, the actual savings after compressing these might be 0 or worse. :-/
the original PEB_LDR_DATA code could be used, if you resolved LoadLibraryExA instead of LoadLibraryA. the ExA version exists in kernelbase.dll and kernel32.dll, and it takes two additional parameters which would both be zero.
for the import table on Win2k, the requirement was to import from either kernel32.dll, or something that imports from kernel32.dll, so that kernel32.dll is loaded somehow. lz32.dll could have been wmi.dll for a 1 byte saving.
for the import table on Win2k, the requirement was to import from either kernel32.dll, or something that imports from kernel32.dll, so that kernel32.dll is loaded somehow. lz32.dll could have been wmi.dll for a 1 byte saving.
Quote:
It seems you are right about ebx=[fs:30] on startup. A quick test suggests that we can
save about 3 bytes. It does complicate the call transform code, but I think it will still be a net win in that case.
Can we rely on this across all windows versions?
It would be much appreciated if you can find the documentation you are mentioning :)
Yes, you can rely on that across all Windows versions. I will look for the documentation.
Quote:
...
You do realize that these pushes are in your code, right?
That was taken from the one file that I examined. It never occurred to me to check which parts Crinkler added. :-)
Quote:
Quote:the code in the header could be shortened by at least 3 bytes, but I didn't see any advantage because it seems that nothing can move into the gap.
Yes, gaining a lone byte somewhere in the header doesn't really help.
I'm guessing part of the saving you are mentioning is in the code around the stack reserve field.
You also need to be aware that the code inside the header is not as naive as it might seem, as it is under some additional constraints.
I understand that. I have some experience in crushing PE headers (see pferrie.host22.com). ;-)
Speaking of which, you don't need any section table at all. It is legal to set NumberOfSections to 0 since you import nothing (import table must be in a section since WinXP), and you still allocate all the memory that you want. DEP is not a problem if section alignment < 4096. I'm sure that complicates things for you, but just in case you didn't know.
Quote:
mov ebx, dword 3
is actually just a shorter way of jumping across the subsystem field (dword 2/3), while at the same time initializing ebx to something >1.
Yes, but as noted above, it's already non-zero.
Quote:
Quote:
for the import table on Win2k, the requirement was to import from either kernel32.dll, or something that imports from kernel32.dll, so that kernel32.dll is loaded somehow. lz32.dll could have been wmi.dll for a 1 byte saving.
This is from the old header. We no longer support win2k. Also, you wouldn't really save 1 byte as it was in a 8 byte slot in the header.
If you moved lfanew to 0x10, for example, then it would fit at offset 2, with room for an instruction or two.
Quote:
Quote:the original PEB_LDR_DATA code could be used, if you resolved LoadLibraryExA instead of LoadLibraryA. the ExA version exists in kernelbase.dll and kernel32.dll, and it takes two additional parameters which would both be zero.
This sounds very interesting. I'm not really sure I follow. How do you get to kernelbase.dll and can you do this reliably on all windows versions?
Using kernelbase would result in an overhead when the intro imports from kernel32, but I guess we could redirect the imports to kernelbase in the
instances where we can. Either way, I'm curious about this :)
When run on Win7, the old PEB code would fetch kernelbase.dll instead of kernel32.dll, and then call the wrong API because the hash loop exited.
So, if you resolved LoadLibraryExA instead of LoadLibraryA, then you'd get a valid address no matter which platform was used.
I haven't seen any demos using kernel32.dll, but I suppose that if one did, then you'd still have a regular import entry for it, so the behaviour would not change visibly. I will test that.
Quote:
You do realize that these pushes are in your code, right?
I just checked again. It is Crinker code. It's the exit code when a DLL can't be loaded.
The "OUT" label that I referenced was the truncated process name (OUT:some address).
the LoadLibrary pushes might be achieved in the header for no cost at all...
okay, so forget the LoadLibrary thing. :-)
the dec al/inc al part - these seem less likely to appear than dec eax/inc eax.
would it be better to xor eax,eax before the lodsb, and then dec eax and inc eax instead?
the xor/lodsb sequence appears earlier, so maybe that helps compression.
and in that case, perhaps instead of dec/jns, you could use test/jne, and instead of the inc/je, you could use cmp eax,ebp. it's bigger, but might compress better.
you've reached the end of the list when ebp is zero.
as far as initial registers, only ebx is defined. edx=eip only if syscall mode is used (which can be disabled in some ways), other register values have changed over time.
the dec al/inc al part - these seem less likely to appear than dec eax/inc eax.
would it be better to xor eax,eax before the lodsb, and then dec eax and inc eax instead?
the xor/lodsb sequence appears earlier, so maybe that helps compression.
and in that case, perhaps instead of dec/jns, you could use test/jne, and instead of the inc/je, you could use cmp eax,ebp. it's bigger, but might compress better.
you've reached the end of the list when ebp is zero.
as far as initial registers, only ebx is defined. edx=eip only if syscall mode is used (which can be disabled in some ways), other register values have changed over time.
mentor, if you accept mail from Gmail, I have sent you a new PE header code.
still incredibly useful
Any current developments? :)
I would love to have some extra bytes.
I would love to have some extra bytes.
Obviously a thumb up.
It would be great if packing code were released separately, as a lib, together with a possibly unoptimal example unpacker.
Not sure why I haven't thumbed this yet. Big thumb up! :)
Hi, i'm trying to learn dx11 & crinkler
a function call to
D3DX11CompileFromFile(L"shaders.hlsl", 0, 0, "VShader", "vs_5_0", 0, 0, 0, &VS, 0, 0);
reports a linking error LNK: Cannot find symbol '_D3DX11CompileFromFileW@44'
am i missing a .lib or something?
a function call to
D3DX11CompileFromFile(L"shaders.hlsl", 0, 0, "VShader", "vs_5_0", 0, 0, 0, &VS, 0, 0);
reports a linking error LNK: Cannot find symbol '_D3DX11CompileFromFileW@44'
am i missing a .lib or something?
4k intros usually don't load files from disk..
bstrr: i'll try to embed the shader to .exe once i get this tutorial working :)
Anyone else having problems running crinkler intros on win7 x64 nowadays? Apparently something weird is going on, all of them crash instantly for me, even the supposedly win7 fixed Elevated. I don't know whether it's only my machine, or it's due to a recent windows update or something else. Common crash details are below, if this helps anything:
One thing is sure, I had the same OS installation a year ago and they were still working back then.
Code:
Problem Event Name: APPCRASH
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7601.17725
Exception Code: c0000005
Exception Offset: 000300e2
OS Version: 6.1.7601.2.1.0.256.1
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
One thing is sure, I had the same OS installation a year ago and they were still working back then.
my code starts at "int WINAPI WinMain(.." if i change it & linker->advanced->entry point, the program won
't run correctly and a zombie program remains in the system. i'm trying to get rid of msvcrt.lib. whenever i remove it from linker dependencies the crinkler won't find the entry point, and if i try to change it the way i do, i get this zombie. help please.
't run correctly and a zombie program remains in the system. i'm trying to get rid of msvcrt.lib. whenever i remove it from linker dependencies the crinkler won't find the entry point, and if i try to change it the way i do, i get this zombie. help please.
I too have many crash with win7 fixed intros (crinkler 1.2 and 1.3). Only one seem to work well after recompress : Lunaquatic.
The issue seems to be an incompatibility with the Geforce R304 driver (from 304.48 to 306.97). The 301.42 is the last one who can properly run crinkler compressed intros.
Any fix planned?
The issue seems to be an incompatibility with the Geforce R304 driver (from 304.48 to 306.97). The 301.42 is the last one who can properly run crinkler compressed intros.
Any fix planned?
Yes, I am using the 306.23 driver myself. Maybe it's related to Windows 8 compatibility changes?
Crinkler hangs with following code: (full source)
http://www.sistavip.com/pub/CrinklerPackage.zip
Pls Hlp! (We all love Crinkler) -> Kirill
http://www.sistavip.com/pub/CrinklerPackage.zip
Pls Hlp! (We all love Crinkler) -> Kirill
nvinit.dll has a known bug in it that causes crashes like this. See my comment on the page that las linked. If that's the same crash that people are seeing (and if the solution is the same), then it's not Crinkler's fault.
I went back to nvidia driver 301.42, it worked of course. But then I installed 306.97 again, and now it works. Even after reboot ... now somebody explain THIS! :-)
By the way, thanks for all the info, guys!
By the way, thanks for all the info, guys!
Question about the Crinkler license...
It says "You may use Crinkler for any non-commercial purpose". May Crinkler be used for commercial purposes as well? If so, any restrictions besides "must not be used for any safety critical purpose"?
Specifically, I have a tiny two-option config utility. I've got to fit it into 4KB somehow.
Thanks
James
It says "You may use Crinkler for any non-commercial purpose". May Crinkler be used for commercial purposes as well? If so, any restrictions besides "must not be used for any safety critical purpose"?
Specifically, I have a tiny two-option config utility. I've got to fit it into 4KB somehow.
Thanks
James
question about crinkler, can I use crinkler to compile Chevrolet : http://www.pouet.net/prod.php?which=60469
???
That is a pity. Is there no commercially licensable version, then, if not the standard one?
Nice update!
Thanks for your hard work on this. :)
.
Fantastic guys can finally get the 4k's working on my Windows 8 lappy!
Excellent, fantastic tool. Many thanks for the update!
yay, this update is awesome news!! thanks! and even more awesome is that it means you are working in a new 4k too?
Thumb up! Also for à new IQ&Mentor&Puryx 4kb ;))
@mentor: ohhhh :(
Hey! I had the idea of trying to gain a few bytes by putting every function in its own text section, and to let crinkler rearrange my code for optimal order for compression.
When I tried this out, I got a size increase overall due to 4-byte section alignment, and NOPs being inserted as padding.
I tried just putting one function in a separate section and let crinkler re-arrange it and gained 5 bytes, and then 2 additional bytes when I re-arranged the code manually (and let everything still be in one text section), so there may be potential.
So, the idea is to remove padding NOPs (0x90) from text sections. I have no idea if this would be easy to implement for you though (the HTML report showing disassembled code is promising, at least).
I guess you could theoretically do the same with data sections, but there may not be any way to detect this. Or well, I haven't checked, perhaps data sections are padded with 0x00?
When I tried this out, I got a size increase overall due to 4-byte section alignment, and NOPs being inserted as padding.
I tried just putting one function in a separate section and let crinkler re-arrange it and gained 5 bytes, and then 2 additional bytes when I re-arranged the code manually (and let everything still be in one text section), so there may be potential.
So, the idea is to remove padding NOPs (0x90) from text sections. I have no idea if this would be easy to implement for you though (the HTML report showing disassembled code is promising, at least).
I guess you could theoretically do the same with data sections, but there may not be any way to detect this. Or well, I haven't checked, perhaps data sections are padded with 0x00?
Last but not least, thanks for an absolutely amazing tool! I'll have to buy you two beer, dinner or whatever sometime.
An alternative idea, which wouldn't require the programmer to manually put stuff into separate sections, is to split code sections after jmp and ret instructions prior to reordering in crinkler. This would require an extensive rewrite of all addresses in the code though.
And hmm, I just realized that this may require relative addresses to be modified to be absolute.... this is becoming complex :)
And hmm, I just realized that this may require relative addresses to be modified to be absolute.... this is becoming complex :)
Alright, if I get some time for it I'll try more manual rearrangement and see how much more I can gain in my case.
But yeah, I agree that it may not be worth the effort.
But yeah, I agree that it may not be worth the effort.
Hey Mentor and/or Blueberry,
I'm trying to make a 4K in VS2012 Express with the XP-compatible linker flag (platform toolset = Visual Studio 2012 - Windows XP (v110_xp), instead of the default Visual Studio 2012 (v110) ), and crinkler 1.4 does not like that:
1>LINK : error : cannot parse token '/SUBSYSTEM:WINDOWS,5.01': unknown argument WINDOWS,5.01
Would it be possible to fix this, preferably before Revision?
I'm trying to make a 4K in VS2012 Express with the XP-compatible linker flag (platform toolset = Visual Studio 2012 - Windows XP (v110_xp), instead of the default Visual Studio 2012 (v110) ), and crinkler 1.4 does not like that:
1>LINK : error : cannot parse token '/SUBSYSTEM:WINDOWS,5.01': unknown argument WINDOWS,5.01
Would it be possible to fix this, preferably before Revision?
How to use crinkler in Dev-C++ with TDM-GCC x64 ? Pleaaaase
My building try has failed like this.
uncompressed size of code: 208209
uncompressed size of data: 15431
|-- Estimating models for code -----------------------------------------|
This is the end of testing. I can't see no more line.
I want to know the reason of normal exit.
Could you please show me the way?
uncompressed size of code: 208209
uncompressed size of data: 15431
|-- Estimating models for code -----------------------------------------|
This is the end of testing. I can't see no more line.
I want to know the reason of normal exit.
Could you please show me the way?
Hmm, i just migrated an intro from v1.2 to v1.4.
v1.3 brought "Header size reduced by 21 bytes."
v1.4 brought "New zero-section header layout saving around 30-50 bytes."
So i should get an about 50-70bytes smaller .exe in the end, right?
Too bad, i got an .exe 25 bytes bigger. Exceeding the 4096b this way.
Any Idea why this could happen? Will have a look into the manual again now, if i find a clue or a fix i´ll report back here asap.
v1.3 brought "Header size reduced by 21 bytes."
v1.4 brought "New zero-section header layout saving around 30-50 bytes."
So i should get an about 50-70bytes smaller .exe in the end, right?
Too bad, i got an .exe 25 bytes bigger. Exceeding the 4096b this way.
Any Idea why this could happen? Will have a look into the manual again now, if i find a clue or a fix i´ll report back here asap.
Some intros (Sincere and Atrium) crash with Windows 8.1 and Intel HD Graphics (IronLake) 8.15.10.2900. Of course, these intros are recompressed with crinkler 1.4. All the other 4k intros that I have are working properly.
On the same machine with Windows 8, Sincere worked properly. Unfortunately, there is only one version of this driver for Windows 8.1, so I cannot do other tests on this point.
On the same machine with Windows 8, Sincere worked properly. Unfortunately, there is only one version of this driver for Windows 8.1, so I cannot do other tests on this point.
Blueberry:
Thanks, that did the trick! Have been completely unaware of this switch so far! Damn me!
Thanks, that did the trick! Have been completely unaware of this switch so far! Damn me!
This is one of the greatest gifts to sizecoders and the scene. Thank you.
Any way to save decompressed file, please?
Magic.
Any chance to do the following with crinkler?
and
See here and here.
Would be really nice to have (opt in) since crinkler seems to be the 8k standard compressor and you have the size for stupid things like that in 8k.
Code:
extern "C" {
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}
and
Code:
extern "C"
{
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
See here and here.
Would be really nice to have (opt in) since crinkler seems to be the 8k standard compressor and you have the size for stupid things like that in 8k.
Le thumb. Thank you for this excellent tool.
[x] Definitely interested - but no time to try it manually.
Adding it afterwards would be the best option IMHO, maybe a little tool could just do that to crinkled binaries (with options like +AMD +NV so you don't need to add the AMD string, just in case you already know that you screwed up compatibility with AMD cards).
Would allow you to first do some really expensive compression stuff and decide then, as you proposed.
Adding it afterwards would be the best option IMHO, maybe a little tool could just do that to crinkled binaries (with options like +AMD +NV so you don't need to add the AMD string, just in case you already know that you screwed up compatibility with AMD cards).
Would allow you to first do some really expensive compression stuff and decide then, as you proposed.
And btw. do you intend to add some more compression options for 8k?
Maybe it's possible to have a slightly larger decompressor stub in favor of (even) better compression? That would be something!
Maybe it's possible to have a slightly larger decompressor stub in favor of (even) better compression? That would be something!
Currently crinkling like a god. Just have to leave a "fucking amazing" here...
Z80 version needed :)
Well holy hell, great job! Get it out before Assembly and I'll be a happy scener!
Happy birthday Crinkler!
Quote:
- Define a fallback DLL in case a DLL fails to load. For instance, use d3dcompiler_47 if available, otherwise use d3dcompiler_43.
Awesome!
So, getting close to the same ballpark as Laturi on the Mac? ;) Happy birthday.
Bump. Not too many days left before compo deadline, I wouldn't mind having the 1k version...
AWESOME.
Would really love to test the Optimus stuff (I know the optimus driver does the right thing on my notebook and I can trivially check whether it works or not).
Would really love to test the Optimus stuff (I know the optimus driver does the right thing on my notebook and I can trivially check whether it works or not).
what about MASM ? Does Crinkler accept .objs ?
I am actually sitting here somewhat in shock. I recompressed my 1k intro Molten Core and the size went down to 897 bytes...
I thought I would never bother with 1k again since there was no more room to do anything else but now I have enough bytes to maybe do something more interesting.
If I could thumbup again I would.
I thought I would never bother with 1k again since there was no more room to do anything else but now I have enough bytes to maybe do something more interesting.
If I could thumbup again I would.
Goblinish yes. Many 1k windows intros are using asm and crinkler together. I personally used MASM in VS2013 and it worked with crinkler just as seamlessly as coding in C/C++.
@drift: how it looks? I never used VS2013.
Thanks for version 2. Work-in-progress compoentry went from 1138 bytes to 1013.
drift: let me thumbs up for you
goblinish: when you download my 1k it has the source code in it and I also included a complete VS project. It should work on any VS from 2013 or newer which you can download a free version from microsoft. You can see how I set it all up but there is no real tricks, just code asm right in the VS text editor and build it just like any normal C/C++ code. If you have more questions just ask in the 1k code thread on pouet bbs, myself or many other people will be happy to help.
sensenstahl: thankyou!
sensenstahl: thankyou!
@mentor: anyway is better to instal Masm32 and use one than VS2013.
some people said they are used Masm32.
@drift: thanks for the help, will try.
some people said they are used Masm32.
@drift: thanks for the help, will try.
Thumb for this stuff is cool, and for the prods it may result in!
Thanks for fueling my love/hate for your work!
100+ bytes gain at 1kb is HUGE and I already fell that native 1kb intros had something like a ~1-150bytes edge other web 1kb intros, not to mention the difference of APIs and data ready to use.
100+ bytes gain at 1kb is HUGE and I already fell that native 1kb intros had something like a ~1-150bytes edge other web 1kb intros, not to mention the difference of APIs and data ready to use.
Is it working with MSDOS 4K ? Could it be possible ?
@mentor, I don't get your point, but I think simple code may compact to 1K, e.g.
http://www.pouet.net/prod.php?which=65913
http://www.pouet.net/prod.php?which=65913
g0blinish: just use MASM to generate the obj file and use crinkler to link it? That's exactly what crinkler is for.
blueberry & mentor: nice work!
blueberry & mentor: nice work!
Heeej,
thanx for thie wonderful piece of Software !
Iam running in some troble, compiling my VS2013 project, i followed the Manual, but there are still linking errors...
thanx for thie wonderful piece of Software !
Iam running in some troble, compiling my VS2013 project, i followed the Manual, but there are still linking errors...
Code:
Fehler 4 error LNK: Cannot find symbol '__imp__timeGetTime@0' D:\Programme\DirectXTemplate\MAIN.OBJ DirectXTemplate
Fehler 5 error LNK: Cannot find symbol '___CxxFrameHandler3' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 6 error LNK: Cannot find symbol '__imp__timeGetTime@0' D:\Programme\DirectXTemplate\MAIN.OBJ DirectXTemplate
Fehler 7 error LNK: Cannot find symbol '__imp_??0id@locale@std@@QAE@I@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 8 error LNK: Cannot find symbol '__imp_??0id@locale@std@@QAE@I@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 9 error LNK: Cannot find symbol '__imp_??1exception@std@@UAE@XZ'. D:\Programme\DirectXTemplate\MAIN.OBJ DirectXTemplate
Fehler 10 error LNK: Cannot find symbol '__imp_?_Xbad_alloc@std@@YAXXZ' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 11 error LNK: Cannot find symbol '__imp_?_Syserror_map@std@@YAPBDH@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 12 error LNK: Cannot find symbol '__imp_?_Winerror_map@std@@YAPBDH@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 13 error LNK: Cannot find symbol '__imp_?_Syserror_map@std@@YAPBDH@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 14 error LNK: Cannot find symbol '__imp_?_Xout_of_range@std@@YAXPBD@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 15 error LNK: Cannot find symbol '___CxxFrameHandler3' D:\Programme\DirectXTemplate\MAIN.OBJ DirectXTemplate
Fehler 16 error LNK: Cannot find symbol '__imp_?_Xlength_error@std@@YAXPBD@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 17 error LNK: Cannot find symbol '__imp_?_Xout_of_range@std@@YAXPBD@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Fehler 18 error LNK: Cannot find symbol '__imp___wassert' D:\Programme\DirectXTemplate\MAIN.OBJ DirectXTemplate
Fehler 19 error LNK: Cannot find symbol '__imp___wassert' D:\Programme\DirectXTemplate\MAIN.OBJ DirectXTemplate
Fehler 20 error LNK: Cannot find symbol '__imp_?_Xout_of_range@std@@YAXPBD@Z' D:\Programme\DirectXTemplate\DIRECTXTEMPLATEPCH.OBJ DirectXTemplate
Awesome
@las: I start the thread, still no result
nebulus:
get rid of your DirectX-Template! Code something on your own by following DirectX-Tutorials to be found everywhere across the web...try to find sth official! ;) (just dont kill everything on exit as Tutorials imply, Windows will do so anyway for you!)
timeGetTime -> i got rid of it by using 4klang-softSynthesizer and using its "time", even providing you a possibility to sync music with your effects! There are other ways to avoid using it for sure, tho! ;)
The rest of your Errors seem to be soluted by just avoiding the standard-runtime aswell. (not too sure about this, because of i have no idea what this DirectX-Template is you´re using!)
Another problem you might run into is not being able to use "math.h"...
...first of all: try to avoid as much C-code as possible as it won´t pack away as good as your shader-code in Ascii! (have a large array of Ascii-Shader-Code to be compiled at runtime into shadercode, directX has a runtime-shadercompiler, use it!)
...secondary: if you cannot avoid using some math in your C-code, use the CPU directly via Assembler-Intrinsics, the only Assembler-Code you´ll ever need, except you want to squeeze out some more very few bytes lateron (never went that far myself!):
Sorry, Pouet still seems to mess up(->not recognize!) TABULATORS when pasting Code! :/
get rid of your DirectX-Template! Code something on your own by following DirectX-Tutorials to be found everywhere across the web...try to find sth official! ;) (just dont kill everything on exit as Tutorials imply, Windows will do so anyway for you!)
timeGetTime -> i got rid of it by using 4klang-softSynthesizer and using its "time", even providing you a possibility to sync music with your effects! There are other ways to avoid using it for sure, tho! ;)
The rest of your Errors seem to be soluted by just avoiding the standard-runtime aswell. (not too sure about this, because of i have no idea what this DirectX-Template is you´re using!)
Another problem you might run into is not being able to use "math.h"...
...first of all: try to avoid as much C-code as possible as it won´t pack away as good as your shader-code in Ascii! (have a large array of Ascii-Shader-Code to be compiled at runtime into shadercode, directX has a runtime-shadercompiler, use it!)
...secondary: if you cannot avoid using some math in your C-code, use the CPU directly via Assembler-Intrinsics, the only Assembler-Code you´ll ever need, except you want to squeeze out some more very few bytes lateron (never went that far myself!):
Code:
//___sInUs___
#pragma code_seg(".crtemuf")
float ASMsinf(float i)
{ __asm fld i
__asm fsin
}
//___cOsInUs___
#pragma code_seg(".crtemuf")
float ASMcosf(float i)
{ __asm fld i
__asm fcos
}
//___rOUnd_flOAt_tO_IntEgEr___
#pragma code_seg(".crtemuf")
int ASMlrintf (float flt)
{ int reti;
__asm
{
fld flt
fistp reti // rounds ;)
}
return reti;
}
//___sqUArE_rOOt___
#pragma code_seg(".crtemuf")
float ASMsqrtf(float i)
{ __asm fld i
__asm fsqrt
}
//___mOdUlO_flOAt___
#pragma code_seg(".crtemuf")
float ASMfmodf(float i, float j)
{ __asm fld j
__asm fld i
__asm fprem
__asm fxch
__asm fstp i
}
//___AbsOlUtE_flOAt___
#pragma code_seg(".crtemuf")
float ASMfabsf(float i)
{ __asm fld i
__asm fabs
}
//___clEAr_mEmOry___
#pragma code_seg(".crtemui")
void ASMZeroMemory(void* dest, SIZE_T s)
{ __asm mov edi, dest
__asm xor eax, eax
__asm mov ecx, s
__asm rep stosb
}
//___cOpy_mEmOry___
#pragma code_seg(".crtemui")
void ASMCopyMemory(void* dest, void* souAe, SIZE_T s)
{ __asm mov esi, souAe
__asm mov edi, dest
__asm mov ecx, s
__asm rep movsb
}
//___rAndOm_nUmbEr_gEnErAtOr___
#pragma data_seg(".rand")
DWORD RandSeed;
#pragma code_seg(".crtemui")
unsigned long random()
{
RandSeed = (RandSeed * 196314165) + 907633515;
return RandSeed;
}
Sorry, Pouet still seems to mess up(->not recognize!) TABULATORS when pasting Code! :/
pouet seems to have added some whitespace aswell:
ASMCopyMemory()
ASMZeroMemory()
Just remove the Whitespace after "ASM" ;)
ASMCopyMemory()
ASMZeroMemory()
Just remove the Whitespace after "ASM" ;)
on top of your main-class, NOT the main()-function:
may help aswell!
You may have recognized those "#pragma"s everywhere, crinkler.manual has info for what those are! More than just useful for debugging, also helps crinkler itself to recognize how to handle data/code and crunch it for you! ;) Use it everywhere, as often as you want, even repeat names for them, if you think you have sth that could be the same sort of data/code...experimenting is one thing you can try if you run out of ideas getting it smaller, just some few bytes away from the final bytesize...but try planning without having to do so once you got a hang to it! ;)
Code:
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#pragma code_seg(".fltused")
extern "C" { int _fltused = 1; }
may help aswell!
You may have recognized those "#pragma"s everywhere, crinkler.manual has info for what those are! More than just useful for debugging, also helps crinkler itself to recognize how to handle data/code and crunch it for you! ;) Use it everywhere, as often as you want, even repeat names for them, if you think you have sth that could be the same sort of data/code...experimenting is one thing you can try if you run out of ideas getting it smaller, just some few bytes away from the final bytesize...but try planning without having to do so once you got a hang to it! ;)
I was depending on crinkler working on wine... but I haven't touched PC size coding for quite some time now...
Crinkler is working on 64-bit Windows 10, no problem. We are happy.
This tool has changed the 4k landscape for good.
Thank you for doing this. :)
Crinkler crashes when using gdi32.lib from the Windows 10 Anniversary Update (10.0.14393.0). An older version of the library (10.0.10586.0) works fine. The log looks like this:
The dump file reveals the exception code 0xC0000005.
Code:
Loading kernel32.lib...
Loading user32.lib...
Loading opengl32.lib...
Loading Gdi32.lib...
Oops! Crinkler has crashed.
Dump files written to dump0000_mini.dmp and dump0000_full.dmp
The dump file reveals the exception code 0xC0000005.
I can confirm that bug. Crashes here as well. Using the 8.1 SDK works fine.
missing thumb
Hello crinkler dont work with VS2017 now.
BB can you patch Crinkler?
Thanks
BB can you patch Crinkler?
Thanks
ooh, forgot the quite obvious thumb up for this wizardry! Used it a lot. Thank you <3
guess what :)
Hi BB,
is not the same bug like MrYeah and xTr1m. I use on the VS 2017 environment sdk 10.0.14393.0.
VS 2017 break with link.exe was stopt with code -1
If i use the VS 2017 linker all work fine.
On my VS2015 environment the same project work with crinkler.
Ciclope
is not the same bug like MrYeah and xTr1m. I use on the VS 2017 environment sdk 10.0.14393.0.
VS 2017 break with link.exe was stopt with code -1
If i use the VS 2017 linker all work fine.
On my VS2015 environment the same project work with crinkler.
Ciclope
Oh sorry its the same bug !!!!
This is a great tool. If you ever plan to release a crinkler version which is able to handle x64 executables this small blog entry may be helpfull for you: https://drakopensulo.wordpress.com/2017/08/06/smallest-pe-executable-x64-with-every-byte-executed/
Amazing prod, thank you for such great tool!!!
I have some issues with version 2.0, for some reason results packed with it work on my win7 desktop and doesn't work on other systems.
I don't have such problem with version 1.4.
Also the size of the result is different on differeent Windows systems, is it due different versions of libraries or something else?
Also I have issue with Windows 10 VS 2015
it breaks with link.exe was stop with code -1
To solve this issue you have to disable /PROGRESSGUI
It appears in Win10 and no issue with Win7
I have some issues with version 2.0, for some reason results packed with it work on my win7 desktop and doesn't work on other systems.
I don't have such problem with version 1.4.
Also the size of the result is different on differeent Windows systems, is it due different versions of libraries or something else?
Also I have issue with Windows 10 VS 2015
it breaks with link.exe was stop with code -1
To solve this issue you have to disable /PROGRESSGUI
It appears in Win10 and no issue with Win7
1. Yeah you right.. I use TINYIMPORT some times, but I need to retest to make sure!
can I track that somehow?
2.
Wow ;)
3.
thank you ;)!!! I'll move there
4.
I will send you all the project, with the code ;) np.. Ijust need some time to prepare everything!
BTW it would be great to have some feature to use default linker, I have a lot of builds for one project and I am trying to automate the building process and as result I want to have a folder with all binary types..
for instance:
4kb slow 1920x1080
4kb slow 1280x720
4kb slow 1680x1050
4kb slow 1024x768
fast build 1920x1080
CAPTURE BUILD
4klang CAPTURE only build
normal builds to check on different machines
a slow build takes about 2-5 minutes.. thus I want to run Batch Build and make a coffee... ;)
Quote:
It builds a minimal hash table which has no collisions between the imported functions and other functions in the same DLL, but if a later Windows version adds a function which collides with an imported function, the intro may break.
can I track that somehow?
2.
Quote:
but since Crinkler 2.0 is now more than two years old, some disrupting functions have snuck in since. Time to release an update, I guess. :)
Wow ;)
3.
Quote:
There is some more discussion of the feature in this thread.
thank you ;)!!! I'll move there
4.
Quote:
In any case, if you could send us your object files, the options you use when compressing, and the resulting executable when compressing on your machine, that would be very helpful.
I will send you all the project, with the code ;) np.. Ijust need some time to prepare everything!
BTW it would be great to have some feature to use default linker, I have a lot of builds for one project and I am trying to automate the building process and as result I want to have a folder with all binary types..
for instance:
4kb slow 1920x1080
4kb slow 1280x720
4kb slow 1680x1050
4kb slow 1024x768
fast build 1920x1080
CAPTURE BUILD
4klang CAPTURE only build
normal builds to check on different machines
a slow build takes about 2-5 minutes.. thus I want to run Batch Build and make a coffee... ;)
Hello!
I can't run any intros packed by Crinkler (on Win 10 x64 / Core i5-2500K). But Win 7 x86 on VMware can run some of them. And my notebook with Win 10 x64 (Core i5 too) can run some intros but most of them glitches.
And the main problem is that I can't run anything that I linked by Crinkler.
Simply "Hello World" program hangs with core load (it seems like it unpacks forever). Or does AV exception if I link with /hashsize:1 option (~ after 10 secs).
Please look this: https://cloud.mail.ru/public/EeVT/qXJHCEBfp
I can't run it successfully anywhere: neither on my PC, nor on notebook nor on VMware with Win7 on XP.
p.s. This archive contains ASSEMBLER sources (fasm, nasm, masm, uasm) and batch files for compilation. And binaries also.
What's wrong???
I can't run any intros packed by Crinkler (on Win 10 x64 / Core i5-2500K). But Win 7 x86 on VMware can run some of them. And my notebook with Win 10 x64 (Core i5 too) can run some intros but most of them glitches.
And the main problem is that I can't run anything that I linked by Crinkler.
Simply "Hello World" program hangs with core load (it seems like it unpacks forever). Or does AV exception if I link with /hashsize:1 option (~ after 10 secs).
Please look this: https://cloud.mail.ru/public/EeVT/qXJHCEBfp
I can't run it successfully anywhere: neither on my PC, nor on notebook nor on VMware with Win7 on XP.
p.s. This archive contains ASSEMBLER sources (fasm, nasm, masm, uasm) and batch files for compilation. And binaries also.
What's wrong???
Hi Blueberry.
I tried to run on different systems (including from VMware, USB WinPE, etc) with switched off (and absent) antivirus and DEP, run as administrator etc... The result is the same.
Can you download my archive from the link above and try (run and compile) yourself?
It contains compiled (and linked by Crinkler) and sources. There's nothing hard to understand...
When I link it with '/hashsize:1' option it crashes after ~ 10 secs. Under OllyDbg I see that it crashes trying to 'stosb' to edi=0053C000 (esp=01C3FF84).
You can look screenshots of crash on XP (VMware) here: https://cloud.mail.ru/public/4BKP/xGv6TuRnh
(and I doubled my archive 'crinkler_test.zip' here too).
Moreover I can't run ANY linked by Crinkler intro on my main system...
I tried to run on different systems (including from VMware, USB WinPE, etc) with switched off (and absent) antivirus and DEP, run as administrator etc... The result is the same.
Can you download my archive from the link above and try (run and compile) yourself?
It contains compiled (and linked by Crinkler) and sources. There's nothing hard to understand...
When I link it with '/hashsize:1' option it crashes after ~ 10 secs. Under OllyDbg I see that it crashes trying to 'stosb' to edi=0053C000 (esp=01C3FF84).
You can look screenshots of crash on XP (VMware) here: https://cloud.mail.ru/public/4BKP/xGv6TuRnh
(and I doubled my archive 'crinkler_test.zip' here too).
Moreover I can't run ANY linked by Crinkler intro on my main system...
The problem was with libs of MASM32.
It will work ok when change libpath to Windows SDK :))
It will work ok when change libpath to Windows SDK :))
Incredible tool.
I've been having issues with it crashing out under certain conditions - massive props to Mentor for pinpointing it to an odd interaction between the PROGRESSGUI and the DisplayFusion software I have installed. I'm now back in business, but just a heads-up for anyone else running DisplayFusion
I've been having issues with it crashing out under certain conditions - massive props to Mentor for pinpointing it to an odd interaction between the PROGRESSGUI and the DisplayFusion software I have installed. I'm now back in business, but just a heads-up for anyone else running DisplayFusion
No bugs, no crashing.. Just (in time for) Revision
The link.exe trick doesn't seem to work in Visual Studio 2017 anymore. It didn't work on my previous Win7 installation, and not on Win10 either. Crinkler is just ignored entirely without getting invoked and VS uses the default linker. Anyone else had this? Any solutions?
Didn't take too long (thanks msqrt). Just put "$(SolutionDir)" under your VC++ Executable directories in the configuration settings.
Hi,
I would like to request a feature be added to Crinkler. I want to use Crinkler for small, data compression programs.
Here is an example - Please see the cpp, obj, and exe (created with crinkler 2.0a) files in this archive: https://www.dropbox.com/s/qw0drwzqqck26f7/lzss1.7z?dl=0
As you can see, the exe runs ok. But, when we try to send an argument via argv (i.e. to compress a file or decompress a file), the exe ignores the arguments are returns the main printf statement and exits.
If a feature could be added to support this, it would be greatly appreciated.
Thanks!
I would like to request a feature be added to Crinkler. I want to use Crinkler for small, data compression programs.
Here is an example - Please see the cpp, obj, and exe (created with crinkler 2.0a) files in this archive: https://www.dropbox.com/s/qw0drwzqqck26f7/lzss1.7z?dl=0
As you can see, the exe runs ok. But, when we try to send an argument via argv (i.e. to compress a file or decompress a file), the exe ignores the arguments are returns the main printf statement and exits.
If a feature could be added to support this, it would be greatly appreciated.
Thanks!
Hi experts,
how to link assembler source code that has a resource file?! Does this compression linker not understand the resource files at all? Are there any similar plans for the future to make support resources?
Thanks for the great project!
how to link assembler source code that has a resource file?! Does this compression linker not understand the resource files at all? Are there any similar plans for the future to make support resources?
Thanks for the great project!
Assembling: exmem.asm
Crinkler 2.0a (Mar 28 2018) (c) 2005-2018 Aske Simon Christensen & Rune Stubbe
Target: exmemcr.exe
Tiny compressor: YES
Tiny import: NO
Subsystem type: CONSOLE
Large address aware: NO
Compression mode: SLOW
Saturate counters: NO
Hash size: 100 MB
Hash tries: 20
Order tries: 1000
Report: exmem.html
Transforms: CALLS
Replace DLLs: NONE
Fallback DLLs: NONE
Range DLLs: NONE
Exports: NONE
Loading exmem.obj...
C:\MASM64\EXMEM.OBJ: error LNK: Unsupported file type
Press any key to continue . . .
Crinkler 2.0a (Mar 28 2018) (c) 2005-2018 Aske Simon Christensen & Rune Stubbe
Target: exmemcr.exe
Tiny compressor: YES
Tiny import: NO
Subsystem type: CONSOLE
Large address aware: NO
Compression mode: SLOW
Saturate counters: NO
Hash size: 100 MB
Hash tries: 20
Order tries: 1000
Report: exmem.html
Transforms: CALLS
Replace DLLs: NONE
Fallback DLLs: NONE
Range DLLs: NONE
Exports: NONE
Loading exmem.obj...
C:\MASM64\EXMEM.OBJ: error LNK: Unsupported file type
Press any key to continue . . .
thank you blueberry!!
and mentor :)
the best christmas present, thank you!
I tried it latest version with my 4k intros and I replicate any speed improvements? All run times are within a second of the previous 2.0a version while compressing to the same result. This was using both versions with the same invocation command, or is there something additional I need to do to speed it up? (fwiw I don't think this was really an issue for me, even with heavy settings a typical crinking operation for final release takes only about a minute.)
The /VERYSLOW option seems promising though, managing to squeeze out a few more bytes consistently =)
The /VERYSLOW option seems promising though, managing to squeeze out a few more bytes consistently =)
and i cannot* replicate...
Ah, nevermind... trying now a day later there def is a difference, going down from about 1m20s to 28 seconds using the same settings =)
Is it possible to increase maximum allowed out.exe size from 128K to 256K or 512K? My use-case for Crinkler these days is slightly atypical and it would be very helpful for me if this feature could be added.
Quote:
It is possible in principle. The 128k limitation comes from the fact that the address where the (decompressed) code and data are located is hardcoded to 0x420000, which is 128k after the ImageBase (executable load address) of 0x400000. Lifting the limitation is thus not just a matter of changing a constant somewhere, but will involve adding an option to move the code base address. This is something we have considered doing.
Have you tried kkrunchy on your executable? I would expect it to beat the compression ratio of Crinkler at those sizes. Or is there a reason that you want to use Crinkler specifically?
Crinkler is superior to any exe packer because it does not produce nearly as many A/V false flags, which is quite important in my case.
Any chance for a switch which denies stripping unused code (/OPT:NOREF equivalent)?
I'd like to mess with ImportTable by hardcoded offsets (it's a 3 byte call instead of 6 bytes), but this makes declared but indirectly called functions to be stripped away from ImportTable...
Great work anyway.
I'd like to mess with ImportTable by hardcoded offsets (it's a 3 byte call instead of 6 bytes), but this makes declared but indirectly called functions to be stripped away from ImportTable...
Great work anyway.
i have never used crinkler and maybe never will, but given all the demoscene pearlz i enjoyed, made possible with crinkler, up is the only direction a thumb can have here =)
One of the 4k scene foundation stones together with 4klang (and shadertoy)
Quote:
So you want a way to explicitly include a function in the import table even though nothing refers to it, and then somehow access the index at which it is placed, so you can use it in your code. Is this correct?
Almost exactly ;) The true sentence is: even though nothing >>directly<< refers to it.
I know the index in ImportTable as long, as the function is included. I just need to peek it up in Crinkler report and hardcode it back in my code.
To be strict, instead of:
Code:
EXTERN _imp__ShowWindow@4:PROC
...
call DWORD PTR [_imp_ShowWindow@4]; 2 + 4 bytes
use:
Code:
EXTERN ImportTable
lea EDI,ImportTable
...
call DWORD PTR [EDI + offset to _imp_ShowWindow@4]; 2 + 1 bytes
Right now the latter is only possible if the function was directly referenced before (but for a 1K majority of functions is called only once).
That's a very acceptable explanation. I have already learned some of the Crinklers specifics and I know that shorter code not always is a better compressed one...
Of course, maybe I missed some side effects, but it seems like they should work from my little tests. Save two bytes in decompress:
instead of ror [esi],cl / rol [esi],cl to get bit, just use bt [esi],ecx
also at 00E5: dec ecx / jnz 007D, loop 007D does the same.
Any chance it will be open sourced? I would like to make a version for 64-bit executables: https://board.flatassembler.net/topic.php?t=21094
instead of ror [esi],cl / rol [esi],cl to get bit, just use bt [esi],ecx
also at 00E5: dec ecx / jnz 007D, loop 007D does the same.
Any chance it will be open sourced? I would like to make a version for 64-bit executables: https://board.flatassembler.net/topic.php?t=21094
Quote:
off by one error, doesn't really work that way.instead of ror [esi],cl / rol [esi],cl to get bit, just use bt [esi],ecx
All Crinkler versions after 2.0a crash under wine :(
E.g. crash for 2.2:
Tried wine-4.0.1, wine-4.12.1
Crinkler 2.0a works fine with the same arguments and object files.
E.g. crash for 2.2:
Quote:
Unhandled exception: page fault on read access to 0x00b3959d in 64-bit code (0x0000000140024770).
002c:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6
002c:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6
Register dump:
rip:0000000140024770 rsp:000000000023d380 rbp:0000000000733b50 eflags:00010297 ( R- -- I S -A-P-C)
rax:0000000000b3959d rbx:0000000000005a4d rcx:0000000000733b50 rdx:0000000000077ff4
rsi:0000000000733b50 rdi:0000000000000000 r8:ffffffffff7b9e8b r9:0000000000000003 r10:0000000000405a4d
r11:0000000000000003 r12:00000000002f3428 r13:0000000000000000 r14:0000000000733b50 r15:0000000000000060
Stack dump:
0x000000000023d380: 0000000000005a4d 00000000007339e0
0x000000000023d390: 000000000023d300 0000000000000000
0x000000000023d3a0: 0000000000000000 00000000002f33b0
0x000000000023d3b0: 0000000000000000 0000000000000000
0x000000000023d3c0: 0000000000000000 0000000000000000
0x000000000023d3d0: 000000000023d429 000000014002437e
0x000000000023d3e0: 00000000002f3448 00000000002f3428
0x000000000023d3f0: 0000000000733b50 0000000000733bb0
0x000000000023d400: 0000000000000000 0000000000000000
0x000000000023d410: 0000000000000040 0000000140060fe7
0x000000000023d420: 0000000000000000 0000000000000000
0x000000000023d430: 0000000000000000 0000000000000000
Backtrace:
=>0 0x0000000140024770 in crinkler (+0x24770) (0x0000000000733b50)
1 0x000000014002437e in crinkler (+0x2437d) (0x000000000023d429)
2 0x00000001400226d6 in crinkler (+0x226d5) (0x000000000023d590)
3 0x00000001400063db in crinkler (+0x63da) (0x000000000023dba9)
4 0x000000014008d244 in crinkler (+0x8d243) (0x0000000140029691)
Tried wine-4.0.1, wine-4.12.1
Crinkler 2.0a works fine with the same arguments and object files.
Really should submit a bug report to Wine and not to Crinkler. :) They do fix their stuff.
Quote:
Any chance it will be open sourced? I would like to make a version for 64-bit executables: https://board.flatassembler.net/topic.php?t=21094
You may be interested in XLINK, the open source compressing linker I wrote for DOS COM files https://github.com/negge/xlink.
It uses the same PAQ1 compression algorithm as crinkler and I am working on adding support for linux binaries. I gave a talk about this project at linux.conf.au earlier this year https://www.youtube.com/watch?v=J5WX-wN_RKY.
Patches welcome!
!
Hello!
I would like to say that this is a very cool product! Thanks to those people who develop it!
But I have some problem, I wrote dll, pointed out /CRINKLER /ENTRY:DllMain msvcrt.lib
but when I call DllMain from any program, it does not find an entry point
help me please!
I would like to say that this is a very cool product! Thanks to those people who develop it!
But I have some problem, I wrote dll, pointed out /CRINKLER /ENTRY:DllMain msvcrt.lib
but when I call DllMain from any program, it does not find an entry point
help me please!
Hello!
Crinkler fails to link lib files produced by rustc. Any idea why this could be?
Thanks!
Crinkler fails to link lib files produced by rustc. Any idea why this could be?
Thanks!
impressive
.
Quote:
I wonder when we will see the first 4k intro coded in Rust? ;)
I recently released my first 4K intro which was fully written in Rust and compressed with Crinkler. To my knowledge this is the first 4K intro in Rust. The biggest difficulty in using crinkler with Rust was figuring out how to get the rust compiler to output the right kind of obj files
The intro took 1st place in the new school intro competition https://www.pouet.net/prod.php?which=85924
Obligatory thumb! Now, question: if a named .code section ends with JMP to the beginning of another section, can Crinkler eliminate that jump automagically?
This sounds great! I have some helper functions and other functions tail call them using jmps... All functions are in their own sections. I can of course try to eliminate the JMP myself by placing the helper function after one of the calling functions, but the trouble is; depending on %defines, some of the calling functions might or might not be included. So, it's a bit tricky to figure out where to place the helper function to eliminate that JMP. Having crinkler do it for me would be fantastic! Also, this would give Crinkler the freedom to choose the best place to eliminate that jump, in terms of compression ratio.
Has caused so much carnage; the only other demotool that can claim a similar influence is probably FT2.
Windows Defender makes different with and without /TINYHEADER. Its nice thought too see it strip of 59 bytes or something. Altho, it would be nice to have a turnaround such that lazy ppl get away with adding an exception for virus detection.
Crinkler just rulez so hard!
submit changes
if this prod is a fake, some info is false or the download link is broken,
do not post about it in the comments, it will get lost.
instead, click here !