FORUMS
Remove All Ads from XDA

UPX compress dll fail

3 posts
Thanks Meter: 0
 
By xsapphire, Junior Member on 27th May 2010, 03:12 PM
Post Reply Email Thread
I used UPX to compress a big dll(>5 MB), compress successed, but the program can't execute, anybody know why? and how to fix it?
 
 
27th May 2010, 05:28 PM |#2  
Member
Flag London
Thanks Meter: 1
 
More
UPX compression on modules (DLLs) does not usually work with Windows Mobile software. It renders them unreadable and the software usually returns an error.

Compress only executables (EXEs) in future. Why? Because the operating system is designed to be able to use compressed executables -- anything higher level than the OS has to be written to use compressed modules.

Think of it like this:
You can tell a child to eat some candy and he will eat it just fine. But show him some candy that doesn't look or smell like candy (even though it is candy) he will probably not eat it without being told what it is.

Terrible analogy, but you get the point.
28th May 2010, 08:38 AM |#3  
OP Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by pj1115

UPX compression on modules (DLLs) does not usually work with Windows Mobile software. It renders them unreadable and the software usually returns an error.

Compress only executables (EXEs) in future. Why? Because the operating system is designed to be able to use compressed executables -- anything higher level than the OS has to be written to use compressed modules.

Think of it like this:
You can tell a child to eat some candy and he will eat it just fine. But show him some candy that doesn't look or smell like candy (even though it is candy) he will probably not eat it without being told what it is.

Terrible analogy, but you get the point.

thx for reply, do you know some other ways to reduce dll's size? like some compile option?
29th May 2010, 03:30 PM |#4  
Member
Flag London
Thanks Meter: 1
 
More
If you're the developer of the application, you there are various changes you could make, including adapting the application to support UPX compression on dependencies. I'm not familiar with any methods specifically.

Otherwise, no. In short, there is not much you can due to reduce the size of the modules without breaking them.
29th May 2010, 06:38 PM |#5  
Senior Member
Flag The United States of America (also known as "USA")
Thanks Meter: 7
 
More
Try this: http://www.google.com/search?q=windo...-a&safe=active

And UPX is supposed to work on ARM Windows CE... Weird.
30th May 2010, 02:22 PM |#6  
bimbam69's Avatar
Senior Member
Flag Kaunas
Thanks Meter: 7
 
More
Quote:
Originally Posted by DJGonzo

Try this: http://www.google.com/search?q=windo...-a&safe=active

And UPX is supposed to work on ARM Windows CE... Weird.

It works... I've tried it on both exe's and dll's and they were able to load on WinCe based device.
30th May 2010, 02:33 PM |#7  
bimbam69's Avatar
Senior Member
Flag Kaunas
Thanks Meter: 7
 
More
Quote:
Originally Posted by pj1115

UPX compression on modules (DLLs) does not usually work with Windows Mobile software. It renders them unreadable and the software usually returns an error.

Compress only executables (EXEs) in future. Why? Because the operating system is designed to be able to use compressed executables -- anything higher level than the OS has to be written to use compressed modules.

Think of it like this:
You can tell a child to eat some candy and he will eat it just fine. But show him some candy that doesn't look or smell like candy (even though it is candy) he will probably not eat it without being told what it is.

Terrible analogy, but you get the point.

Isn't dll's and exe's has the same format?

Maybe OP is facing some bug or doing it wrong.
31st May 2010, 07:34 AM |#8  
OP Junior Member
Thanks Meter: 0
 
More
thx for all reply, google is really a good friend, but not help much, maybe I need to find other ways.
13th June 2010, 06:01 PM |#9  
joemanb's Avatar
Senior Member
Flag Ogden,Ut
Thanks Meter: 0
 
More
UPX will compress .DLLs .EXEs, and .MUIs. The problem is they don't always decompress.

I have no problems UPXing .DLLs, but you have to test them.

I always test with the UPX -d option to ensure that they decompress.

If it doesn't decompress, then you're out of luck with that particular file.

Sometimes they decompress, but still won't work properly because the resources get screwed up, in this case using the option "--compress-resources=0" increases my success rate.

the full command line I use is:
UPX *.dll -f --compress-resources=0 --compress-exports=0 --strip-relocs=0 --best --ultra-brute

then to test them:
UPX *.dll -d

I get a high rate of success, but there are occasionally files that won't work.

J03M4N
13th June 2010, 09:46 PM |#10  
Senior Member
US, Michigan
Thanks Meter: 51
 
More
If it's a large dll with many resources, you can export the resources and compress them (use less colors/detail) and that will help. Dithering can cause a image to become much larger.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes