Compare commits

...

56 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer 63b9ee61d2 Prepare UPX 1.93 release.
committer: mfx <mfx> 1107804731 +0000
2005-02-07 19:32:11 +00:00
Markus F.X.J. Oberhumer 3b9eff7f34 Enter 2005; added all needed stub files to CVS.
committer: mfx <mfx> 1107804447 +0000
2005-02-07 19:27:27 +00:00
John Reiser 59668c5fc1 ::pack3 to set .p_filesz; also set blocksize to allow giant scripts as input
p_lx_sh.cpp p_lx_sh.h

committer: jreiser <jreiser> 1105479043 +0000
2005-01-11 21:30:43 +00:00
Markus F.X.J. Oberhumer 3ed786fb5c Updated.
committer: mfx <mfx> 1103717402 +0000
2004-12-22 12:10:02 +00:00
Markus F.X.J. Oberhumer 0cd5eb5472 Use gcc-3.4.3 for Linux stubs.
committer: mfx <mfx> 1103717370 +0000
2004-12-22 12:09:30 +00:00
Markus F.X.J. Oberhumer ff571b96cb New ACC version.
committer: mfx <mfx> 1103717337 +0000
2004-12-22 12:08:57 +00:00
John Reiser 36b852e6bf %cs at entry to decompressor varies a _lot_ among Linux 2.4.x, 2.6.y kernels.
Decompressor must adapt; no universal constants exist for __BOOT_CS, _BOOT_DS.
	p_vmlinx.cpp stub/l_vmlinz.asm

committer: jreiser <jreiser> 1103605278 +0000
2004-12-21 05:01:18 +00:00
John Reiser f0c21c7203 Enhance documentation for process flow and testing.
Include some notes for compressing kernels from Linux 2.4.x.

committer: jreiser <jreiser> 1103513947 +0000
2004-12-20 03:39:07 +00:00
John Reiser 0516d8260c Fix stack synchronization bug at end of unfilter.
[The confusing fake "conditional compilation" strikes again!]

committer: jreiser <jreiser> 1103513713 +0000
2004-12-20 03:35:13 +00:00
John Reiser 1418f57b96 Fix bugs between Filter.addvalue and ckt32 macro call: [re-]compressed
Linux kernels were not booting.  Explain .addvalue better.
Set kernel stack pointer for boot-time decompression according to
Linux kernel documentation.
	     p_vmlinx.cpp      p_vmlinz.cpp
	stub/l_vmlinx.asm stub/l_vmlinz.asm
	filter/cto.h filter/ctoj.h filter/ctok.h

committer: jreiser <jreiser> 1103326936 +0000
2004-12-17 23:42:16 +00:00
Markus F.X.J. Oberhumer b24fb59c94 New upstream version.
committer: mfx <mfx> 1101602738 +0000
2004-11-28 00:45:38 +00:00
Markus F.X.J. Oberhumer 8fcf2bcd59 Fix bele.h to use strict PODs. This should fix build problems reported on ARM.
committer: mfx <mfx> 1098709362 +0000
2004-10-25 13:02:42 +00:00
Markus F.X.J. Oberhumer 079b808a56 Updated.
committer: mfx <mfx> 1098709263 +0000
2004-10-25 13:01:03 +00:00
Markus F.X.J. Oberhumer a4e01e28db New ACC version.
committer: mfx <mfx> 1098709116 +0000
2004-10-25 12:58:36 +00:00
Markus F.X.J. Oberhumer ec1ef9099f Updated.
committer: mfx <mfx> 1096637333 +0000
2004-10-01 13:28:53 +00:00
Markus F.X.J. Oberhumer ac724c7e6c New PS1 version from Jens.
committer: mfx <mfx> 1096637259 +0000
2004-10-01 13:27:39 +00:00
Markus F.X.J. Oberhumer ec25835525 New ACC version.
committer: mfx <mfx> 1096636709 +0000
2004-10-01 13:18:29 +00:00
Markus F.X.J. Oberhumer d4841a641c Updates.
committer: mfx <mfx> 1092135204 +0000
2004-08-10 10:53:24 +00:00
Markus F.X.J. Oberhumer 5612460720 New ACC version.
committer: mfx <mfx> 1092134926 +0000
2004-08-10 10:48:46 +00:00
John Reiser 465ea6429f "new []" requires matching "delete []"
committer: jreiser <jreiser> 1090882098 +0000
2004-07-26 22:48:18 +00:00
Markus F.X.J. Oberhumer ed9057ca83 Cleanups.
committer: mfx <mfx> 1090594763 +0000
2004-07-23 14:59:23 +00:00
Markus F.X.J. Oberhumer 14ced962db Cleanup.
committer: mfx <mfx> 1090583778 +0000
2004-07-23 11:56:18 +00:00
Markus F.X.J. Oberhumer 1aff6b862d Replaced ACC with miniACC.
committer: mfx <mfx> 1090583659 +0000
2004-07-23 11:54:19 +00:00
Markus F.X.J. Oberhumer ef490c4220 Updates.
committer: mfx <mfx> 1090577049 +0000
2004-07-23 10:04:09 +00:00
Markus F.X.J. Oberhumer 0dda83cbbc Updated.
committer: mfx <mfx> 1090577037 +0000
2004-07-23 10:03:57 +00:00
Markus F.X.J. Oberhumer fa4efec3b5 Bumped version numbers.
committer: mfx <mfx> 1090283329 +0000
2004-07-20 00:28:49 +00:00
Markus F.X.J. Oberhumer 814eabb88e Final updates for upx 1.92.
committer: mfx <mfx> 1090281040 +0000
2004-07-19 23:50:40 +00:00
John Reiser 95021e4977 mention vmlinux/i386
NEWS README README.1ST

committer: jreiser <jreiser> 1090261436 +0000
2004-07-19 18:23:56 +00:00
Markus F.X.J. Oberhumer d17fb7ebf0 Updated.
committer: mfx <mfx> 1090258607 +0000
2004-07-19 17:36:47 +00:00
Markus F.X.J. Oberhumer df9aa9ac32 Misc updates.
committer: mfx <mfx> 1090256162 +0000
2004-07-19 16:56:02 +00:00
Markus F.X.J. Oberhumer 9110517893 Check for .NET (win32/net) files.
committer: mfx <mfx> 1090256077 +0000
2004-07-19 16:54:37 +00:00
Markus F.X.J. Oberhumer 8204c7deb6 Small portability fixes.
committer: mfx <mfx> 1090256008 +0000
2004-07-19 16:53:28 +00:00
Markus F.X.J. Oberhumer 6662f8985e New ACC version.
committer: mfx <mfx> 1090253767 +0000
2004-07-19 16:16:07 +00:00
John Reiser a2b305ed3b Don't spend too much time compressing large symbol tables.
committer: jreiser <jreiser> 1090072585 +0000
2004-07-17 13:56:25 +00:00
John Reiser ce3d3a850c Allow any number of contiguous PT_LOAD.
p_vmlinx.cpp p_vmlinx.h

committer: jreiser <jreiser> 1090040793 +0000
2004-07-17 05:06:33 +00:00
Markus F.X.J. Oberhumer 212b674bc2 Portability fixes. Avoid some warnings.
committer: mfx <mfx> 1089734843 +0000
2004-07-13 16:07:23 +00:00
John Reiser 2980a6b4bb save 4 bytes
committer: jreiser <jreiser> 1089733580 +0000
2004-07-13 15:46:20 +00:00
Markus F.X.J. Oberhumer 435c0a9e82 New ACC version.
committer: mfx <mfx> 1089731989 +0000
2004-07-13 15:19:49 +00:00
Markus F.X.J. Oberhumer 4102cd7c91 Detabified.
committer: mfx <mfx> 1089731601 +0000
2004-07-13 15:13:21 +00:00
Markus F.X.J. Oberhumer b4b603819d Comment out cl1_d32.ash for now.
committer: mfx <mfx> 1089731343 +0000
2004-07-13 15:09:03 +00:00
Markus F.X.J. Oberhumer 20e3707e69 Updated some comments.
committer: mfx <mfx> 1089731255 +0000
2004-07-13 15:07:35 +00:00
John Reiser fc6eeaaea8 Decodes a format similar to nrv2b, except that a run of literals
is counted and phased instead of always 1-hot (no more 9/8 expansion).

committer: jreiser <jreiser> 1089692385 +0000
2004-07-13 04:19:45 +00:00
Markus F.X.J. Oberhumer 41799955ce Updated.
committer: mfx <mfx> 1089687731 +0000
2004-07-13 03:02:11 +00:00
Markus F.X.J. Oberhumer efb4ec9cb8 New ACC version.
committer: mfx <mfx> 1089687481 +0000
2004-07-13 02:58:01 +00:00
Markus F.X.J. Oberhumer 4dbda29f82 New upstream version.
committer: mfx <mfx> 1089687264 +0000
2004-07-13 02:54:24 +00:00
Markus F.X.J. Oberhumer befaa3c501 Detabified.
committer: mfx <mfx> 1089685145 +0000
2004-07-13 02:19:05 +00:00
John Reiser f41edf9e21 more Example twiddling
committer: jreiser <jreiser> 1089683530 +0000
2004-07-13 01:52:10 +00:00
John Reiser 754f10f0b0 update Example from linux kernel debuggin
committer: jreiser <jreiser> 1089674802 +0000
2004-07-12 23:26:42 +00:00
John Reiser 5d331fdf69 new file format vmlinux/i386
Modified Files:
	Makefile conf.h help.cpp linker.cpp p_elf.h packer.cpp
	packerf.cpp packmast.cpp stub/Makefile stub/l_vmlinz.asm
Added Files:
	p_vmlinx.h p_vmlinx.cpp stub/l_vmlinx.asm

committer: jreiser <jreiser> 1089652867 +0000
2004-07-12 17:21:07 +00:00
Markus F.X.J. Oberhumer cbf1dbe2cb Added new win32/pe option `--strip-loadconf'.
committer: mfx <mfx> 1089630382 +0000
2004-07-12 11:06:22 +00:00
Markus F.X.J. Oberhumer 3177de92fb New ACC version.
committer: mfx <mfx> 1089162904 +0000
2004-07-07 01:15:04 +00:00
Markus F.X.J. Oberhumer 3878890783 Prefer gcc-3.4.0 over gcc-3.4.1. Converted PF_TO_PROT into a macro (small size gain).
committer: mfx <mfx> 1088832985 +0000
2004-07-03 05:36:25 +00:00
Markus F.X.J. Oberhumer 61594f7873 Misc cleanups.
committer: mfx <mfx> 1088804669 +0000
2004-07-02 21:44:29 +00:00
Markus F.X.J. Oberhumer f412b5e0cd Fixed Win64 warnings.
committer: mfx <mfx> 1088804606 +0000
2004-07-02 21:43:26 +00:00
Markus F.X.J. Oberhumer f14d594a1a New ACC version.
committer: mfx <mfx> 1088804565 +0000
2004-07-02 21:42:45 +00:00
Markus F.X.J. Oberhumer f0279d23d3 Bumped version to start working on 1.92.
committer: mfx <mfx> 1088568203 +0000
2004-06-30 04:03:23 +00:00
126 changed files with 10341 additions and 7020 deletions
+1
View File
@@ -1,6 +1,7 @@
_darcs _darcs
B B
ChangeLog.cvs* ChangeLog.cvs*
TODO.*
build build
doxygen doxygen
maint maint
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar
http://upx.sourceforge.net http://upx.sourceforge.net
+3
View File
@@ -28,6 +28,9 @@ cvs-admin-ko:
ChangeLog: ChangeLog:
perl $(srcdir)/scripts/cvs2cl.pl --utc -f ChangeLog.cvs perl $(srcdir)/scripts/cvs2cl.pl --utc -f ChangeLog.cvs
ChangeLog.cvsps:
cvsps > $@
.PHONY: all mostlyclean clean distclean maintainer-clean .PHONY: all mostlyclean clean distclean maintainer-clean
.PHONY: dist cvs-admin-ko ChangeLog .PHONY: dist cvs-admin-ko ChangeLog
+11 -3
View File
@@ -4,8 +4,18 @@ User visible changes for UPX
[ UNSTABLE BETA VERSION - please see README.1ST for some more info ] [ UNSTABLE BETA VERSION - please see README.1ST for some more info ]
Changes in 1.91 beta (30 Jun 2004): Changes in 1.93 beta (07 Feb 2005):
* UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING * UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING
* vmlinuz/386: fixes to support more kernels
Changes in 1.92 beta (20 Jul 2004):
* win32/pe: added option `--strip-loadconf' to strip the SEH
load config section
* win32/pe: try to detect .NET (win32/net) files [not yet supported by UPX]
* vmlinux/386: new format that directly supports building Linux kernels
* source code: now compiles cleanly under Win64
Changes in 1.91 beta (30 Jun 2004):
* djgpp2/coff: added support for recent binutils versions * djgpp2/coff: added support for recent binutils versions
* linux/elf386, linux/sh386: lots of improvements * linux/elf386, linux/sh386: lots of improvements
* vmlinuz/386: added support for recent kernels * vmlinuz/386: added support for recent kernels
@@ -19,7 +29,6 @@ Changes in 1.91 beta (30 Jun 2004):
* re-synced with upx 1.25 branch * re-synced with upx 1.25 branch
Changes in 1.90 beta (11 Nov 2002): Changes in 1.90 beta (11 Nov 2002):
* UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING
* implemented several new options for finer compression control: * implemented several new options for finer compression control:
`--all-methods', `--all-filters' and `--brute' `--all-methods', `--all-filters' and `--brute'
* ps1/exe: new format - UPX now supports PlayStation One programs * ps1/exe: new format - UPX now supports PlayStation One programs
@@ -29,7 +38,6 @@ Changes in 1.90 beta (11 Nov 2002):
* documentation updates * documentation updates
Changes in 1.11 beta (20 Dec 2000): Changes in 1.11 beta (20 Dec 2000):
* UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING
* vmlinuz/386: new format - UPX now supports bootable linux kernels * vmlinuz/386: new format - UPX now supports bootable linux kernels
* linux/elf386: added the new ELF direct-to-memory executable format - no * linux/elf386: added the new ELF direct-to-memory executable format - no
more temp files are needed for decompression! more temp files are needed for decompression!
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar
http://upx.sourceforge.net http://upx.sourceforge.net
+6 -5
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar
http://upx.sourceforge.net http://upx.sourceforge.net
@@ -20,13 +20,14 @@ All versions 1.9x are unstable beta releases - use them only for testing,
and never distribute a program that is packed with them ! and never distribute a program that is packed with them !
There will be hidden bugs. Really. There will be hidden bugs. Really.
The current stable release is 1.24, and the next stable release The current stable release is 1.25, and the next stable release
will be called version 2.00. will be called version 2.00.
The main news since 1.24 are: The main news since 1.25 are:
- slightly better compression using the new NRV2E algorithm - slightly better compression using the new NRV2E algorithm
- new options for compression tuining (e.g. `--brute') - new options for compression tuining (e.g. `--brute')
- support for bootable Linux kernels ("vmlinuz/386") - support for bootable Linux kernels ("vmlinuz/386")
- support for Linux kernel building ("vmlinux/386")
- direct Linux ELF-to-memory decompression ("linux/elf386") and - direct Linux ELF-to-memory decompression ("linux/elf386") and
shell-to-memory decompression ("linux/sh386") shell-to-memory decompression ("linux/sh386")
- support for playstation exes ("ps1/exe") - support for playstation exes ("ps1/exe")
@@ -128,8 +129,8 @@ THE FUTURE
COPYRIGHT COPYRIGHT
========= =========
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2004 Laszlo Molnar Copyright (C) 1996-2005 Laszlo Molnar
This program may be used freely, and you are welcome to This program may be used freely, and you are welcome to
redistribute it under certain conditions. redistribute it under certain conditions.
+1
View File
@@ -25,6 +25,7 @@ The main news since 1.25 are:
- slightly better compression using the new NRV2E algorithm - slightly better compression using the new NRV2E algorithm
- new options for compression tuining (e.g. `--brute') - new options for compression tuining (e.g. `--brute')
- support for bootable Linux kernels ("vmlinuz/386") - support for bootable Linux kernels ("vmlinuz/386")
- support for Linux kernel building ("vmlinux/386")
- direct Linux ELF-to-memory decompression ("linux/elf386") and - direct Linux ELF-to-memory decompression ("linux/elf386") and
shell-to-memory decompression ("linux/sh386") shell-to-memory decompression ("linux/sh386")
- support for playstation exes ("ps1/exe") - support for playstation exes ("ps1/exe")
+6 -6
View File
@@ -69,11 +69,11 @@ Tools needed to build/modify the UPX sources
- A C++ compiler supporting inner classes, templates, exceptions - A C++ compiler supporting inner classes, templates, exceptions
and RTTI. and RTTI.
- GNU make for Win32 - GNU make 3.80 for Win32
http://upx.sourceforge.net/download/tools/ http://www.cygwin.com/
- GNU make for DOS - GNU make 3.80 for DOS
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/ http://www.delorie.com/djgpp/
To compile the packer sources To compile the packer sources
@@ -81,8 +81,8 @@ To compile the packer sources
set the environment variable UCLDIR to point to your UCL installation, e.g. set the environment variable UCLDIR to point to your UCL installation, e.g.
set UCLDIR=c:\src\ucl-1.01 (DOS / Windows) set UCLDIR=c:\src\ucl-1.03 (DOS / Windows)
export UCLDIR=$HOME/local/src/ucl-1.01 (Unix) export UCLDIR=$HOME/local/src/ucl-1.03 (Unix)
then type then type
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar
http://upx.sourceforge.net http://upx.sourceforge.net
+3 -6
View File
@@ -1,18 +1,15 @@
UPX TODO list. Last updated 2004-06-30. UPX TODO list. Last updated 2005-01-08.
IMPORTANT PROBLEMS THAT SHOULD BE FIXED SOON: IMPORTANT PROBLEMS THAT SHOULD BE FIXED SOON:
- win32/pe should add support for PEDIR_LOADCONF (Visual C++ 7.1 generated
exes, IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG)
- win32/pe should reliably detect .NET exes and somehow deal with them
- stub ctojr32 needs CPU 486 because of bswap - stub ctojr32 needs CPU 486 because of bswap
OTHER: OTHER:
- rewrite linker.cpp to allow arbitrary length section names
- check all <const_cast> to make sure they are not invalid - check all <const_cast> to make sure they are not invalid
- throwNotCompressible() is not a real error, so make the output nicer - throwNotCompressible() is not a real error, so make the output nicer
+1 -1
View File
@@ -3,7 +3,7 @@ SHELL = /bin/sh
top_srcdir = .. top_srcdir = ..
PACKAGE = upx PACKAGE = upx
VERSION_DATE = 30 Jun 2004 VERSION_DATE = 07 Feb 2005
VERSION := $(shell sed -n 's/^.*UPX_VERSION_STRING .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h) VERSION := $(shell sed -n 's/^.*UPX_VERSION_STRING .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h)
TRIMSPACE = cat TRIMSPACE = cat
+23 -24
View File
@@ -13,7 +13,7 @@ B<upx> S<[ I<command> ]> S<[ I<options> ]> I<filename>...
=head1 ABSTRACT =head1 ABSTRACT
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar
http://upx.sourceforge.net http://upx.sourceforge.net
@@ -224,9 +224,6 @@ copies the overlay after the compressed image. This works with some
files, but doesn't work with others, depending on how an application files, but doesn't work with others, depending on how an application
actually accesses this overlayed data. actually accesses this overlayed data.
Since version 0.90 UPX defaults to B<--overlay=copy> for
all executable formats.
--overlay=copy Copy any extra data attached to the file. [DEFAULT] --overlay=copy Copy any extra data attached to the file. [DEFAULT]
--overlay=strip Strip any overlay from the program instead of --overlay=strip Strip any overlay from the program instead of
@@ -695,10 +692,10 @@ Extra options available for this executable format:
This is the executable format used by the Sony PlayStation (PSone), This is the executable format used by the Sony PlayStation (PSone),
a Mips R3000 based gaming console which is popular since the late '90s. a Mips R3000 based gaming console which is popular since the late '90s.
Support of this format is very similar to the Atari one, because of Support of this format is very similar to the Atari one, because of
nostalgic feelings of one of the authors, but this format maybe serves nostalgic feelings of one of the authors.
a practical purpose ;-).
Packed programs will be byte-identical to the original after uncompression. Packed programs will be byte-identical to the original after uncompression,
until further notice.
Maximum uncompressed size: ~1998848 bytes. Maximum uncompressed size: ~1998848 bytes.
@@ -721,17 +718,15 @@ Extra options available for this executable format:
the compression ratio in some cases, but usually the compression ratio in some cases, but usually
the default method gives the best results anyway. the default method gives the best results anyway.
--console-run This enables client/target transfer compatibility. --boot-only The format will only run from a CD and may slightly
This format also run from a CD, except the "--no-align" improves the compression ratio. The decompression
option is used. Upto 2024 bytes larger files routines are faster than default ones.
than [default] will be the result, also a But it cannot be used for host/client transfer !
slower decompression speed can be expected.
--no-align This option disables CD mode 2 data sector format --no-align This option disables CD mode 2 data sector format
alignment, and enables "--console-run". alignment. May slightly improves the compression ratio,
This will slightly improve the compression ratio,
but the compressed executable will not boot from a CD. but the compressed executable will not boot from a CD.
So use it for client/target transfer only!. Use it for client/target transfer only !
@@ -829,10 +824,11 @@ The PE support in B<UPX> is quite stable now, but probably there are
still some incompabilities with some files. still some incompabilities with some files.
Because of the way B<UPX> (and other packers for this format) works, you Because of the way B<UPX> (and other packers for this format) works, you
can see increased memory usage of your compressed files. If you start can see increased memory usage of your compressed files because the whole
several instances of huge compressed programs you're wasting memory program is loaded into memory at startup.
because the common segements of the program won't get shared If you start several instances of huge compressed programs you're
across the instances. wasting memory because the common segements of the program won't
get shared across the instances.
On the other hand if you're compressing only smaller programs, or On the other hand if you're compressing only smaller programs, or
running only one instance of larger programs, then this penalty is running only one instance of larger programs, then this penalty is
smaller, but it's still there. smaller, but it's still there.
@@ -843,7 +839,7 @@ will load faster, and require less bandwidth during execution.
DLLs are supported. DLLs are supported.
Screensavers are supported, with the restriction that the filename Screensavers are supported, with the restriction that the filename
must end in ".scr" (as screensavers are handled slightly different must end with ".scr" (as screensavers are handled slightly different
than normal exe files). than normal exe files).
Extra options available for this executable format: Extra options available for this executable format:
@@ -869,6 +865,9 @@ Extra options available for this executable format:
unexpected value in a header field. unexpected value in a header field.
Use with care. Use with care.
--strip-loadconf=0 Don't strip Structured Exception Handling load config [DEFAULT].
--strip-loadconf=1 Strip Structured Exception Handling load config.
--strip-relocs=0 Don't strip relocation records. --strip-relocs=0 Don't strip relocation records.
--strip-relocs=1 Strip relocation records. [DEFAULT] --strip-relocs=1 Strip relocation records. [DEFAULT]
This option only works on executables with base This option only works on executables with base
@@ -921,13 +920,13 @@ Please report all bugs immediately to the authors.
=head1 COPYRIGHT =head1 COPYRIGHT
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2004 Laszlo Molnar Copyright (C) 1996-2005 Laszlo Molnar
Copyright (C) 2000-2004 John F. Reiser Copyright (C) 2000-2005 John F. Reiser
Copyright (C) 2002-2004 Jens Medoch Copyright (C) 2002-2005 Jens Medoch
This program may be used freely, and you are welcome to This program may be used freely, and you are welcome to
redistribute it under certain conditions. redistribute it under certain conditions.
+98 -42
View File
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w #! /usr/bin/perl -w
############################################################## ##############################################################
@@ -7,8 +7,8 @@
### ### ### ###
############################################################## ##############################################################
## $Revision: 2.55 $ ## $Revision: 2.58 $
## $Date: 2004/05/15 20:09:14 $ ## $Date: 2004/11/07 15:28:35 $
## $Author: fluffy $ ## $Author: fluffy $
## ##
@@ -17,8 +17,8 @@ use strict;
use File::Basename qw( fileparse ); use File::Basename qw( fileparse );
use Getopt::Long qw( GetOptions ); use Getopt::Long qw( GetOptions );
use Text::Wrap qw( ); use Text::Wrap qw( );
use User::pwent qw( getpwnam );
use Time::Local qw( timegm ); use Time::Local qw( timegm );
use User::pwent qw( getpwnam );
# The Plan: # The Plan:
# #
@@ -141,7 +141,7 @@ use Time::Local qw( timegm );
# Globals -------------------------------------------------------------------- # Globals --------------------------------------------------------------------
# In case we have to print it out: # In case we have to print it out:
my $VERSION = '$Revision: 2.55 $'; my $VERSION = '$Revision: 2.58 $';
$VERSION =~ s/\S+\s+(\S+)\s+\S+/$1/; $VERSION =~ s/\S+\s+(\S+)\s+\S+/$1/;
## Vars set by options: ## Vars set by options:
@@ -955,7 +955,20 @@ sub pretty_file_list {
# ------------------------------------- # -------------------------------------
sub output_tagdate { sub output_tagdate {
# NOT YET DONE my $self = shift;
my ($fh, $time, $tag) = @_;
my ($y, $m, $d, $H, $M, $S) = (gmtime($time))[5,4,3,2,1,0];
# Ideally, this would honor $UTC_Times and use +HH:MM syntax
my $isoDate = sprintf("%04d-%02d-%02dT%02d:%02d:%02dZ",
$y + 1900, $m + 1, $d, $H, $M, $S);
print $fh "<tagdate>\n";
print $fh "<tagisodate>$isoDate</tagisodate>\n";
print $fh "<tagdatetag>$tag</tagdatetag>\n";
print $fh "</tagdate>\n\n";
return;
} }
# ------------------------------------- # -------------------------------------
@@ -1051,11 +1064,6 @@ sub _revision_is_wanted {
my $follow_branches = $self->{follow_branches}; my $follow_branches = $self->{follow_branches};
my $follow_only = $self->{follow_only}; my $follow_only = $self->{follow_only};
#print STDERR "IG: ", join(',', keys %{$self->{ignore_tags}}), "\n";
#print STDERR "IX: ", join(',', @{$qunk->{tags}}), "\n" if defined $qunk->{tags};
#print STDERR "IQ: ", join(',', keys %{$qunk->{branch_numbers}}), "\n" if defined $qunk->{branch_numbers};
#use Data::Dumper; print STDERR Dumper $qunk;
for my $ignore_tag (keys %{$self->{ignore_tags}}) { for my $ignore_tag (keys %{$self->{ignore_tags}}) {
return return
if defined $qunk->{tags} and grep $_ eq $ignore_tag, @{$qunk->{tags}}; if defined $qunk->{tags} and grep $_ eq $ignore_tag, @{$qunk->{tags}};
@@ -1095,12 +1103,13 @@ sub _revision_is_wanted {
($branch_number . ".") ) { ($branch_number . ".") ) {
if ( $followsub ) { if ( $followsub ) {
return 1; return 1;
} elsif (length($revision) == length($branch_number)+2 ) { # } elsif ( length($revision) == length($branch_number)+2 ) {
} elsif ( substr($revision, length($branch_number)+1) =~ /^\d+$/ ) {
return 1; return 1;
} }
} elsif ( length($branch_number) > length($revision) } elsif ( length($branch_number) > length($revision)
and and
$No_Ancestors ) { ! $No_Ancestors ) {
# Non-trivial case: check if rev is ancestral to branch # Non-trivial case: check if rev is ancestral to branch
# r_left still has the trailing "." # r_left still has the trailing "."
@@ -1213,13 +1222,13 @@ my $self = shift; my $class = ref $self;
# XML output includes everything else, we might as well make # XML output includes everything else, we might as well make
# it always include Day Of Week too, for consistency. # it always include Day Of Week too, for consistency.
my $authorhash = $changelog{$time}; my $authorhash = $changelog{$time};
if ($Show_Tag_Dates) { if ( $Show_Tag_Dates || $XML_Output ) {
my %tags; my %tags;
while (my ($author,$mesghash) = each %$authorhash) { while (my ($author,$mesghash) = each %$authorhash) {
while (my ($msg,$qunk) = each %$mesghash) { while (my ($msg,$qunk) = each %$mesghash) {
foreach my $qunkref2 (@$qunk) { for my $qunkref2 (@$qunk) {
if (defined ($qunkref2->tags)) { if (defined ($qunkref2->tags)) {
foreach my $tag (@{$qunkref2->tags}) { for my $tag (@{$qunkref2->tags}) {
$tags{$tag} = 1; $tags{$tag} = 1;
} }
} }
@@ -1754,6 +1763,8 @@ sub files { wantarray ? @{$_[0]->{files}} : $_[0]->{files} }
package CVS::Utils::ChangeLog::FileEntry; package CVS::Utils::ChangeLog::FileEntry;
use File::Basename qw( fileparse );
# Each revision of a file has a little data structure (a `qunk') # Each revision of a file has a little data structure (a `qunk')
# associated with it. That data structure holds not only the # associated with it. That data structure holds not only the
# file's name, but any additional information about the file # file's name, but any additional information about the file
@@ -1922,23 +1933,40 @@ sub grand_poobah { $_[0]->{grand_poobah} }
sub read_changelog { sub read_changelog {
my ($self, $command) = @_; my ($self, $command) = @_;
# my $grand_poobah = CVS::Utils::ChangeLog::EntrySet->new; local (*READER, *WRITER);
my $pid;
if (! $Input_From_Stdin) { if (! $Input_From_Stdin) {
my $Log_Source_Command = join(' ', @$command); pipe(READER, WRITER)
&main::debug ("(run \"${Log_Source_Command}\")\n"); or die "Couldn't form pipe: $!\n";
open (LOG_SOURCE, "$Log_Source_Command |") $pid = fork;
or die "unable to run \"${Log_Source_Command}\""; die "Couldn't fork: $!\n"
if ! defined $pid;
if ( ! $pid ) { # child
open STDOUT, '>&=' . fileno WRITER
or die "Couldn't dup stderr to ", fileno WRITER, "\n";
# strangely, some perls give spurious warnings about STDIN being opened
# for output only these close calls precede the STDOUT reopen above.
# I think they must be reusing fd 1.
close READER;
close STDIN;
exec @$command;
}
close WRITER;
&main::debug ("(run \"@$command\")\n");
} }
else { else {
open (LOG_SOURCE, "-") or die "unable to open stdin for reading"; open READER, '-' or die "unable to open stdin for reading";
} }
binmode LOG_SOURCE; binmode READER;
XX_Log_Source: XX_Log_Source:
while (<LOG_SOURCE>) { while (<READER>) {
chomp; chomp;
s!\r$!!;
# If on a new file and don't see filename, skip until we find it, and # If on a new file and don't see filename, skip until we find it, and
# when we find it, grab it. # when we find it, grab it.
@@ -1964,17 +1992,19 @@ sub read_changelog {
# log message texts: # log message texts:
$self->{rev_msg} .= $_ . "\n"; # Normally, just accumulate the message... $self->{rev_msg} .= $_ . "\n"; # Normally, just accumulate the message...
} else { } else {
my $noadd = 0;
if ( ! $self->{rev_msg} if ( ! $self->{rev_msg}
or $self->{rev_msg} =~ /^\s*(\.\s*)?$/ or $self->{rev_msg} =~ /^\s*(\.\s*)?$/
or index($self->{rev_msg}, EMPTY_LOG_MESSAGE) > -1 ) { or index($self->{rev_msg}, EMPTY_LOG_MESSAGE) > -1 ) {
# ... until a msg separator is encountered: # ... until a msg separator is encountered:
# Ensure the message contains something: # Ensure the message contains something:
$self->clear_msg $self->clear_msg, $noadd = 1
if $Prune_Empty_Msgs; if $Prune_Empty_Msgs;
$self->{rev_msg} = "[no log message]\n"; $self->{rev_msg} = "[no log message]\n";
} }
$self->add_file_entry; $self->add_file_entry
unless $noadd;
if ( $_ eq FILE_SEPARATOR ) { if ( $_ eq FILE_SEPARATOR ) {
$self->clear_file; $self->clear_file;
@@ -1984,9 +2014,15 @@ sub read_changelog {
} }
} }
close LOG_SOURCE close READER
or die sprintf("Problem reading log input (exit/signal/core: %d/%d/%d)\n", or die "Couldn't close pipe reader: $!\n";
$? >> 8, $? & 127, $? & 128); if ( defined $pid ) {
my $rv;
waitpid $pid, 0;
0 == $?
or $!=1, die sprintf("Problem reading log input (pid/exit/signal/core: %d/%d/%d/%d)\n",
$pid, $? >> 8, $? & 127, $? & 128);
}
return; return;
} }
@@ -2123,9 +2159,8 @@ sub read_file_path {
($base, undef, undef) = fileparse($path); ($base, undef, undef) = fileparse($path);
my $xpath = $Case_Insensitive ? lc($path) : $path; my $xpath = $Case_Insensitive ? lc($path) : $path;
if ( grep index($path, $_) > -1, @Ignore_Files ) { return
return; if grep $path =~ /$_/, @Ignore_Files;
}
} }
$self->{filename} = $path; $self->{filename} = $path;
@@ -2208,10 +2243,11 @@ sub read_date_author_and_state {
if defined $Domain && $Domain ne ''; if defined $Domain && $Domain ne '';
my $pw = getpwnam($author); my $pw = getpwnam($author);
my ($fullname, $office, $workphone, $homephone); my ($fullname, $office, $workphone, $homephone, $gcos);
if ( defined $pw ) { if ( defined $pw ) {
$gcos = (getpwnam($author))[6];
($fullname, $office, $workphone, $homephone) = ($fullname, $office, $workphone, $homephone) =
split /\s*,\s*/, $pw->gecos; split /\s*,\s*/, $gcos;
} else { } else {
warn "Couldn't find gecos info for author '$author'\n" warn "Couldn't find gecos info for author '$author'\n"
unless $gecos_warned{$author}++; unless $gecos_warned{$author}++;
@@ -2282,18 +2318,22 @@ sub parse_date_author_and_state {
# Parses the date/time and author out of a line like: # Parses the date/time and author out of a line like:
# #
# date: 1999/02/19 23:29:05; author: apharris; state: Exp; # date: 1999/02/19 23:29:05; author: apharris; state: Exp;
#
# or, in CVS 1.12.9:
#
# date: 2004-06-05 16:10:32 +0000; author: somebody; state: Exp;
my ($year, $mon, $mday, $hours, $min, $secs, $utcOffset, $author, $state, $rest) = my ($year, $mon, $mday, $hours, $min, $secs, $utcOffset, $author, $state, $rest) =
$line =~ $line =~
m!(\d+)[-/](\d+)[-/](\d+) \s+ (\d+):(\d+):(\d+)(\s+[+-]\d{4})?;\s+ m!(\d+)[-/](\d+)[-/](\d+)\s+(\d+):(\d+):(\d+)(\s+[+-]\d{4})?;\s+
author:\s+([^;]+);\s+state:\s+([^;]+);(.*)!x author:\s+([^;]+);\s+state:\s+([^;]+);(.*)!x
or die "Couldn't parse date ``$line''"; or die "Couldn't parse date ``$line''";
die "Bad date or Y2K issues" die "Bad date or Y2K issues"
unless $year > 1969 and $year < 2258; unless $year > 1969 and $year < 2258;
# Kinda arbitrary, but useful as a sanity check # Kinda arbitrary, but useful as a sanity check
my $time = timegm($secs, $min, $hours, $mday, $mon-1, $year-1900); my $time = timegm($secs, $min, $hours, $mday, $mon-1, $year-1900);
if (defined $utcOffset) { if ( defined $utcOffset ) {
my ($plusminus, $hour, $minute) = $utcOffset =~ m/([+-])(\d\d)(\d\d)/; my ($plusminus, $hour, $minute) = ($utcOffset =~ m/([+-])(\d\d)(\d\d)/);
my $offset = (($hour * 60) + $minute) * 60 * ($plusminus eq '+' ? -1 : 1); my $offset = (($hour * 60) + $minute) * 60 * ($plusminus eq '+' ? -1 : 1);
$time += $offset; $time += $offset;
} }
@@ -2390,7 +2430,7 @@ sub derive_changelog {
my $accumulation_date = maybe_grab_accumulation_date; my $accumulation_date = maybe_grab_accumulation_date;
if ($accumulation_date) { if ($accumulation_date) {
# Insert -d immediately after 'cvs log' # Insert -d immediately after 'cvs log'
my $Log_Date_Command = "-d\'>${accumulation_date}\'"; my $Log_Date_Command = "-d>${accumulation_date}";
my ($log_index) = grep $command->[$_] eq 'log', 0..$#$command; my ($log_index) = grep $command->[$_] eq 'log', 0..$#$command;
splice @$command, $log_index+1, 0, $Log_Date_Command; splice @$command, $log_index+1, 0, $Log_Date_Command;
@@ -2447,6 +2487,7 @@ sub common_path_prefix {
} }
# ------------------------------------- # -------------------------------------
sub parse_options { sub parse_options {
# Check this internally before setting the global variable. # Check this internally before setting the global variable.
my $output_file; my $output_file;
@@ -2596,7 +2637,7 @@ sub parse_options {
) )
or die "options parsing failed\n"; or die "options parsing failed\n";
push @log_source_command, map "'$_'", @ARGV; push @log_source_command, map "$_", @ARGV;
## Check for contradictions... ## Check for contradictions...
@@ -2849,7 +2890,8 @@ times.
=item B<-I> I<REGEXP>, B<--ignore> I<REGEXP> =item B<-I> I<REGEXP>, B<--ignore> I<REGEXP>
Ignore files whose names match I<REGEXP>. This option may be used multiple Ignore files whose names match I<REGEXP>. This option may be used multiple
times. times. The regexp is a perl regular expression. It is matched as is; you may
want to prefix with a ^ or suffix with a $ to anchor the match.
=item B<-C>, B<--case-insensitive> =item B<-C>, B<--case-insensitive>
@@ -3029,6 +3071,14 @@ systems) for more information.
Note that the rules for quoting under windows shells are different. Note that the rules for quoting under windows shells are different.
=item *
To run in an automated environment such as CGI or PHP, suidperl may be needed
in order to execute as the correct user to enable /cvsroot read lock files to
be written for the 'cvs log' command. This is likely just a case of changing
the /usr/bin/perl command to /usr/bin/suidperl, and explicitly declaring the
PATH variable.
=back =back
=head1 EXAMPLES =head1 EXAMPLES
@@ -3090,6 +3140,8 @@ Contributions from
=item Terry Kane =item Terry Kane
=item Pete Kempf
=item Akos Kiss =item Akos Kiss
=item Claus Klein =item Claus Klein
@@ -3112,7 +3164,11 @@ Contributions from
=item Thomas Parmelan =item Thomas Parmelan
=item Johanne Stezenbach =item Jordan Russell
=item Jacek Sliwerski
=item Johannes Stezenbach
=item Joseph Walton =item Joseph Walton
+3 -3
View File
@@ -18,8 +18,8 @@ CXXFLAGS_W =
CXXFLAGS_M = CXXFLAGS_M =
CXXFLAGS_O = CXXFLAGS_O =
CFLAGS = $(CFLAGS_W) $(EXTRA_CFLAGS_W) $(CFLAGS_M) $(CFLAGS_O) $(EXTRA_CFLAGS_O) CFLAGS = $(call __mkflags,CFLAGS_W) $(call __mkflags,CFLAGS_M) $(call __mkflags,CFLAGS_O)
CXXFLAGS = $(CXXFLAGS_W) $(EXTRA_CXXFLAGS_W) $(CXXFLAGS_M) $(CXXFLAGS_O) $(EXTRA_CXXFLAGS_O) CXXFLAGS = $(call __mkflags,CXXFLAGS_W) $(call __mkflags,CXXFLAGS_M) $(call __mkflags,CXXFLAGS_O)
# #
@@ -29,7 +29,7 @@ CXXFLAGS = $(CXXFLAGS_W) $(EXTRA_CXXFLAGS_W) $(CXXFLAGS_M) $(CXXFLAGS_O) $(EXTR
##CFLAGS_WERROR = -Werror ##CFLAGS_WERROR = -Werror
CFLAGS_WERROR = CFLAGS_WERROR =
CFLAGS_W = $(CFLAGS_WERROR) -Wall -W -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wwrite-strings CFLAGS_W = $(CFLAGS_WERROR) -Wall -W -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wwrite-strings
CXXFLAGS_W = $(CFLAGS_WERROR) -Wall -W -Wcast-align -Wcast-qual -Winline -Woverloaded-virtual -Wpointer-arith -Wshadow -Wsign-promo -Wsynth -Wwrite-strings CXXFLAGS_W = $(CFLAGS_WERROR) -Wall -W -Wcast-align -Wcast-qual -Winline -Woverloaded-virtual -Wpointer-arith -Wshadow -Wsign-promo -Wwrite-strings
##CFLAGS_M += -fno-builtin ##CFLAGS_M += -fno-builtin
##CFLAGS_M += -malign-functions=0 -malign-jumps=0 -malign-loops=0 ##CFLAGS_M += -malign-functions=0 -malign-jumps=0 -malign-loops=0
+4 -2
View File
@@ -25,7 +25,7 @@
ifeq ($(strip $(UCLDIR)),) ifeq ($(strip $(UCLDIR)),)
# change this to reflect where the UCL library is # change this to reflect where the UCL library is
UCLDIR = $(HOME)/local/src/ucl-1.02 UCLDIR = $(HOME)/local/src/ucl-1.03
endif endif
## you can set the default target here ## you can set the default target here
@@ -52,7 +52,7 @@ OBJECTS1 = \
p_com$o p_djgpp2$o p_elks$o p_exe$o \ p_com$o p_djgpp2$o p_elks$o p_exe$o \
p_lx_elf$o p_lx_exc$o p_lx_sep$o p_lx_sh$o \ p_lx_elf$o p_lx_exc$o p_lx_sep$o p_lx_sh$o \
p_ps1$o p_sys$o p_tmt$o p_tos$o \ p_ps1$o p_sys$o p_tmt$o p_tos$o \
p_unix$o p_vmlinz$o p_w16ne$o p_w32pe$o p_wcle$o p_unix$o p_vmlinz$o p_vmlinx$o p_w16ne$o p_w32pe$o p_wcle$o
# no exceptions or RTTI # no exceptions or RTTI
OBJECTS2 = \ OBJECTS2 = \
@@ -83,4 +83,6 @@ include $(srcdir)/Makefile.bld
include $(srcdir)/Makedefs.dep include $(srcdir)/Makedefs.dep
$(OBJECTS): miniacc.h
# vi:nowrap # vi:nowrap
+20 -17
View File
@@ -1,5 +1,5 @@
# /*********************************************************************** # /***********************************************************************
# // perpare setup # // prepare setup
# ************************************************************************/ # ************************************************************************/
SHELL = /bin/sh SHELL = /bin/sh
@@ -38,6 +38,9 @@ endif
# util var for use in the rules - basename of the current target # util var for use in the rules - basename of the current target
override T = $(basename $@) override T = $(basename $@)
# expand "VAR" into "$(VAR) $(EXTRA_VAR) $(UPX_EXTRA_VAR)"
override __mkflags = $(strip $($(1)) $(EXTRA_$(1)) $(UPX_EXTRA_$(1)))
# /*********************************************************************** # /***********************************************************************
# // compiler defaults # // compiler defaults
@@ -45,9 +48,9 @@ override T = $(basename $@)
CC_SRC = $< CC_SRC = $<
CXX_SRC = $< CXX_SRC = $<
CC_COMPILE = $(CC) $(CCARCH) $(DEFS) $(EXTRA_DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_OUTPUT) -c $(CC_SRC) CC_COMPILE = $(CC) $(CCARCH) $(call __mkflags,DEFS) $(call __mkflags,INCLUDES) $(call __mkflags,CFLAGS) $(CFLAGS_OUTPUT) -c $(CC_SRC)
CXX_COMPILE = $(CXX) $(CXXARCH) $(DEFS) $(EXTRA_DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(CXXFLAGS_OUTPUT) -c $(CXX_SRC) CXX_COMPILE = $(CXX) $(CXXARCH) $(call __mkflags,DEFS) $(call __mkflags,INCLUDES) $(call __mkflags,CXXFLAGS) $(CXXFLAGS_OUTPUT) -c $(CXX_SRC)
CXX_LINK_EXE = $(CXXLD) $(CXXLDARCH) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LINK_EXE_OUTPUT) $^ $(LDLIBS) $(EXTRA_LDLIBS) $(LINK_EXE_LDFLAGS) CXX_LINK_EXE = $(CXXLD) $(CXXLDARCH) $(call __mkflags,LDFLAGS) $(LINK_EXE_OUTPUT) $^ $(call __mkflags,LDLIBS)
STUBEDIT_EXE = STUBEDIT_EXE =
STUBIFY_EXE = STUBIFY_EXE =
CHMOD_EXE = CHMOD_EXE =
@@ -440,14 +443,14 @@ LINK_EXE_OUTPUT = -Fe$@
LINK_EXE_LDFLAGS = /link /map:$T.map LINK_EXE_LDFLAGS = /link /map:$T.map
##LINK_EXE_LDFLAGS += /verbose ##LINK_EXE_LDFLAGS += /verbose
ifeq (1,2) ifeq (1,2)
# statically link libc.lib # statically link libcmt.lib
CC += -ML CC += -MT
## DOS_LDLIBS := $(DOS_LDLIBS:.lib=_ml.lib) ## DOS_LDLIBS := $(DOS_LDLIBS:.lib=_ml.lib)
else else
# link against msvcrt.dll # link against msvcrt.dll
CC += -MD CC += -MD
endif endif
LDLIBS = $(DOS_LDLIBS) setargv.obj LDLIBS = $(DOS_LDLIBS)
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
CFLAGS += -Od -ZI CFLAGS += -Od -ZI
LINK_EXE_LDFLAGS += /debug LINK_EXE_LDFLAGS += /debug
@@ -521,14 +524,14 @@ LINK_EXE_OUTPUT = -Fe$@
LINK_EXE_LDFLAGS = /link /map:$T.map LINK_EXE_LDFLAGS = /link /map:$T.map
##LINK_EXE_LDFLAGS += /verbose ##LINK_EXE_LDFLAGS += /verbose
ifeq (1,1) ifeq (1,1)
# statically link libc.lib # statically link libcmt.lib
CC += -ML CC += -MT
## DOS_LDLIBS := $(DOS_LDLIBS:.lib=_ml.lib) ## DOS_LDLIBS := $(DOS_LDLIBS:.lib=_ml.lib)
else else
# link against msvcrt.dll # link against msvcrt.dll
CC += -MD CC += -MD
endif endif
LDLIBS = $(DOS_LDLIBS) setargv.obj LDLIBS = $(DOS_LDLIBS)
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
CFLAGS += -Od -ZI CFLAGS += -Od -ZI
LINK_EXE_LDFLAGS += /debug LINK_EXE_LDFLAGS += /debug
@@ -590,14 +593,14 @@ LINK_EXE_OUTPUT = -Fe$@
LINK_EXE_LDFLAGS = /link /map:$T.map LINK_EXE_LDFLAGS = /link /map:$T.map
##LINK_EXE_LDFLAGS += /verbose ##LINK_EXE_LDFLAGS += /verbose
ifeq (1,2) ifeq (1,2)
# statically link libc.lib # statically link libcmt.lib
CC += -ML CC += -MT
## DOS_LDLIBS := $(DOS_LDLIBS:.lib=_ml.lib) ## DOS_LDLIBS := $(DOS_LDLIBS:.lib=_ml.lib)
else else
# link against msvcrt.dll # link against msvcrt.dll
CC += -MD CC += -MD
endif endif
LDLIBS = $(DOS_LDLIBS) setargv.obj LDLIBS = $(DOS_LDLIBS)
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
CFLAGS += -Od -ZI CFLAGS += -Od -ZI
LINK_EXE_LDFLAGS += /debug LINK_EXE_LDFLAGS += /debug
@@ -618,21 +621,21 @@ o = .obj
a = .lib a = .lib
e = .exe e = .exe
CC = cl -nologo CC = cl -nologo
CFLAGS = -W4 CFLAGS = -W4 -Wall
CXXFLAGS = $(CFLAGS) -EHac -GR CXXFLAGS = $(CFLAGS) -EHac -GR
LDFLAGS = LDFLAGS =
LINK_EXE_OUTPUT = -Fe$@ LINK_EXE_OUTPUT = -Fe$@
LINK_EXE_LDFLAGS = /link /map:$T.map LINK_EXE_LDFLAGS = /link /map:$T.map
##LINK_EXE_LDFLAGS += /verbose ##LINK_EXE_LDFLAGS += /verbose
ifeq (1,1) ifeq (1,1)
# statically link libc.lib # statically link libcmt.lib
CC += -ML CC += -MT
## DOS_LDLIBS := $(DOS_LDLIBS:.lib=_ml.lib) ## DOS_LDLIBS := $(DOS_LDLIBS:.lib=_ml.lib)
else else
# link against msvcrt.dll # link against msvcrt.dll
CC += -MD CC += -MD
endif endif
LDLIBS = $(DOS_LDLIBS) setargv.obj LDLIBS = $(DOS_LDLIBS)
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
CFLAGS += -Od -ZI CFLAGS += -Od -ZI
LINK_EXE_LDFLAGS += /debug LINK_EXE_LDFLAGS += /debug
-1
View File
@@ -1 +0,0 @@
GNUmakefile
-340
View File
@@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
-91
View File
@@ -1,91 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*
* Possible configuration values:
*
* ACC_CONFIG_NO_HEADER
* ACC_CONFIG_HEADER if given, then use this as <config.h>
* ACC_CONFIG_INCLUDE include path to acc_ files
*
* ACC_CONFIG_PREFER___INT64 [acc_type.h]
*/
#ifndef __ACC_H_INCLUDED
#define __ACC_H_INCLUDED 1
#define ACC_VERSION 20040623L
#if !defined(ACC_CONFIG_INCLUDE)
# define ACC_CONFIG_INCLUDE(file) file
#endif
#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
# define __CYGWIN__ __CYGWIN32__
#endif
#if defined(__IBMCPP__) && !defined(__IBMC__)
# define __IBMC__ __IBMCPP__
#endif
#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER)
# define __INTEL_COMPILER __ICL
#endif
/* disable pedantic warnings for undefined preprocessing symbols */
#if defined(__INTEL_COMPILER) && defined(__linux__)
# pragma warning(disable: 193)
#endif
#if defined(__KEIL__) && defined(__C166__)
# pragma warning disable = 322
#elif 0 && defined(__C251__)
# pragma warning disable = 322
#endif
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
# if (_MSC_VER >= 1300)
# pragma warning(disable: 4668)
# endif
#endif
#if 0 && defined(__WATCOMC__)
# if (__WATCOMC__ < 1060)
# pragma warning 203 9
# endif
#endif
#include <limits.h>
#include ACC_CONFIG_INCLUDE("acc_init.h")
#include ACC_CONFIG_INCLUDE("acc_os.h")
#include ACC_CONFIG_INCLUDE("acc_cc.h")
#include ACC_CONFIG_INCLUDE("acc_arch.h")
#include ACC_CONFIG_INCLUDE("acc_mm.h")
#include ACC_CONFIG_INCLUDE("acc_defs.h")
#if defined(ACC_CONFIG_NO_HEADER)
#elif defined(ACC_CONFIG_HEADER)
# include ACC_CONFIG_HEADER
#else
# include ACC_CONFIG_INCLUDE("acc_auto.h")
#endif
#include ACC_CONFIG_INCLUDE("acc_type.h")
#endif /* already included */
/*
vi:ts=4:et
*/
-124
View File
@@ -1,124 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*
* CPU architecture - exactly one of:
*
* ACC_ARCH_UNKNOWN [default]
* ACC_ARCH_ALPHA
* ACC_ARCH_AMD64 aka x86-64 or ia32e
* ACC_ARCH_C166
* ACC_ARCH_IA16 Intel Architecture (8088, 8086, 80186, 80286)
* ACC_ARCH_IA32 Intel Architecture (80386+)
* ACC_ARCH_IA64 Intel Architecture (Itanium)
* ACC_ARCH_M68K Motorola 680x0
* ACC_ARCH_MCS251
* ACC_ARCH_MCS51
* ACC_ARCH_PPC64 Power PC
* ACC_ARCH_SPARC64
*
* Optionally define one of:
* ACC_ENDIAN_LITTLE_ENDIAN
* ACC_ENDIAN_BIG_ENDIAN
*
* Note that this list is not exhaustive - actually we only really care
* about architectures which allow unaligned memory access at reasonable
* speed (for the moment this means IA16, IA32 and AMD64).
*/
#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
# define ACC_ARCH_IA16 1
# define ACC_INFO_ARCH "ia16"
#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
# define ACC_ARCH_AMD64 1
# define ACC_INFO_ARCH "amd64"
#elif (UINT_MAX <= ACC_0xffffL) && defined(__AVR__)
# define ACC_ARCH_AVR 1
# define ACC_INFO_ARCH "avr"
#elif (UINT_MAX == ACC_0xffffL) && defined(__C166__)
# define ACC_ARCH_C166 1
# define ACC_INFO_ARCH "c166"
#elif (UINT_MAX == ACC_0xffffL) && defined(__C251__)
# define ACC_ARCH_MCS251 1
# define ACC_INFO_ARCH "mcs-251"
#elif (UINT_MAX == ACC_0xffffL) && defined(__C51__)
# define ACC_ARCH_MCS51 1
# define ACC_INFO_ARCH "mcs-51"
#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
# define ACC_ARCH_IA32 1
# define ACC_INFO_ARCH "ia32"
#elif (ACC_CC_ZORTECHC && defined(__I86__))
# define ACC_ARCH_IA32 1
# define ACC_INFO_ARCH "ia32"
#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
# define ACC_ARCH_IA64 1
# define ACC_INFO_ARCH "ia64"
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC) && defined(_I386)
# define ACC_ARCH_IA32 1
# define ACC_INFO_ARCH "ia32"
#elif (ACC_OS_DOS32 || ACC_OS_OS2)
# error "missing define for CPU architecture"
#elif (ACC_OS_WIN32)
# error "missing define for CPU architecture"
#elif (ACC_OS_WIN64)
/* # error "missing define for CPU architecture" */
#elif (ACC_OS_TOS) || defined(__m68000__)
# define ACC_ARCH_M68K 1
# define ACC_INFO_ARCH "m68k"
#elif defined(__alpha__) || defined(__alpha)
# define ACC_ARCH_ALPHA 1
# define ACC_INFO_ARCH "alpha"
#elif defined(__ppc64__) || defined(__ppc64)
# define ACC_ARCH_PPC64 1
# define ACC_INFO_ARCH "ppc64"
#elif defined(__sparc64__) || defined(__sparc64)
# define ACC_ARCH_SPARC64 1
# define ACC_INFO_ARCH "sparc64"
#else
# define ACC_ARCH_UNKNOWN 1
# define ACC_INFO_ARCH "unknown"
#endif
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA16 || ACC_ARCH_IA32)
# define ACC_ENDIAN_LITTLE_ENDIAN 1
# define ACC_INFO_ENDIAN "little-endian"
#elif (ACC_ARCH_M68K)
# define ACC_ENDIAN_BIG_ENDIAN 1
# define ACC_INFO_ENDIAN "big-endian"
#endif
#if (ACC_ARCH_IA16)
# if (UINT_MAX != ACC_0xffffL)
# error "this should not happen"
# endif
# if (ULONG_MAX != ACC_0xffffffffL)
# error "this should not happen"
# endif
#endif
#if (ACC_ARCH_IA32)
# if (UINT_MAX != ACC_0xffffffffL)
# error "this should not happen"
# endif
# if (ULONG_MAX != ACC_0xffffffffL)
# error "this should not happen"
# endif
#endif
/*
vi:ts=4:et
*/
-652
View File
@@ -1,652 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*
* Possible configuration values:
*
* ACC_CONFIG_AUTO_NO_HEADERS
* ACC_CONFIG_AUTO_NO_FUNCTIONS
* ACC_CONFIG_AUTO_NO_SIZES
*/
/*************************************************************************
// Checks for <stdint.h>
**************************************************************************/
#if !defined(ACC_CONFIG_AUTO_NO_HEADERS)
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
# if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
# define HAVE_STDINT_H 1
# endif
#elif defined(__dietlibc__)
# undef HAVE_STDINT_H /* incomplete */
#elif (ACC_CC_BORLANDC) && (__BORLANDC__ >= 0x560)
# undef HAVE_STDINT_H /* broken & incomplete */
#elif (ACC_CC_DMC) && (__DMC__ >= 0x825)
# define HAVE_STDINT_H 1
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#endif
#endif /* !defined(ACC_CONFIG_AUTO_NO_HEADERS) */
/*************************************************************************
// Checks for header files
**************************************************************************/
#if !defined(ACC_CONFIG_AUTO_NO_HEADERS)
#define STDC_HEADERS 1
#define HAVE_ASSERT_H 1
#define HAVE_CTYPE_H 1
#define HAVE_DIRENT_H 1
#define HAVE_ERRNO_H 1
#define HAVE_FCNTL_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MALLOC_H 1
#define HAVE_MEMORY_H 1
#define HAVE_SETJMP_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UTIME_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#undef HAVE_ALLOCA_H
#undef HAVE_CONIO_H
#undef HAVE_DIRECT_H
#undef HAVE_DOS_H
#undef HAVE_IO_H
#undef HAVE_SHARE_H
#undef HAVE_STDINT_H
#undef HAVE_STRINGS_H
#undef HAVE_SYS_UTIME_H
#if (ACC_OS_POSIX)
# define HAVE_STRINGS_H 1
# if (ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_MACOSX || ACC_OS_POSIX_OPENBSD)
# undef HAVE_MALLOC_H /* deprecated */
# elif (ACC_OS_POSIX_HPUX)
# define HAVE_ALLOCA_H 1
# endif
# if (ACC_OS_POSIX_MACOSX && ACC_CC_MWERKS) && defined(__MSL__)
/* FIXME ??? */
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H
# endif
#elif (ACC_OS_CYGWIN)
# define HAVE_IO_H 1
#elif (ACC_OS_EMX)
# define HAVE_ALLOCA_H 1
# define HAVE_IO_H 1
#elif (ACC_OS_TOS && ACC_CC_GNUC)
# if !defined(__MINT__)
# undef HAVE_MALLOC_H
# endif
#elif (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
# undef HAVE_DIRENT_H
# undef HAVE_FCNTL_H
# undef HAVE_MALLOC_H
# undef HAVE_MEMORY_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_STAT_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H
#endif
/* DOS, OS/2 & Windows */
#if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
#define HAVE_CONIO_H 1
#define HAVE_DIRECT_H 1
#define HAVE_DOS_H 1
#define HAVE_IO_H 1
#define HAVE_SHARE_H 1
#if (ACC_CC_AZTECC)
# undef HAVE_CONIO_H
# undef HAVE_DIRECT_H
# undef HAVE_DIRENT_H
# undef HAVE_MALLOC_H
# undef HAVE_SHARE_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_STAT_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H
#elif (ACC_CC_BORLANDC)
# undef HAVE_UNISTD_H
# undef HAVE_SYS_TIME_H
# if (ACC_OS_WIN32 || ACC_OS_WIN64)
# undef HAVE_DIRENT_H /* pulls in <windows.h>; use <dir.h> instead */
# endif
# if (__BORLANDC__ < 0x0400)
# undef HAVE_DIRENT_H
# undef HAVE_UTIME_H
# endif
#elif (ACC_CC_DMC)
# undef HAVE_DIRENT_H /* not working */
# undef HAVE_UNISTD_H /* not working */
# define HAVE_SYS_DIRENT_H 1
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
# define HAVE_ALLOCA_H 1
# undef HAVE_DIRENT_H
# undef HAVE_UNISTD_H
#elif (ACC_CC_IBMC && ACC_OS_OS2)
# undef HAVE_DOS_H
# undef HAVE_DIRENT_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
# define HAVE_SYS_UTIME_H 1
#elif (ACC_CC_INTELC || ACC_CC_MSC)
# undef HAVE_DIRENT_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
# define HAVE_SYS_UTIME_H 1
#elif (ACC_CC_LCC)
# undef HAVE_DIRENT_H
# undef HAVE_DOS_H
# undef HAVE_SYS_TIME_H
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
# undef HAVE_UTIME_H
# define HAVE_SYS_UTIME_H 1
#elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
# define HAVE_ALLOCA_H 1
# undef HAVE_DOS_H
# undef HAVE_SHARE_H
# undef HAVE_SYS_TIME_H
#elif (ACC_CC_NDPC)
# undef HAVE_DIRENT_H
# undef HAVE_DOS_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
#elif (ACC_CC_PACIFICC)
# undef HAVE_DIRECT_H
# undef HAVE_DIRENT_H
# undef HAVE_FCNTL_H
# undef HAVE_IO_H
# undef HAVE_MALLOC_H
# undef HAVE_MEMORY_H
# undef HAVE_SHARE_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_STAT_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H
#elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
# undef HAVE_DIRENT_H
# undef HAVE_DOS_H
# undef HAVE_MALLOC_H
# undef HAVE_SHARE_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
# if (__POCC__ < 280)
# else
# define HAVE_SYS_UTIME_H 1
# endif
#elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
# undef HAVE_UTIME_H
# define HAVE_SYS_UTIME_H 1
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
#elif (ACC_CC_SYMANTECC)
# undef HAVE_DIRENT_H /* opendir() not implemented in libc */
# undef HAVE_UNISTD_H /* not working */
# if (__SC__ < 0x700)
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
# endif
#elif (ACC_CC_TOPSPEEDC)
# undef HAVE_DIRENT_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_STAT_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H
#elif (ACC_CC_TURBOC)
# undef HAVE_UNISTD_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H /* useless */
# if (ACC_OS_WIN32 || ACC_OS_WIN64)
# undef HAVE_DIRENT_H /* pulls in <windows.h>; use <dir.h> instead */
# endif
# if (__TURBOC__ < 0x0200)
# undef HAVE_SIGNAL_H /* not working */
# endif
# if (__TURBOC__ < 0x0400)
# undef HAVE_DIRECT_H
# undef HAVE_DIRENT_H
# undef HAVE_MALLOC_H
# undef HAVE_MEMORY_H
# undef HAVE_UTIME_H
# endif
#elif (ACC_CC_WATCOMC)
# undef HAVE_DIRENT_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
# define HAVE_SYS_UTIME_H 1
# if (__WATCOMC__ < 950)
# undef HAVE_UNISTD_H
# endif
#elif (ACC_CC_ZORTECHC)
# undef HAVE_DIRENT_H
# undef HAVE_MEMORY_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
#endif
#endif /* DOS, OS/2 & Windows */
#if (HAVE_SYS_TIME_H && HAVE_TIME_H)
# define TIME_WITH_SYS_TIME 1
#endif
#endif /* !defined(ACC_CONFIG_AUTO_NO_HEADERS) */
/*************************************************************************
// Checks for library functions
**************************************************************************/
#if !defined(ACC_CONFIG_AUTO_NO_FUNCTIONS)
#define HAVE_ACCESS 1
#define HAVE_ALLOCA 1
#define HAVE_ATEXIT 1
#define HAVE_ATOI 1
#define HAVE_ATOL 1
#define HAVE_CHMOD 1
#define HAVE_CHOWN 1
#define HAVE_CTIME 1
#define HAVE_DIFFTIME 1
#define HAVE_FILENO 1
#define HAVE_FSTAT 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GMTIME 1
#define HAVE_LOCALTIME 1
#define HAVE_LONGJMP 1
#define HAVE_LSTAT 1
#define HAVE_MEMCMP 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMSET 1
#define HAVE_MKTIME 1
#define HAVE_QSORT 1
#define HAVE_RAISE 1
#define HAVE_SETJMP 1
#define HAVE_SIGNAL 1
#define HAVE_SNPRINTF 1
#define HAVE_STAT 1
#define HAVE_STRCHR 1
#define HAVE_STRDUP 1
#define HAVE_STRERROR 1
#define HAVE_STRFTIME 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_TIME 1
#define HAVE_UMASK 1
#define HAVE_UTIME 1
#define HAVE_VSNPRINTF 1
#if (ACC_OS_BEOS || ACC_OS_CYGWIN || ACC_OS_POSIX || ACC_OS_QNX)
# define HAVE_STRCASECMP 1
# define HAVE_STRNCASECMP 1
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
# define HAVE_STRCASECMP 1
# define HAVE_STRNCASECMP 1
#else
# define HAVE_STRICMP 1
# define HAVE_STRNICMP 1
#endif
#if (ACC_OS_POSIX)
# if (ACC_CC_TINYC)
# undef HAVE_ALLOCA
# elif defined(__dietlibc__)
# endif
# if (ACC_OS_POSIX_MACOSX && ACC_CC_MWERKS) && defined(__MSL__)
/* FIXME ??? */
# undef HAVE_CHOWN
# undef HAVE_LSTAT
# endif
#elif (ACC_OS_CYGWIN)
# if (ACC_CC_GNUC < 0x025a00ul)
# undef HAVE_GETTIMEOFDAY
# undef HAVE_LSTAT
# endif
# if (ACC_CC_GNUC < 0x025f00ul)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# endif
#elif (ACC_OS_EMX)
# undef HAVE_CHOWN
# undef HAVE_LSTAT
#elif (ACC_OS_TOS && ACC_CC_GNUC)
# if !defined(__MINT__)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# endif
#elif (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
# undef HAVE_ALLOCA
# undef HAVE_ACCESS
# undef HAVE_CHMOD
# undef HAVE_CHOWN
# undef HAVE_FSTAT
# undef HAVE_GETTIMEOFDAY
# undef HAVE_LSTAT
# undef HAVE_SNPRINTF
# undef HAVE_UMASK
# undef HAVE_UTIME
# undef HAVE_VSNPRINTF
#endif
/* DOS, OS/2 & Windows */
#if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
#undef HAVE_CHOWN
#undef HAVE_GETTIMEOFDAY
#undef HAVE_LSTAT
#undef HAVE_UMASK
#if (ACC_CC_AZTECC)
# undef HAVE_ALLOCA
# undef HAVE_DIFFTIME /* difftime() is in the math library */
# undef HAVE_FSTAT
# undef HAVE_STRDUP /* missing in 5.2a */
# undef HAVE_SNPRINTF
# undef HAVE_UTIME /* struct utimbuf is missing */
# undef HAVE_VSNPRINTF
#elif (ACC_CC_BORLANDC)
# if (__BORLANDC__ < 0x0400)
# undef HAVE_ALLOCA
# undef HAVE_UTIME
# endif
# if ((__BORLANDC__ < 0x0410) && ACC_OS_WIN16)
# undef HAVE_ALLOCA
# endif
# if (__BORLANDC__ < 0x0550)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# endif
#elif (ACC_CC_DMC)
# if (ACC_OS_WIN16)
# undef HAVE_ALLOCA
# endif
# define snprintf _snprintf
# define vsnprintf _vsnprintf
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
#elif (ACC_CC_IBMC)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
#elif (ACC_CC_INTELC)
# define snprintf _snprintf
# define vsnprintf _vsnprintf
#elif (ACC_CC_LCC)
# define utime _utime
#elif (ACC_CC_MSC)
# if (_MSC_VER < 600)
# undef HAVE_STRFTIME
# endif
# if (_MSC_VER < 700)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# else
# define snprintf _snprintf
# define vsnprintf _vsnprintf
# endif
# if ((_MSC_VER < 800) && ACC_OS_WIN16)
# undef HAVE_ALLOCA
# endif
# if (_MSC_VER < 1000) && defined(__cplusplus)
# undef HAVE_SETJMP
# endif
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
# if (ACC_CC_GNUC < 0x025f00ul)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# else
# define snprintf _snprintf
# define vsnprintf _vsnprintf
# endif
#elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
# if (__MSL__ < 0x8000ul)
# undef HAVE_CHMOD /* <unix.h> which in turn pulls in <windows.h> */
# endif
#elif (ACC_CC_NDPC)
# undef HAVE_ALLOCA
# undef HAVE_SNPRINTF
# undef HAVE_STRNICMP
# undef HAVE_UTIME
# undef HAVE_VSNPRINTF
# if defined(__cplusplus)
# undef HAVE_STAT
# endif
#elif (ACC_CC_PACIFICC)
# undef HAVE_ACCESS
# undef HAVE_ALLOCA
# undef HAVE_CHMOD
# undef HAVE_DIFFTIME
# undef HAVE_FSTAT
# undef HAVE_MKTIME
# undef HAVE_RAISE
# undef HAVE_SNPRINTF
# undef HAVE_STRFTIME
# undef HAVE_UTIME
# undef HAVE_VSNPRINTF
#elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
# if (__POCC__ < 280)
# define alloca _alloca
# undef HAVE_UTIME
# endif
#elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
# define snprintf _snprintf
# define vsnprintf _vsnprintf
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
#elif (ACC_CC_SYMANTECC)
# if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
# undef HAVE_ALLOCA
# endif
# if (__SC__ < 0x600)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# else
# define snprintf _snprintf
# define vsnprintf _vsnprintf
# endif
# if (__SC__ < 0x700)
# undef HAVE_DIFFTIME /* difftime() is broken */
# undef HAVE_UTIME /* struct utimbuf is missing */
# endif
#elif (ACC_CC_TOPSPEEDC)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
#elif (ACC_CC_TURBOC)
# undef HAVE_ALLOCA
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# if (__TURBOC__ < 0x0200)
# undef HAVE_RAISE
# undef HAVE_SIGNAL
# endif
# if (__TURBOC__ < 0x0295)
# undef HAVE_MKTIME
# undef HAVE_STRFTIME
# endif
# if (__TURBOC__ < 0x0400)
# undef HAVE_UTIME
# endif
#elif (ACC_CC_WATCOMC)
# if (__WATCOMC__ < 1100)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# else
# define snprintf _snprintf
# define vsnprintf _vsnprintf
# endif
#elif (ACC_CC_ZORTECHC)
# if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
# undef HAVE_ALLOCA
# endif
# undef HAVE_DIFFTIME /* difftime() is broken */
# undef HAVE_SNPRINTF
# undef HAVE_UTIME /* struct utimbuf is missing */
# undef HAVE_VSNPRINTF
#endif
#endif /* DOS, OS/2 & Windows */
#endif /* !defined(ACC_CONFIG_AUTO_NO_FUNCTIONS) */
/*************************************************************************
// Checks for sizes
**************************************************************************/
#if !defined(ACC_CONFIG_AUTO_NO_SIZES)
#define SIZEOF_SHORT (__ACC_SHORT_BIT / 8)
#define SIZEOF_INT (__ACC_INT_BIT / 8)
#define SIZEOF_LONG (__ACC_LONG_BIT / 8)
#if (ACC_OS_WIN64) /* LLP64 programming model */
# define SIZEOF_PTRDIFF_T 8
# define SIZEOF_SIZE_T 8
# define SIZEOF_VOID_P 8
#elif (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
# define SIZEOF_SIZE_T 2
# if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
# define SIZEOF_VOID_P 2
# elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
# define SIZEOF_VOID_P 4
# else
# error "ACC_MM"
# endif
# if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
# define SIZEOF_PTRDIFF_T 2
# elif (ACC_MM_COMPACT || ACC_MM_LARGE)
# if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
# define SIZEOF_PTRDIFF_T 4
# else
# define SIZEOF_PTRDIFF_T 2
# endif
# elif (ACC_MM_HUGE)
# define SIZEOF_PTRDIFF_T 4
# else
# error "ACC_MM"
# endif
#elif (ACC_ARCH_AVR || ACC_ARCH_C166 || ACC_ARCH_MCS51 || ACC_ARCH_MCS251)
# define SIZEOF_PTRDIFF_T 2
# define SIZEOF_SIZE_T 2
# define SIZEOF_VOID_P 2
#else
# define SIZEOF_PTRDIFF_T SIZEOF_LONG
# define SIZEOF_SIZE_T SIZEOF_LONG
# define SIZEOF_VOID_P SIZEOF_LONG
#endif
#if !defined(SIZEOF_CHAR_P) && (SIZEOF_VOID_P > 0)
# define SIZEOF_CHAR_P SIZEOF_VOID_P
#endif
#if ((SIZEOF_LONG) > 0 && (SIZEOF_LONG) < 8)
#if (ACC_CC_GNUC)
# define SIZEOF_LONG_LONG 8
# define SIZEOF_UNSIGNED_LONG_LONG 8
#elif (ACC_OS_WIN64)
# define SIZEOF___INT64 8
# define SIZEOF_UNSIGNED___INT64 8
#elif (ACC_ARCH_IA32 && (ACC_CC_DMC))
# define SIZEOF_LONG_LONG 8
# define SIZEOF_UNSIGNED_LONG_LONG 8
#elif (ACC_ARCH_IA32 && (ACC_CC_SYMANTECC && __SC__ >= 0x700))
# define SIZEOF_LONG_LONG 8
# define SIZEOF_UNSIGNED_LONG_LONG 8
#elif (ACC_ARCH_IA32 && (ACC_CC_INTELC && defined(__linux__)))
# define SIZEOF_LONG_LONG 8
# define SIZEOF_UNSIGNED_LONG_LONG 8
#elif (ACC_ARCH_IA32 && (ACC_CC_MWERKS || ACC_CC_PELLESC || ACC_CC_PGI))
# define SIZEOF_LONG_LONG 8
# define SIZEOF_UNSIGNED_LONG_LONG 8
#elif (ACC_ARCH_IA32 && (ACC_CC_INTELC || ACC_CC_MSC))
# define SIZEOF___INT64 8
# define SIZEOF_UNSIGNED___INT64 8
#elif (ACC_ARCH_IA32 && (ACC_CC_BORLANDC && __BORLANDC__ >= 0x0520))
/* INFO: unsigned __int64 is somewhat broken in 0x0520; fixed in 0x0530 */
# define SIZEOF___INT64 8
# define SIZEOF_UNSIGNED___INT64 8
#elif (ACC_ARCH_IA32 && (ACC_CC_WATCOMC && __WATCOMC__ >= 1100))
# define SIZEOF___INT64 8
# define SIZEOF_UNSIGNED___INT64 8
#elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
# define SIZEOF___INT64 8
# define SIZEOF_UNSIGNED___INT64 8
#endif
#endif
#if defined(__cplusplus) && defined(ACC_CC_GNUC)
# if (ACC_CC_GNUC < 0x020800ul)
# undef SIZEOF_LONG_LONG
# undef SIZEOF_UNSIGNED_LONG_LONG
# endif
#endif
#endif /* !defined(ACC_CONFIG_AUTO_NO_SIZES) */
/*************************************************************************
// misc
**************************************************************************/
#if defined(HAVE_SIGNAL) && !defined(RETSIGTYPE)
# define RETSIGTYPE void
#endif
/*
vi:ts=4:et
*/
-139
View File
@@ -1,139 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*
* C/C++ Compiler - exactly one of:
*
* ACC_CC_UNKNOWN [default]
* ACC_CC_GNUC
* ...
*/
#if defined(__INTEL_COMPILER)
# define ACC_CC_INTELC 1
# define ACC_INFO_CC "Intel C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__INTEL_COMPILER)
#elif defined(__POCC__)
# define ACC_CC_PELLESC 1
# define ACC_INFO_CC "Pelles C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__POCC__)
#elif defined(__GNUC__) && defined(__VERSION__)
# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
# define ACC_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
# elif defined(__GNUC_MINOR__)
# define ACC_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
# else
# define ACC_CC_GNUC (__GNUC__ * 0x10000L)
# endif
# define ACC_INFO_CC "gcc"
# define ACC_INFO_CCVER __VERSION__
#elif defined(__AZTEC_C__)
# define ACC_CC_AZTECC 1
# define ACC_INFO_CC "Aztec C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__AZTEC_C__)
#elif defined(__BORLANDC__)
# define ACC_CC_BORLANDC 1
# define ACC_INFO_CC "Borland C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__BORLANDC__)
#elif defined(__DMC__)
# define ACC_CC_DMC 1
# define ACC_INFO_CC "Digital Mars C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__DMC__)
#elif defined(__DECC)
# define ACC_CC_DECC 1
# define ACC_INFO_CC "DEC C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__DECC)
#elif defined(__HIGHC__)
# define ACC_CC_HIGHC 1
# define ACC_INFO_CC "MetaWare High C"
# define ACC_INFO_CCVER "unknown"
#elif defined(__IBMC__)
# define ACC_CC_IBMC 1
# define ACC_INFO_CC "IBM C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__IBMC__)
#elif defined(__KEIL__) && defined(__C166__)
# define ACC_CC_KEILC 1
# define ACC_INFO_CC "Keil C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__C166__)
#elif defined(__LCC__)
# define ACC_CC_LCC 1
# define ACC_INFO_CC "lcc"
# define ACC_INFO_CCVER "unknown"
#elif defined(_MSC_VER)
# define ACC_CC_MSC 1
# define ACC_INFO_CC "Microsoft C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(_MSC_VER)
#elif defined(__MWERKS__)
# define ACC_CC_MWERKS 1
# define ACC_INFO_CC "Metrowerks C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__MWERKS__)
#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
# define ACC_CC_NDPC 1
# define ACC_INFO_CC "Microway NDP C"
# define ACC_INFO_CCVER "unknown"
#elif defined(__PACIFIC__)
# define ACC_CC_PACIFICC 1
# define ACC_INFO_CC "Pacific C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__PACIFIC__)
#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
# define ACC_CC_PGI 1
# define ACC_INFO_CC "Portland Group PGI C"
# define ACC_INFO_CCVER "unknown"
#elif defined(__PUREC__)
# define ACC_CC_PUREC 1
# define ACC_INFO_CC "Pure C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__PUREC__)
#elif defined(__SC__)
# define ACC_CC_SYMANTECC 1
# define ACC_INFO_CC "Symantec C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__SC__)
#elif defined(__SUNPRO_C)
# define ACC_CC_SUNPROC 1
# define ACC_INFO_CC "Sun C"
# define ACC_INFO_CCVER "unknown"
#elif defined(__TINYC__)
# define ACC_CC_TINYC 1
# define ACC_INFO_CC "Tiny C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__TINYC__)
#elif defined(__TSC__)
# define ACC_CC_TOPSPEEDC 1
# define ACC_INFO_CC "TopSpeed C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__TSC__)
#elif defined(__WATCOMC__)
# define ACC_CC_WATCOMC 1
# define ACC_INFO_CC "Watcom C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__WATCOMC__)
#elif defined(__TURBOC__)
# define ACC_CC_TURBOC 1
# define ACC_INFO_CC "Turbo C"
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__TURBOC__)
#elif defined(__ZTC__)
# define ACC_CC_ZORTECHC 1
# define ACC_INFO_CC "Zortech C"
# if (__ZTC__ == 0x310)
# define ACC_INFO_CCVER "0x310"
# else
# define ACC_INFO_CCVER ACC_CPP_MACRO_EXPAND(__ZTC__)
# endif
#else
# define ACC_CC_UNKNOWN 1
# define ACC_INFO_CC "unknown"
# define ACC_INFO_CCVER "unknown"
#endif
/*
vi:ts=4:et
*/
-440
View File
@@ -1,440 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*************************************************************************
//
**************************************************************************/
#if !defined(ACCCHK_ASSERT)
# define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
#endif
/* compile-time sign */
#if !defined(ACCCHK_ASSERT_SIGN_T)
# define ACCCHK_ASSERT_SIGN_T(type,relop) \
ACCCHK_ASSERT( (type) (-1) relop (type) 0 ) \
ACCCHK_ASSERT( (type) (~(type)0) relop (type) 0 ) \
ACCCHK_ASSERT( (type) (~(type)0) == (type) (-1) )
#endif
#if !defined(ACCCHK_IS_SIGNED_T)
# define ACCCHK_ASSERT_IS_SIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,<)
#endif
#if !defined(ACCCHK_IS_UNSIGNED_T)
# if (ACC_BROKEN_INTEGRAL_PROMOTION)
# define ACCCHK_ASSERT_IS_UNSIGNED_T(type) \
ACCCHK_ASSERT( (type) (-1) > (type) 0 )
# else
# define ACCCHK_ASSERT_IS_UNSIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,>)
# endif
#endif
/*************************************************************************
// check preprocessor
**************************************************************************/
#if (ACC_0xffffffffL - ACC_UINT32L_C(4294967294) != 1)
# error "preprocessor error 1"
#endif
#if (ACC_0xffffffffL - ACC_UINT32L_C(0xfffffffd) != 2)
# error "preprocessor error 2"
#endif
#define ACCCHK_VAL 1
#define ACCCHK_TMP1 ACCCHK_VAL
#undef ACCCHK_VAL
#define ACCCHK_VAL 2
#define ACCCHK_TMP2 ACCCHK_VAL
#if (ACCCHK_TMP1 != 2)
# error "preprocessor error 3a"
#endif
#if (ACCCHK_TMP2 != 2)
# error "preprocessor error 3b"
#endif
#undef ACCCHK_VAL
#if (ACCCHK_TMP2)
# error "preprocessor error 3c"
#endif
#if (ACCCHK_TMP2 + 0 != 0)
# error "preprocessor error 3d"
#endif
#undef ACCCHK_TMP1
#undef ACCCHK_TMP2
/*************************************************************************
// check basic arithmetics
**************************************************************************/
ACCCHK_ASSERT(__ACC_INT_MAX(2) == 1)
ACCCHK_ASSERT(__ACC_INT_MAX(8) == 127)
ACCCHK_ASSERT(__ACC_INT_MAX(16) == 32767)
ACCCHK_ASSERT(__ACC_UINT_MAX(2) == 3)
ACCCHK_ASSERT(__ACC_UINT_MAX(16) == 0xffffU)
ACCCHK_ASSERT(__ACC_UINT_MAX(32) == 0xffffffffUL)
#if !defined(ACC_BROKEN_INTEGRAL_PROMOTION)
ACCCHK_ASSERT(__ACC_UINT_MAX(__ACC_INT_BIT) == ~(0u))
ACCCHK_ASSERT(__ACC_UINT_MAX(__ACC_LONG_BIT) == ~(0ul))
#endif
/*************************************************************************
// check basic types
**************************************************************************/
ACCCHK_ASSERT_IS_SIGNED_T(signed char)
ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned char)
ACCCHK_ASSERT(sizeof(signed char) == sizeof(char))
ACCCHK_ASSERT(sizeof(unsigned char) == sizeof(char))
ACCCHK_ASSERT(sizeof(char) == 1)
ACCCHK_ASSERT(sizeof(char) == sizeof((char)0))
#if defined(__cplusplus)
ACCCHK_ASSERT(sizeof('\0') == sizeof(char))
#else
# if (ACC_CC_DMC)
/* Digital Mars C is broken */
# else
ACCCHK_ASSERT(sizeof('\0') == sizeof(int))
# endif
#endif
#if defined(acc_alignof)
ACCCHK_ASSERT(acc_alignof(char) == 1)
ACCCHK_ASSERT(acc_alignof(signed char) == 1)
ACCCHK_ASSERT(acc_alignof(unsigned char) == 1)
#endif
ACCCHK_ASSERT_IS_SIGNED_T(short)
ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned short)
ACCCHK_ASSERT(sizeof(short) == sizeof(unsigned short))
ACCCHK_ASSERT(sizeof(short) >= 2)
ACCCHK_ASSERT(sizeof(short) >= sizeof(char))
ACCCHK_ASSERT(sizeof(short) == sizeof((short)0))
#if (SIZEOF_SHORT > 0)
ACCCHK_ASSERT(sizeof(short) == SIZEOF_SHORT)
#endif
ACCCHK_ASSERT_IS_SIGNED_T(int)
ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned int)
ACCCHK_ASSERT(sizeof(int) == sizeof(unsigned int))
ACCCHK_ASSERT(sizeof(int) >= 2)
ACCCHK_ASSERT(sizeof(int) >= sizeof(short))
ACCCHK_ASSERT(sizeof(int) == sizeof(0))
ACCCHK_ASSERT(sizeof(int) == sizeof((int)0))
#if (SIZEOF_INT > 0)
ACCCHK_ASSERT(sizeof(int) == SIZEOF_INT)
#endif
ACCCHK_ASSERT_IS_SIGNED_T(long)
ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned long)
ACCCHK_ASSERT(sizeof(long) == sizeof(unsigned long))
ACCCHK_ASSERT(sizeof(long) >= 4)
ACCCHK_ASSERT(sizeof(long) >= sizeof(int))
ACCCHK_ASSERT(sizeof(long) == sizeof(0L))
ACCCHK_ASSERT(sizeof(long) == sizeof((long)0))
#if (SIZEOF_LONG > 0)
ACCCHK_ASSERT(sizeof(long) == SIZEOF_LONG)
#endif
ACCCHK_ASSERT_IS_UNSIGNED_T(size_t)
ACCCHK_ASSERT(sizeof(size_t) >= sizeof(int))
ACCCHK_ASSERT(sizeof(size_t) == sizeof(sizeof(0))) /* sizeof() returns size_t */
#if (SIZEOF_SIZE_T > 0)
ACCCHK_ASSERT(sizeof(size_t) == SIZEOF_SIZE_T)
#endif
ACCCHK_ASSERT_IS_SIGNED_T(ptrdiff_t)
ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(int))
ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t))
#if !defined(ACC_BROKEN_SIZEOF)
ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof((char*)0 - (char*)0))
# if (ACC_HAVE_MM_HUGE_PTR)
ACCCHK_ASSERT(4 == sizeof((char __huge*)0 - (char __huge*)0))
# endif
#endif
#if (SIZEOF_PTRDIFF_T > 0)
ACCCHK_ASSERT(sizeof(ptrdiff_t) == SIZEOF_PTRDIFF_T)
#endif
ACCCHK_ASSERT(sizeof(void*) >= sizeof(char*))
#if (SIZEOF_VOID_P > 0)
ACCCHK_ASSERT(sizeof(void*) == SIZEOF_VOID_P)
#endif
#if (SIZEOF_CHAR_P > 0)
ACCCHK_ASSERT(sizeof(char*) == SIZEOF_CHAR_P)
#endif
#if (ACC_HAVE_MM_HUGE_PTR)
ACCCHK_ASSERT(4 == sizeof(void __huge*))
ACCCHK_ASSERT(4 == sizeof(char __huge*))
#endif
/*************************************************************************
// check arithmetics
**************************************************************************/
ACCCHK_ASSERT((((1u << 15) + 1) >> 15) == 1)
ACCCHK_ASSERT((((1ul << 31) + 1) >> 31) == 1)
#if (ACC_CC_TURBOC && (__TURBOC__ < 0x0150))
/* TC 1.0 bug, probably due to ACC_BROKEN_INTEGRAL_PROMOTION ?? */
#else
ACCCHK_ASSERT((1 << (8*SIZEOF_INT-1)) < 0)
#endif
ACCCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0)
ACCCHK_ASSERT((1l << (8*SIZEOF_LONG-1)) < 0)
ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0)
#if defined(acc_int32e_t)
ACCCHK_ASSERT(sizeof(acc_int32e_t) == 4)
ACCCHK_ASSERT(sizeof(acc_int32e_t) == SIZEOF_ACC_INT32E_T)
ACCCHK_ASSERT(sizeof(acc_uint32e_t) == 4)
ACCCHK_ASSERT(sizeof(acc_int32e_t) == sizeof(acc_uint32e_t))
ACCCHK_ASSERT_IS_SIGNED_T(acc_int32e_t)
ACCCHK_ASSERT(((( (acc_int32e_t)1 << 30) + 1) >> 30) == 1)
ACCCHK_ASSERT(((( ACC_INT32E_C(1) << 30) + 1) >> 30) == 1)
ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32e_t)
ACCCHK_ASSERT(((( (acc_uint32e_t)1 << 31) + 1) >> 31) == 1)
ACCCHK_ASSERT(((( ACC_UINT32E_C(1) << 31) + 1) >> 31) == 1)
ACCCHK_ASSERT( (acc_int32e_t) (1 + ~(acc_int32e_t)0) == 0)
#if defined(ACCCHK_CONFIG_PEDANTIC)
/* compiler may warn about overflow */
ACCCHK_ASSERT( (acc_uint32e_t)(1 + ~(acc_uint32e_t)0) == 0)
#endif /* ACCCHK_CONFIG_PEDANTIC */
#if (SIZEOF_ACC_INT32E_T < SIZEOF_INT)
ACCCHK_ASSERT(sizeof(ACC_INT32E_C(0)) == sizeof(int))
ACCCHK_ASSERT(sizeof(ACC_UINT32E_C(0)) == sizeof(int))
#else
ACCCHK_ASSERT(sizeof(ACC_INT32E_C(0)) == SIZEOF_ACC_INT32E_T)
ACCCHK_ASSERT(sizeof(ACC_UINT32E_C(0)) == SIZEOF_ACC_INT32E_T)
#endif
ACCCHK_ASSERT((ACC_INT32E_C(1) << (8*SIZEOF_ACC_INT32E_T-1)) < 0)
ACCCHK_ASSERT((ACC_UINT32E_C(1) << (8*SIZEOF_ACC_INT32E_T-1)) > 0)
ACCCHK_ASSERT((ACC_INT32E_C(1) << (int)(8*sizeof(ACC_INT32E_C(1))-1)) < 0)
ACCCHK_ASSERT((ACC_UINT32E_C(1) << (int)(8*sizeof(ACC_UINT32E_C(1))-1)) > 0)
ACCCHK_ASSERT(ACC_INT32E_C(2147483647) > 0)
ACCCHK_ASSERT(ACC_INT32E_C(-2147483647) -1 < 0)
ACCCHK_ASSERT(ACC_UINT32E_C(4294967295) > 0)
ACCCHK_ASSERT(ACC_UINT32E_C(4294967295) == ACC_0xffffffffL)
#endif
ACCCHK_ASSERT(sizeof(acc_int32l_t) >= sizeof(int))
#if defined(acc_int32e_t)
ACCCHK_ASSERT(sizeof(acc_int32l_t) >= sizeof(acc_int32e_t))
#endif
ACCCHK_ASSERT(sizeof(acc_int32l_t) >= 4)
ACCCHK_ASSERT(sizeof(acc_int32l_t) == SIZEOF_ACC_INT32L_T)
ACCCHK_ASSERT(sizeof(acc_uint32l_t) >= 4)
ACCCHK_ASSERT(sizeof(acc_int32l_t) == sizeof(acc_uint32l_t))
ACCCHK_ASSERT_IS_SIGNED_T(acc_int32l_t)
ACCCHK_ASSERT(((( (acc_int32l_t)1 << 30) + 1) >> 30) == 1)
ACCCHK_ASSERT(((( ACC_INT32L_C(1) << 30) + 1) >> 30) == 1)
ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32l_t)
ACCCHK_ASSERT(((( (acc_uint32l_t)1 << 31) + 1) >> 31) == 1)
ACCCHK_ASSERT(((( ACC_UINT32L_C(1) << 31) + 1) >> 31) == 1)
#if (SIZEOF_ACC_INT32L_T < SIZEOF_INT)
ACCCHK_ASSERT(sizeof(ACC_INT32L_C(0)) == sizeof(int))
ACCCHK_ASSERT(sizeof(ACC_UINT32L_C(0)) == sizeof(int))
#else
ACCCHK_ASSERT(sizeof(ACC_INT32L_C(0)) == SIZEOF_ACC_INT32L_T)
ACCCHK_ASSERT(sizeof(ACC_UINT32L_C(0)) == SIZEOF_ACC_INT32L_T)
#endif
ACCCHK_ASSERT((ACC_INT32L_C(1) << (8*SIZEOF_ACC_INT32L_T-1)) < 0)
ACCCHK_ASSERT((ACC_UINT32L_C(1) << (8*SIZEOF_ACC_INT32L_T-1)) > 0)
ACCCHK_ASSERT((ACC_INT32L_C(1) << (int)(8*sizeof(ACC_INT32L_C(1))-1)) < 0)
ACCCHK_ASSERT((ACC_UINT32L_C(1) << (int)(8*sizeof(ACC_UINT32L_C(1))-1)) > 0)
ACCCHK_ASSERT(ACC_INT32L_C(2147483647) > 0)
ACCCHK_ASSERT(ACC_INT32L_C(-2147483647) -1 < 0)
ACCCHK_ASSERT(ACC_UINT32L_C(4294967295) > 0)
ACCCHK_ASSERT(ACC_UINT32L_C(4294967295) == ACC_0xffffffffL)
ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(int))
#if defined(acc_int32e_t)
ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32e_t))
#endif
ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32l_t))
ACCCHK_ASSERT(sizeof(acc_int32f_t) >= 4)
ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32l_t))
ACCCHK_ASSERT(sizeof(acc_int32f_t) == SIZEOF_ACC_INT32F_T)
ACCCHK_ASSERT(sizeof(acc_uint32f_t) >= 4)
ACCCHK_ASSERT(sizeof(acc_uint32f_t) >= sizeof(acc_uint32l_t))
ACCCHK_ASSERT(sizeof(acc_int32f_t) == sizeof(acc_uint32f_t))
ACCCHK_ASSERT_IS_SIGNED_T(acc_int32f_t)
ACCCHK_ASSERT(((( (acc_int32f_t)1 << 30) + 1) >> 30) == 1)
ACCCHK_ASSERT(((( ACC_INT32F_C(1) << 30) + 1) >> 30) == 1)
ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32f_t)
ACCCHK_ASSERT(((( (acc_uint32f_t)1 << 31) + 1) >> 31) == 1)
ACCCHK_ASSERT(((( ACC_UINT32F_C(1) << 31) + 1) >> 31) == 1)
#if (SIZEOF_ACC_INT32F_T < SIZEOF_INT)
ACCCHK_ASSERT(sizeof(ACC_INT32F_C(0)) == sizeof(int))
ACCCHK_ASSERT(sizeof(ACC_UINT32F_C(0)) == sizeof(int))
#else
ACCCHK_ASSERT(sizeof(ACC_INT32F_C(0)) == SIZEOF_ACC_INT32F_T)
ACCCHK_ASSERT(sizeof(ACC_UINT32F_C(0)) == SIZEOF_ACC_INT32F_T)
#endif
ACCCHK_ASSERT((ACC_INT32F_C(1) << (8*SIZEOF_ACC_INT32F_T-1)) < 0)
ACCCHK_ASSERT((ACC_UINT32F_C(1) << (8*SIZEOF_ACC_INT32F_T-1)) > 0)
ACCCHK_ASSERT((ACC_INT32F_C(1) << (int)(8*sizeof(ACC_INT32F_C(1))-1)) < 0)
ACCCHK_ASSERT((ACC_UINT32F_C(1) << (int)(8*sizeof(ACC_UINT32F_C(1))-1)) > 0)
ACCCHK_ASSERT(ACC_INT32F_C(2147483647) > 0)
ACCCHK_ASSERT(ACC_INT32F_C(-2147483647) -1 < 0)
ACCCHK_ASSERT(ACC_UINT32F_C(4294967295) > 0)
ACCCHK_ASSERT(ACC_UINT32F_C(4294967295) == ACC_0xffffffffL)
#if defined(acc_int64l_t)
ACCCHK_ASSERT(sizeof(acc_int64l_t) >= 8)
ACCCHK_ASSERT(sizeof(acc_int64l_t) == SIZEOF_ACC_INT64L_T)
ACCCHK_ASSERT(sizeof(acc_uint64l_t) >= 8)
ACCCHK_ASSERT(sizeof(acc_int64l_t) == sizeof(acc_uint64l_t))
ACCCHK_ASSERT_IS_SIGNED_T(acc_int64l_t)
ACCCHK_ASSERT(((( (acc_int64l_t)1 << 62) + 1) >> 62) == 1)
ACCCHK_ASSERT(((( ACC_INT64L_C(1) << 62) + 1) >> 62) == 1)
#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
/* Borland C is broken */
#else
ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64l_t)
ACCCHK_ASSERT(ACC_UINT64L_C(18446744073709551615) > 0)
#endif
ACCCHK_ASSERT(((( (acc_uint64l_t)1 << 63) + 1) >> 63) == 1)
ACCCHK_ASSERT(((( ACC_UINT64L_C(1) << 63) + 1) >> 63) == 1)
#if defined(ACCCHK_CONFIG_PEDANTIC)
#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0560))
/* Borland C is broken */
#elif (SIZEOF_ACC_INT64L_T < SIZEOF_INT)
ACCCHK_ASSERT(sizeof(ACC_INT64L_C(0)) == sizeof(int))
ACCCHK_ASSERT(sizeof(ACC_UINT64L_C(0)) == sizeof(int))
#else
ACCCHK_ASSERT(sizeof(ACC_INT64L_C(0)) == SIZEOF_ACC_INT64L_T)
ACCCHK_ASSERT(sizeof(ACC_UINT64L_C(0)) == SIZEOF_ACC_INT64L_T)
#endif
#endif /* ACCCHK_CONFIG_PEDANTIC */
ACCCHK_ASSERT((ACC_INT64L_C(1) << (8*SIZEOF_ACC_INT64L_T-1)) < 0)
ACCCHK_ASSERT((ACC_UINT64L_C(1) << (8*SIZEOF_ACC_INT64L_T-1)) > 0)
ACCCHK_ASSERT(ACC_INT64L_C(9223372036854775807) > 0)
ACCCHK_ASSERT(ACC_INT64L_C(-9223372036854775807) - 1 < 0)
ACCCHK_ASSERT( ACC_INT64L_C(9223372036854775807) % 2147483629l == 721)
ACCCHK_ASSERT( ACC_INT64L_C(9223372036854775807) % 2147483647l == 1)
ACCCHK_ASSERT(ACC_UINT64L_C(9223372036854775807) % 2147483629ul == 721)
ACCCHK_ASSERT(ACC_UINT64L_C(9223372036854775807) % 2147483647ul == 1)
#endif
ACCCHK_ASSERT_IS_SIGNED_T(acc_intptr_t)
ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uintptr_t)
ACCCHK_ASSERT(sizeof(acc_intptr_t) >= sizeof(void *))
ACCCHK_ASSERT(sizeof(acc_intptr_t) == SIZEOF_ACC_INTPTR_T)
ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t))
/*************************************************************************
// check memory model ACC_MM
**************************************************************************/
#if (ACC_MM_FLAT)
#if 0
/* this is not a valid assumption -- disabled */
ACCCHK_ASSERT(sizeof(void*) == sizeof(void (*)(void)))
#endif
#endif
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
ACCCHK_ASSERT(sizeof(void*) == 2)
ACCCHK_ASSERT(sizeof(ptrdiff_t) == 2)
#elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
ACCCHK_ASSERT(sizeof(void*) == 4)
#endif
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_COMPACT)
ACCCHK_ASSERT(sizeof(void (*)(void)) == 2)
#elif (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE)
ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
#endif
/*************************************************************************
// check ACC_ARCH and ACC_OS
**************************************************************************/
#if (ACC_ARCH_IA16)
ACCCHK_ASSERT(sizeof(size_t) == 2)
ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
#elif (ACC_ARCH_IA32 || ACC_ARCH_M68K)
ACCCHK_ASSERT(sizeof(size_t) == 4)
ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
#elif (ACC_ARCH_AMD64 || ACC_ARCH_IA64)
ACCCHK_ASSERT(sizeof(size_t) == 8)
ACCCHK_ASSERT(sizeof(ptrdiff_t) == 8)
ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
#endif
#if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32)
ACCCHK_ASSERT(sizeof(size_t) == 4)
ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
#elif (ACC_OS_WIN64)
ACCCHK_ASSERT(sizeof(size_t) == 8)
ACCCHK_ASSERT(sizeof(ptrdiff_t) == 8)
ACCCHK_ASSERT(sizeof(void (*)(void)) == 8)
#endif
/*************************************************************************
// check promotion rules
**************************************************************************/
#if (ACC_CC_NDPC)
/* NDP C is broken */
#else
/* check that the compiler correctly casts signed to unsigned */
ACCCHK_ASSERT( (int) ((unsigned char) ((signed char) -1)) == 255)
#endif
#if (ACC_CC_KEILC)
/* Keil C is broken */
#elif (ACC_CC_NDPC)
/* NDP C is broken */
#elif !defined(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1)
/* check that the compiler correctly promotes integrals */
ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
#endif
/*
vi:ts=4:et
*/
-126
View File
@@ -1,126 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*************************************************************************
//
**************************************************************************/
#if !defined(__ACCCHKR_FUNCNAME)
# define __ACCCHKR_FUNCNAME(f) accchkr_ ## f
#endif
#if !defined(ACCCHKR_ASSERT)
#if 0 || defined(ACCCHKR_CONFIG_DEBUG)
#include <stdio.h>
static int __ACCCHKR_FUNCNAME(assert_fail)(const char* s, unsigned l)
{
fprintf(stderr, "ACCCHKR assertion failed in line %u: `%s'\n", l, s);
return 0;
}
#define ACCCHKR_ASSERT(expr) ((expr) ? 1 : __ACCCHKR_FUNCNAME(assert_fail)(#expr,__LINE__))
#else
#define ACCCHKR_ASSERT(expr) ((expr) ? 1 : 0)
#endif
#endif
/* avoid inlining */
static int __ACCCHKR_FUNCNAME(schedule_insns_bug)(void);
static int __ACCCHKR_FUNCNAME(strength_reduce_bug)(int*);
/*************************************************************************
// main entry
**************************************************************************/
static int __ACCCHKR_FUNCNAME(check)(int r)
{
#if defined(ACC_ENDIAN_BIG_ENDIAN)
{
union { long l; unsigned char c[sizeof(long)]; } u;
u.l = 0; u.c[sizeof(long)-1] = 0x80;
r &= ACCCHKR_ASSERT(u.l == 128);
u.l = 0; u.c[0] = 0x80;
r &= ACCCHKR_ASSERT(u.l < 0);
ACC_UNUSED(u);
}
#endif
#if defined(ACC_ENDIAN_LITTLE_ENDIAN)
{
union { long l; unsigned char c[sizeof(long)]; } u;
u.l = 0; u.c[0] = 0x80;
r &= ACCCHKR_ASSERT(u.l == 128);
u.l = 0; u.c[sizeof(long)-1] = 0x80;
r &= ACCCHKR_ASSERT(u.l < 0);
ACC_UNUSED(u);
}
#endif
/* check for the gcc schedule-insns optimization bug */
if (r == 1)
{
r &= ACCCHKR_ASSERT(!__ACCCHKR_FUNCNAME(schedule_insns_bug()));
}
/* check for the gcc strength-reduce optimization bug */
if (r == 1)
{
static int x[3];
static unsigned xn = 3;
register unsigned j;
for (j = 0; j < xn; j++)
x[j] = (int)j - 3;
r &= ACCCHKR_ASSERT(!__ACCCHKR_FUNCNAME(strength_reduce_bug(x)));
}
return r;
}
/*************************************************************************
//
**************************************************************************/
static int __ACCCHKR_FUNCNAME(schedule_insns_bug)(void)
{
const int a[] = {1, 2, 0}; const int* b;
b = a; return (*b) ? 0 : 1;
}
static int __ACCCHKR_FUNCNAME(strength_reduce_bug)(int* x)
{
#if 0 && (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
ACC_UNUSED(x); return 0;
#else
return x[0] != -3 || x[1] != -2 || x[2] != -1;
#endif
}
/*
vi:ts=4:et
*/
-157
View File
@@ -1,157 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#ifndef __ACC_CXX_H_INCLUDED
#define __ACC_CXX_H_INCLUDED 1
#if defined(__cplusplus)
/*************************************************************************
// exception specification
// ACC_CXX_NOTHROW
**************************************************************************/
#if defined(ACC_CXX_NOTHROW)
#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
#elif (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
#elif (ACC_CC_HIGHC)
#elif (ACC_CC_MSC && (_MSC_VER < 1100))
#elif (ACC_CC_NDPC)
#elif (ACC_CC_TURBOC)
#elif (ACC_CC_WATCOMC && !defined(_CPPUNWIND))
#elif (ACC_CC_ZORTECHC)
#else
# define ACC_CXX_NOTHROW throw()
#endif
#if !defined(ACC_CXX_NOTHROW)
# define ACC_CXX_NOTHROW
#endif
/*************************************************************************
// disable dynamic allocation of an object - private helpers
// __ACC_CXX_DO_NEW
// __ACC_CXX_DO_DELETE
**************************************************************************/
#if defined(__ACC_CXX_DO_NEW)
#elif (ACC_CC_NDPC || ACC_CC_PGI)
# define __ACC_CXX_DO_NEW { return 0; }
#else
# define __ACC_CXX_DO_NEW ;
#endif
/* need an implementation in case a class has virtual members */
#if defined(__ACC_CXX_DO_DELETE)
#elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
# define __ACC_CXX_DO_DELETE { }
#else
# define __ACC_CXX_DO_DELETE ACC_CXX_NOTHROW { }
#endif
/*************************************************************************
// disable dynamic allocation of an object
// ACC_CXX_DISABLE_NEW_DELETE
**************************************************************************/
/*
#undef __ACC_CXX_HAVE_ARRAY_NEW
#undef __ACC_CXX_HAVE_PLACEMENT_NEW
#undef __ACC_CXX_HAVE_PLACEMENT_DELETE
*/
#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
#elif (ACC_CC_MSC && ACC_MM_HUGE)
# define ACC_CXX_DISABLE_NEW_DELETE private:
#elif (ACC_CC_MSC && (_MSC_VER < 1100))
#elif (ACC_CC_NDPC)
#elif (ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
#elif (ACC_CC_TURBOC)
#elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
#else
# define __ACC_CXX_HAVE_ARRAY_NEW 1
#endif
#if (__ACC_CXX_HAVE_ARRAY_NEW)
# define __ACC_CXX_HAVE_PLACEMENT_NEW 1
#endif
#if (__ACC_CXX_HAVE_PLACEMENT_NEW)
# if (ACC_CC_GNUC >= 0x030000ul)
# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
# elif (ACC_CC_INTELC)
# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
# elif (ACC_CC_MSC && (_MSC_VER >= 1200))
# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
# elif (ACC_CC_PGI)
# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
# endif
#endif
#if defined(ACC_CXX_DISABLE_NEW_DELETE)
#elif defined(new) || defined(delete)
# define ACC_CXX_DISABLE_NEW_DELETE private:
#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025b00ul))
# define ACC_CXX_DISABLE_NEW_DELETE private:
#elif (ACC_CC_HIGHC)
# define ACC_CXX_DISABLE_NEW_DELETE private:
#elif !defined(__ACC_CXX_HAVE_ARRAY_NEW)
/* for old compilers use `protected' instead of `private' */
# define ACC_CXX_DISABLE_NEW_DELETE \
protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
protected: static void* operator new(size_t) __ACC_CXX_DO_NEW \
private:
#else
# define ACC_CXX_DISABLE_NEW_DELETE \
protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
static void operator delete[](void*) __ACC_CXX_DO_DELETE \
private: static void* operator new(size_t) __ACC_CXX_DO_NEW \
static void* operator new[](size_t) __ACC_CXX_DO_NEW
#endif
/*************************************************************************
// Assist the compiler by defining a unique location for vtables and RTTI.
// Every class which has virtual member functions or derives from a class
// with virtual members should put this macro at the very top of its
// class declaration.
// ACC_CXX_TRIGGER_FUNCTION
**************************************************************************/
#if defined(ACC_CXX_TRIGGER_FUNCTION)
#else
# define ACC_CXX_TRIGGER_FUNCTION \
protected: virtual const void* acc_cxx_trigger_function() const; \
private:
#endif
#if defined(ACC_CXX_TRIGGER_FUNCTION_IMPL)
#else
# define ACC_CXX_TRIGGER_FUNCTION_IMPL(klass) \
const void* klass::acc_cxx_trigger_function() const { return 0; }
#endif
#endif /* __cplusplus */
#endif /* already included */
/*
vi:ts=4:et
*/
-191
View File
@@ -1,191 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/***********************************************************************
// acc_alignof() / acc_inline
************************************************************************/
#if (ACC_CC_GNUC)
# define acc_alignof(e) __alignof__(e)
#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700))
# define acc_alignof(e) __alignof__(e)
#elif (ACC_CC_MSC && (_MSC_VER >= 1300))
# define acc_alignof(e) __alignof(e)
#elif (ACC_CC_PGI)
# define acc_alignof(e) __alignof__(e)
#endif
#if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295))
#elif defined(__cplusplus)
# define acc_inline inline
#elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
# define acc_inline __inline
#elif (ACC_CC_DMC)
# define acc_inline __inline
#elif (ACC_CC_GNUC)
# define acc_inline __inline__
#elif (ACC_CC_INTELC)
# define acc_inline __inline
#elif (ACC_CC_MSC && (_MSC_VER >= 1000))
# define acc_inline __inline
#elif (ACC_CC_PGI)
# define acc_inline __inline__
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
# define acc_inline inline
#endif
/***********************************************************************
// ACC_UNUSED / ACC_UNUSED_FUNC
************************************************************************/
#if !defined(ACC_UNUSED)
# if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
# define ACC_UNUSED(var) ((void) &var)
# elif (ACC_CC_BORLANDC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_TURBOC)
# define ACC_UNUSED(var) if (&var) ; else
# elif (ACC_CC_MSC && (_MSC_VER < 900))
# define ACC_UNUSED(var) if (&var) ; else
# elif (ACC_CC_GNUC)
# define ACC_UNUSED(var) ((void) var)
# elif (ACC_CC_KEILC)
# define ACC_UNUSED(var)
# else
# define ACC_UNUSED(var) ((void) &var)
# endif
#endif
#if !defined(ACC_UNUSED_FUNC)
# if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
# define ACC_UNUSED_FUNC(func) ((void) func)
# elif (ACC_CC_BORLANDC || ACC_CC_NDPC || ACC_CC_TURBOC)
# define ACC_UNUSED_FUNC(func) if (func) ; else
# elif (ACC_CC_MSC && (_MSC_VER < 900))
# define ACC_UNUSED_FUNC(func) if (func) ; else
# elif (ACC_CC_KEILC)
# define ACC_UNUSED_FUNC(func)
# else
# define ACC_UNUSED_FUNC(func) ((void) func)
# endif
#endif
/***********************************************************************
// compile-time-assertions
************************************************************************/
/* This can be put into a header file but may get ignored by some compilers. */
#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER)
# if (ACC_CC_AZTECC || ACC_CC_ZORTECHC)
# define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)];
# elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
# define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1u-2*!(e)];
# elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
# define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)];
# else
# define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-2*!(e)];
# endif
#endif
/* This must appear within a function body. */
#if !defined(ACC_COMPILE_TIME_ASSERT)
# if (ACC_CC_AZTECC)
# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-!(e)];}
# elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
# elif (ACC_CC_MSC && (_MSC_VER < 900))
# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
# elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
# else
# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-2*!(e)];}
# endif
#endif
/***********************************************************************
// macros
************************************************************************/
#if !defined(__ACC_UINT_MAX)
# define __ACC_INT_MAX(b) ((((1l << ((b)-2)) - 1l) * 2l) + 1l)
# define __ACC_UINT_MAX(b) ((((1ul << ((b)-1)) - 1ul) * 2ul) + 1ul)
#endif
/***********************************************************************
// get sizes of builtin integral types from <limits.h>
************************************************************************/
#if !defined(__ACC_SHORT_BIT)
# if (USHRT_MAX == ACC_0xffffL)
# define __ACC_SHORT_BIT 16
# elif (USHRT_MAX == ACC_0xffffffffL)
# define __ACC_SHORT_BIT 32
# elif (USHRT_MAX == __ACC_UINT_MAX(64))
# define __ACC_SHORT_BIT 64
# elif (USHRT_MAX == __ACC_UINT_MAX(128))
# define __ACC_SHORT_BIT 128
# else
# error "check your compiler installation: USHRT_MAX"
# endif
#endif
#if !defined(__ACC_INT_BIT)
# if (UINT_MAX == ACC_0xffffL)
# define __ACC_INT_BIT 16
# elif (UINT_MAX == ACC_0xffffffffL)
# define __ACC_INT_BIT 32
# elif (UINT_MAX == __ACC_UINT_MAX(64))
# define __ACC_INT_BIT 64
# elif (UINT_MAX == __ACC_UINT_MAX(128))
# define __ACC_INT_BIT 128
# else
# error "check your compiler installation: UINT_MAX"
# endif
#endif
#if !defined(__ACC_LONG_BIT)
# if (ULONG_MAX == ACC_0xffffffffL)
# define __ACC_LONG_BIT 32
# elif (ULONG_MAX == __ACC_UINT_MAX(64))
# define __ACC_LONG_BIT 64
# elif (ULONG_MAX == __ACC_UINT_MAX(128))
# define __ACC_LONG_BIT 128
# else
# error "check your compiler installation: ULONG_MAX"
# endif
#endif
/***********************************************************************
// acc_auto.h supplements
************************************************************************/
#if (ACC_OS_CYGWIN || (ACC_OS_EMX && defined(__RSXNT__)) || ACC_OS_WIN32 || ACC_OS_WIN64)
# if (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
# elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
/* ancient pw32 version */
# elif ((ACC_OS_CYGWIN || defined(__MINGW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025f00ul)))
/* ancient cygwin/mingw version */
# else
# define ACC_HAVE_WINDOWS_H 1
# endif
#endif
/*
vi:ts=4:et
*/
-67
View File
@@ -1,67 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#ifndef __ACC_INCD_H_INCLUDED
#define __ACC_INCD_H_INCLUDED 1
/* default system includes */
/* see Autoconf:
* headers.m4, _AC_INCLUDES_DEFAULT_REQUIREMENTS ac_includes_default
*/
#include <stdio.h>
#if defined(HAVE_TIME_H) && defined(__MSL__) && defined(__cplusplus)
# include <time.h>
#endif
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
# include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#endif /* already included */
/*
vi:ts=4:et
*/
-87
View File
@@ -1,87 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#ifndef __ACC_INCE_H_INCLUDED
#define __ACC_INCE_H_INCLUDED 1
/* extra system includes */
#if defined(HAVE_STDARG_H)
# include <stdarg.h>
#endif
#if defined(HAVE_CTYPE_H)
# include <ctype.h>
#endif
#if defined(HAVE_ERRNO_H)
# include <errno.h>
#endif
#if defined(HAVE_MALLOC_H)
# include <malloc.h>
#endif
#if defined(HAVE_ALLOCA_H)
# include <alloca.h>
#endif
#if defined(HAVE_FCNTL_H)
# include <fcntl.h>
#endif
#if defined(HAVE_DIRENT_H)
# include <dirent.h>
#endif
#if defined(HAVE_SETJMP_H)
# include <setjmp.h>
#endif
#if defined(HAVE_SIGNAL_H)
# include <signal.h>
#endif
#if defined(TIME_WITH_SYS_TIME)
# include <sys/time.h>
# include <time.h>
#elif defined(HAVE_TIME_H)
# include <time.h>
#endif
#if defined(HAVE_UTIME_H)
# include <utime.h>
#elif defined(HAVE_SYS_UTIME_H)
# include <sys/utime.h>
#endif
/* DOS, OS/2 & Windows */
#if defined(HAVE_IO_H)
# include <io.h>
#endif
#if defined(HAVE_DOS_H)
# include <dos.h>
#endif
#if defined(HAVE_DIRECT_H)
# include <direct.h>
#endif
#if defined(HAVE_SHARE_H)
# include <share.h>
#endif
#if defined(ACC_CC_NDPC)
# include <os.h>
#endif
/* TOS */
#if defined(__TOS__) && (defined(__PUREC__) || defined(__TURBOC__))
# include <ext.h>
#endif
#endif /* already included */
/*
vi:ts=4:et
*/
-103
View File
@@ -1,103 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#ifndef __ACC_INCI_H_INCLUDED
#define __ACC_INCI_H_INCLUDED 1
/*************************************************************************
// internal system includes
**************************************************************************/
#if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
# include <tos.h>
#elif (ACC_HAVE_WINDOWS_H)
# if 1 && !defined(WIN32_LEAN_AND_MEAN)
# define WIN32_LEAN_AND_MEAN 1
# endif
# if 1 && !defined(_WIN32_WINNT)
/* Restrict to a subset of Windows NT 4.0 header files */
# define _WIN32_WINNT 0x0400
# endif
# include <windows.h>
# if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
# include <dir.h>
# endif
#elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_WIN16)
# if (ACC_CC_AZTECC)
# include <model.h>
# include <stat.h>
# elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
# include <alloc.h>
# include <dir.h>
# elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
# include <sys/exceptn.h>
# elif (ACC_CC_PACIFICC)
# include <unixio.h>
# include <stat.h>
# include <sys.h>
# elif (ACC_CC_WATCOMC)
# include <i86.h>
# endif
#elif (ACC_OS_OS216)
# if (ACC_CC_WATCOMC)
# include <i86.h>
# endif
#endif
/*************************************************************************
//
**************************************************************************/
#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
# if defined(FP_OFF)
# define ACC_FP_OFF(x) FP_OFF(x)
# elif defined(_FP_OFF)
# define ACC_FP_OFF(x) _FP_OFF(x)
# else
# define ACC_FP_OFF(x) (((const unsigned __far*)&(x))[0])
# endif
# if defined(FP_SEG)
# define ACC_FP_SEG(x) FP_SEG(x)
# elif defined(_FP_SEG)
# define ACC_FP_SEG(x) _FP_SEG(x)
# else
# define ACC_FP_SEG(x) (((const unsigned __far*)&(x))[1])
# endif
# if defined(MK_FP)
# define ACC_MK_FP(s,o) MK_FP(s,o)
# elif defined(_MK_FP)
# define ACC_MK_FP(s,o) _MK_FP(s,o)
# else
# define ACC_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
# endif
# if 0
# undef ACC_FP_OFF
# undef ACC_FP_SEG
# undef ACC_MK_FP
# define ACC_FP_OFF(x) (((const unsigned __far*)&(x))[0])
# define ACC_FP_SEG(x) (((const unsigned __far*)&(x))[1])
# define ACC_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
# endif
#endif
#endif /* already included */
/*
vi:ts=4:et
*/
-237
View File
@@ -1,237 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/***********************************************************************
// preprocessor
************************************************************************/
/* workaround for preprocessor bugs in some compilers */
#if 0
#define ACC_0xffffL 0xfffful
#define ACC_0xffffffffL 0xfffffffful
#else
#define ACC_0xffffL 65535ul
#define ACC_0xffffffffL 4294967295ul
#endif
/* some things we cannot work around */
#if (ACC_0xffffL == ACC_0xffffffffL)
# error "your preprocessor is broken 1"
#endif
#if (16ul * 16384ul != 262144ul)
# error "your preprocessor is broken 2"
#endif
#if 0
#if (32767 >= 4294967295ul)
# error "your preprocessor is broken 3"
#endif
#if (65535u >= 4294967295ul)
# error "your preprocessor is broken 4"
#endif
#endif
/***********************************************************************
// try to detect specific compilers
************************************************************************/
#if (UINT_MAX == ACC_0xffffL)
#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
# if !defined(MSDOS)
# define MSDOS 1
# endif
# if !defined(_MSDOS)
# define _MSDOS 1
# endif
#elif defined(__VERSION) && defined(MB_LEN_MAX)
# if (__VERSION == 520) && (MB_LEN_MAX == 1)
# if !defined(__AZTEC_C__)
# define __AZTEC_C__ __VERSION
# endif
# if !defined(__DOS__)
# define __DOS__ 1
# endif
# endif
#endif
#endif
/***********************************************************************
// fix incorrect and missing stuff
************************************************************************/
/* Microsoft C does not correctly define ptrdiff_t for
* the 16-bit huge memory model.
*/
#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == ACC_0xffffL)
# define ptrdiff_t long
# define _PTRDIFF_T_DEFINED
#endif
/* Fix old compiler versions. */
#if (UINT_MAX == ACC_0xffffL)
# undef __ACC_RENAME_A
# undef __ACC_RENAME_B
# if defined(__AZTEC_C__) && defined(__DOS__)
# define __ACC_RENAME_A 1
# elif defined(_MSC_VER) && defined(MSDOS)
# if (_MSC_VER < 600)
# define __ACC_RENAME_A 1
# elif (_MSC_VER < 700)
# define __ACC_RENAME_B 1
# endif
# elif defined(__TSC__) && defined(__OS2__)
# define __ACC_RENAME_A 1
# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
# define __ACC_RENAME_A 1
# elif defined(__PACIFIC__) && defined(DOS)
# if !defined(__far)
# define __far far
# endif
# if !defined(__near)
# define __near near
# endif
# endif
# if defined(__ACC_RENAME_A)
# if !defined(__cdecl)
# define __cdecl cdecl
# endif
# if !defined(__far)
# define __far far
# endif
# if !defined(__huge)
# define __huge huge
# endif
# if !defined(__near)
# define __near near
# endif
# if !defined(__pascal)
# define __pascal pascal
# endif
# if !defined(__huge)
# define __huge huge
# endif
# elif defined(__ACC_RENAME_B)
# if !defined(__cdecl)
# define __cdecl _cdecl
# endif
# if !defined(__far)
# define __far _far
# endif
# if !defined(__huge)
# define __huge _huge
# endif
# if !defined(__near)
# define __near _near
# endif
# if !defined(__pascal)
# define __pascal _pascal
# endif
# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
# if !defined(__cdecl)
# define __cdecl cdecl
# endif
# if !defined(__pascal)
# define __pascal pascal
# endif
# endif
# undef __ACC_RENAME_A
# undef __ACC_RENAME_B
#endif
#if (UINT_MAX == ACC_0xffffL)
#if defined(__AZTEC_C__) && defined(__DOS__)
# define ACC_BROKEN_CDECL_ALT_SYNTAX 1
#elif defined(_MSC_VER) && defined(MSDOS)
# if (_MSC_VER < 600)
# define ACC_BROKEN_INTEGRAL_CONSTANTS 1
# endif
# if (_MSC_VER < 700)
# define ACC_BROKEN_INTEGRAL_PROMOTION 1
# define ACC_BROKEN_SIZEOF 1
# endif
#elif defined(__PACIFIC__) && defined(DOS)
# define ACC_BROKEN_INTEGRAL_CONSTANTS 1
#elif defined(__TURBOC__) && defined(__MSDOS__)
# if (__TURBOC__ < 0x0150)
# define ACC_BROKEN_CDECL_ALT_SYNTAX 1
# define ACC_BROKEN_INTEGRAL_CONSTANTS 1
# define ACC_BROKEN_INTEGRAL_PROMOTION 1
# endif
# if (__TURBOC__ < 0x0200)
# define ACC_BROKEN_SIZEOF 1
# endif
# if (__TURBOC__ < 0x0400) && defined(__cplusplus)
# define ACC_BROKEN_CDECL_ALT_SYNTAX 1
# endif
#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
# define ACC_BROKEN_CDECL_ALT_SYNTAX 1
# define ACC_BROKEN_SIZEOF 1
#endif
#endif
#if defined(__WATCOMC__) && (__WATCOMC__ < 900)
# define ACC_BROKEN_INTEGRAL_CONSTANTS 1
#endif
/***********************************************************************
// ANSI C preprocessor macros (cpp)
************************************************************************/
#define ACC_CPP_STRINGIZE(x) #x
#define ACC_CPP_MACRO_EXPAND(x) ACC_CPP_STRINGIZE(x)
/* concatenate */
#define ACC_CPP_CONCAT2(a,b) a ## b
#define ACC_CPP_CONCAT3(a,b,c) a ## b ## c
#define ACC_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d
#define ACC_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
/* expand and concatenate (by using one level of indirection) */
#define ACC_CPP_ECONCAT2(a,b) ACC_CPP_CONCAT2(a,b)
#define ACC_CPP_ECONCAT3(a,b,c) ACC_CPP_CONCAT3(a,b,c)
#define ACC_CPP_ECONCAT4(a,b,c,d) ACC_CPP_CONCAT4(a,b,c,d)
#define ACC_CPP_ECONCAT5(a,b,c,d,e) ACC_CPP_CONCAT5(a,b,c,d,e)
/***********************************************************************
// stdc macros
************************************************************************/
#if defined(__cplusplus)
# undef __STDC_CONSTANT_MACROS
# undef __STDC_LIMIT_MACROS
# define __STDC_CONSTANT_MACROS 1
# define __STDC_LIMIT_MACROS 1
#endif
/***********************************************************************
// misc macros
************************************************************************/
#if defined(__cplusplus)
# define ACC_EXTERN_C extern "C"
#else
# define ACC_EXTERN_C extern
#endif
/*
vi:ts=4:et
*/
-61
View File
@@ -1,61 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#if !defined(ACC_VERSION)
# if defined ACC_CONFIG_INCLUDE
# include ACC_CONFIG_INCLUDE("acc.h")
# else
# include "acc.h"
# endif
#endif
#ifndef __ACC_INCD_H_INCLUDED
# include ACC_CONFIG_INCLUDE("acc_incd.h")
#endif
#ifndef __ACC_INCE_H_INCLUDED
# include ACC_CONFIG_INCLUDE("acc_ince.h")
#endif
#ifndef __ACC_INCI_H_INCLUDED
# include ACC_CONFIG_INCLUDE("acc_inci.h")
#endif
#ifndef __ACC_LIB_H_INCLUDED
# include ACC_CONFIG_INCLUDE("acc_lib.h")
#endif
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
#include ACC_CONFIG_INCLUDE("acclib/bele.ch")
#include ACC_CONFIG_INCLUDE("acclib/hmemcpy.ch")
#include ACC_CONFIG_INCLUDE("acclib/hstring.ch")
#include ACC_CONFIG_INCLUDE("acclib/halloc.ch")
#include ACC_CONFIG_INCLUDE("acclib/dosalloc.ch")
#include ACC_CONFIG_INCLUDE("acclib/hfread.ch")
#include ACC_CONFIG_INCLUDE("acclib/hread.ch")
#include ACC_CONFIG_INCLUDE("acclib/opendir.ch")
#include ACC_CONFIG_INCLUDE("acclib/rand.ch")
#include ACC_CONFIG_INCLUDE("acclib/misc.ch")
#if 0
/* modules which use floating point are not included by default */
#include ACC_CONFIG_INCLUDE("acclib/uclock.ch")
#endif
/*
vi:ts=4:et
*/
-528
View File
@@ -1,528 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#ifndef __ACC_LIB_H_INCLUDED
#define __ACC_LIB_H_INCLUDED 1
#if !defined(__ACCLIB_FUNCNAME)
# define __ACCLIB_FUNCNAME(f) f
#endif
#if !defined(ACCLIB_EXTERN)
# define ACCLIB_EXTERN(r,f) extern r __ACCLIB_FUNCNAME(f)
#endif
#if !defined(__ACCLIB_CONST_CAST_RETURN)
#if (ACC_CC_GNUC)
# define __ACCLIB_CONST_CAST_RETURN(type,var) \
{ union { type a; const type b; } u; u.b = (var); return u.a; }
#else
# define __ACCLIB_CONST_CAST_RETURN(type,var) return (type) (var);
#endif
#endif
#if (ACC_OS_WIN64)
# define acclib_handle_t acc_int64l_t
# define acclib_uhandle_t acc_uint64l_t
#elif (ACC_ARCH_IA32 && ACC_CC_MSC && (_MSC_VER >= 1300))
typedef __w64 long acclib_handle_t;
typedef __w64 unsigned long acclib_uhandle_t;
# define acclib_handle_t acclib_handle_t
# define acclib_uhandle_t acclib_uhandle_t
#else
# define acclib_handle_t long
# define acclib_uhandle_t unsigned long
#endif
/*************************************************************************
// wrap <ctype.h>
**************************************************************************/
#if 0
ACCLIB_EXTERN(int, acc_ascii_digit) (int);
ACCLIB_EXTERN(int, acc_ascii_islower) (int);
ACCLIB_EXTERN(int, acc_ascii_isupper) (int);
ACCLIB_EXTERN(int, acc_ascii_tolower) (int);
ACCLIB_EXTERN(int, acc_ascii_toupper) (int);
ACCLIB_EXTERN(int, acc_ascii_utolower) (int);
ACCLIB_EXTERN(int, acc_ascii_utoupper) (int);
#endif
#define acc_ascii_isdigit(c) (((unsigned)(c) - 48) < 10)
#define acc_ascii_islower(c) (((unsigned)(c) - 97) < 26)
#define acc_ascii_isupper(c) (((unsigned)(c) - 65) < 26)
#define acc_ascii_tolower(c) ((int)(c) + (acc_ascii_isupper(c) << 5))
#define acc_ascii_toupper(c) ((int)(c) - (acc_ascii_islower(c) << 5))
#define acc_ascii_utolower(c) acc_ascii_tolower((unsigned char)(c))
#define acc_ascii_utoupper(c) acc_ascii_toupper((unsigned char)(c))
/*************************************************************************
// huge pointer layer
**************************************************************************/
#ifndef acc_hsize_t
#if (ACC_HAVE_MM_HUGE_PTR)
# define acc_hsize_t unsigned long
# define acc_hvoid_p void __huge *
# define acc_hchar_p char __huge *
# define acc_hchar_pp char __huge * __huge *
# define acc_hbyte_p unsigned char __huge *
#else
# define acc_hsize_t size_t
# define acc_hvoid_p void *
# define acc_hchar_p char *
# define acc_hchar_pp char **
# define acc_hbyte_p unsigned char *
#endif
#endif
#ifndef ACC_FILE_P
#define ACC_FILE_P FILE *
#endif
/* halloc */
ACCLIB_EXTERN(acc_hvoid_p, acc_halloc) (acc_hsize_t);
ACCLIB_EXTERN(void, acc_hfree) (acc_hvoid_p);
/* dos_alloc */
#if (ACC_OS_DOS16 || ACC_OS_OS216)
ACCLIB_EXTERN(void __far*, acc_dos_alloc) (unsigned long);
ACCLIB_EXTERN(int, acc_dos_free) (void __far*);
#endif
/* string */
ACCLIB_EXTERN(int, acc_hmemcmp) (const acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hvoid_p, acc_hmemset) (acc_hvoid_p, int, acc_hsize_t);
/* string */
ACCLIB_EXTERN(acc_hsize_t, acc_hstrlen) (const acc_hchar_p);
ACCLIB_EXTERN(int, acc_hstrcmp) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(int, acc_hstrncmp)(const acc_hchar_p, const acc_hchar_p, acc_hsize_t);
ACCLIB_EXTERN(int, acc_ascii_hstricmp) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(int, acc_ascii_hstrnicmp)(const acc_hchar_p, const acc_hchar_p, acc_hsize_t);
ACCLIB_EXTERN(int, acc_ascii_hmemicmp) (const acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrstr) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstristr) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hvoid_p, acc_hmemmem) (const acc_hvoid_p, acc_hsize_t, const acc_hvoid_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemimem) (const acc_hvoid_p, acc_hsize_t, const acc_hvoid_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrcpy) (acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrcat) (acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hsize_t, acc_hstrlcpy) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hsize_t, acc_hstrlcat) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
ACCLIB_EXTERN(int, acc_hstrscpy) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
ACCLIB_EXTERN(int, acc_hstrscat) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrccpy) (acc_hchar_p, const acc_hchar_p, int);
ACCLIB_EXTERN(acc_hvoid_p, acc_hmemccpy) (acc_hvoid_p, const acc_hvoid_p, int, acc_hsize_t);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrchr) (const acc_hchar_p, int);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrrchr) (const acc_hchar_p, int);
ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrichr) (const acc_hchar_p, int);
ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrrichr) (const acc_hchar_p, int);
ACCLIB_EXTERN(acc_hvoid_p, acc_hmemchr) (const acc_hvoid_p, int, acc_hsize_t);
ACCLIB_EXTERN(acc_hvoid_p, acc_hmemrchr) (const acc_hvoid_p, int, acc_hsize_t);
ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemichr) (const acc_hvoid_p, int, acc_hsize_t);
ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemrichr) (const acc_hvoid_p, int, acc_hsize_t);
ACCLIB_EXTERN(acc_hsize_t, acc_hstrspn) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hsize_t, acc_hstrrspn) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hsize_t, acc_hstrcspn) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hsize_t, acc_hstrrcspn) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrpbrk) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrrpbrk) (const acc_hchar_p, const acc_hchar_p);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrsep) (acc_hchar_pp, const acc_hchar_p);
ACCLIB_EXTERN(acc_hchar_p, acc_hstrrsep) (acc_hchar_pp, const acc_hchar_p);
ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrlwr) (acc_hchar_p);
ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrupr) (acc_hchar_p);
ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemlwr) (acc_hvoid_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemupr) (acc_hvoid_p, acc_hsize_t);
/* stdio */
ACCLIB_EXTERN(acc_hsize_t, acc_hfread) (ACC_FILE_P, acc_hvoid_p, acc_hsize_t);
ACCLIB_EXTERN(acc_hsize_t, acc_hfwrite) (ACC_FILE_P, const acc_hvoid_p, acc_hsize_t);
/* io */
#if (ACC_HAVE_MM_HUGE_PTR)
ACCLIB_EXTERN(long, acc_hread) (int, acc_hvoid_p, long);
ACCLIB_EXTERN(long, acc_hwrite) (int, const acc_hvoid_p, long);
#endif
ACCLIB_EXTERN(long, acc_safe_hread) (int, acc_hvoid_p, long);
ACCLIB_EXTERN(long, acc_safe_hwrite) (int, const acc_hvoid_p, long);
/*************************************************************************
// wrap filename limits
**************************************************************************/
/* maximum length of full pathname (excl. '\0') */
#if !defined(ACC_FN_PATH_MAX)
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
# define ACC_FN_PATH_MAX 143
#elif (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN32 || ACC_OS_WIN64)
# define ACC_FN_PATH_MAX 259
#elif (ACC_OS_TOS)
# define ACC_FN_PATH_MAX 259
#endif
#endif
#if !defined(ACC_FN_PATH_MAX)
/* arbitrary limit for acclib implementation */
# define ACC_FN_PATH_MAX 1024
#endif
/* maximum length of a filename (a single path component) (excl. '\0') */
#if !defined(ACC_FN_NAME_MAX)
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
# define ACC_FN_NAME_MAX 12
#elif (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
# define ACC_FN_NAME_MAX 12
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
#elif (ACC_OS_DOS32)
# define ACC_FN_NAME_MAX 12
#endif
#endif
#if !defined(ACC_FN_NAME_MAX)
# define ACC_FN_NAME_MAX ACC_FN_PATH_MAX
#endif
#define ACC_FNMATCH_NOESCAPE 1
#define ACC_FNMATCH_PATHNAME 2
#define ACC_FNMATCH_PATHSTAR 4
#define ACC_FNMATCH_PERIOD 8
#define ACC_FNMATCH_ASCII_CASEFOLD 16
ACCLIB_EXTERN(int, acc_fnmatch) (const acc_hchar_p, const acc_hchar_p, int);
/*************************************************************************
// wrap <dirent.h>
**************************************************************************/
#undef __ACCLIB_USE_OPENDIR
#if (HAVE_DIRENT_H || ACC_CC_WATCOMC)
# define __ACCLIB_USE_OPENDIR 1
# if (ACC_OS_DOS32 && defined(__BORLANDC__))
# elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
# elif (ACC_OS_OS2 || ACC_OS_OS216)
# elif (ACC_OS_TOS && ACC_CC_GNUC)
# elif (ACC_OS_WIN32 && !defined(ACC_HAVE_WINDOWS_H))
# elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_TOS || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# undef __ACCLIB_USE_OPENDIR
# endif
#endif
typedef struct
{
#if defined(__ACCLIB_USE_OPENDIR)
void *u_dirp; /* private */
# if (ACC_CC_WATCOMC)
unsigned short f_time;
unsigned short f_date;
unsigned long f_size;
# endif
char f_name[ACC_FN_NAME_MAX+1];
#elif (ACC_OS_WIN32 || ACC_OS_WIN64)
acclib_handle_t u_handle; /* private */
unsigned f_attr;
unsigned f_size_low;
unsigned f_size_high;
char f_name[ACC_FN_NAME_MAX+1];
#elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_TOS || ACC_OS_WIN16)
char u_dta[21]; /* private */
unsigned char f_attr;
unsigned short f_time;
unsigned short f_date;
unsigned short f_size_low;
unsigned short f_size_high;
char f_name[ACC_FN_NAME_MAX+1];
char u_dirp; /* private */
#else
void *u_dirp; /* private */
char f_name[ACC_FN_NAME_MAX+1];
#endif
} acc_dir_t;
#ifndef acc_dir_p
#define acc_dir_p acc_dir_t *
#endif
ACCLIB_EXTERN(int, acc_opendir) (acc_dir_p, const char*);
ACCLIB_EXTERN(int, acc_readdir) (acc_dir_p);
ACCLIB_EXTERN(int, acc_closedir) (acc_dir_p);
/*************************************************************************
// wrap misc
**************************************************************************/
#if (ACC_CC_GNUC) && (defined(__CYGWIN__) || defined(__MINGW32__))
# define acc_alloca(x) __builtin_alloca((x))
#elif (ACC_CC_BORLANDC) && defined(__linux__)
/* FIXME: alloca does not work */
#elif (HAVE_ALLOCA)
# define acc_alloca(x) alloca((x))
#endif
#if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
# define acc_stackavail() stackavail()
#elif (ACC_ARCH_IA16 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0410))
# define acc_stackavail() stackavail()
#elif (ACC_ARCH_IA16 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0400))
# if (ACC_OS_WIN16) && (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
# else
# define acc_stackavail() stackavail()
# endif
#elif ((ACC_ARCH_IA16 || ACC_ARCH_IA32) && (ACC_CC_DMC || ACC_CC_SYMANTECC))
# define acc_stackavail() stackavail()
#elif ((ACC_ARCH_IA16) && ACC_CC_MSC && (_MSC_VER >= 700))
# define acc_stackavail() _stackavail()
#elif ((ACC_ARCH_IA16) && ACC_CC_MSC)
# define acc_stackavail() stackavail()
#elif ((ACC_ARCH_IA16 || ACC_ARCH_IA32) && ACC_CC_TURBOC && (__TURBOC__ >= 0x0450))
# define acc_stackavail() stackavail()
#elif (ACC_ARCH_IA16 && ACC_CC_TURBOC && (__TURBOC__ >= 0x0400))
ACC_EXTERN_C size_t __cdecl stackavail(void);
# define acc_stackavail() stackavail()
#elif ((ACC_ARCH_IA16 || ACC_ARCH_IA32) && (ACC_CC_WATCOMC))
# define acc_stackavail() stackavail()
#elif (ACC_ARCH_IA16 && ACC_CC_ZORTECHC)
# define acc_stackavail() _chkstack()
#endif
ACCLIB_EXTERN(acclib_handle_t, acc_get_osfhandle) (int);
ACCLIB_EXTERN(int, acc_isatty) (int);
ACCLIB_EXTERN(int, acc_mkdir) (const char*, unsigned);
ACCLIB_EXTERN(int, acc_response) (int*, char***);
ACCLIB_EXTERN(int, acc_set_binmode) (int, int);
ACCLIB_EXTERN(acc_int32l_t, acc_muldiv32) (acc_int32l_t, acc_int32l_t, acc_int32l_t);
ACCLIB_EXTERN(acc_uint32l_t, acc_umuldiv32) (acc_uint32l_t, acc_uint32l_t, acc_uint32l_t);
/*************************************************************************
// uclock (real, i.e. "wall" clock)
**************************************************************************/
#if defined(acc_int32e_t)
ACCLIB_EXTERN(int, acc_tsc_read) (acc_uint32e_t*);
ACCLIB_EXTERN(int, acc_tsc_read_add) (acc_uint32e_t*);
#endif
typedef struct { /* all private */
acclib_handle_t h;
int mode;
#if (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
double qpf;
#endif
} acc_uclock_handle_t;
typedef struct { /* all private */
union {
acc_uint32l_t t32;
#if !(ACC_OS_DOS16 || ACC_OS_WIN16)
double td;
# if defined(acc_int64l_t)
acc_int64l_t t64;
# endif
#endif
} ticks;
#if (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
acc_int64l_t qpc;
#endif
} acc_uclock_t;
#ifndef acc_uclock_handle_p
#define acc_uclock_handle_p acc_uclock_handle_t *
#endif
#ifndef acc_uclock_p
#define acc_uclock_p acc_uclock_t *
#endif
ACCLIB_EXTERN(int, acc_uclock_open) (acc_uclock_handle_p);
ACCLIB_EXTERN(int, acc_uclock_close) (acc_uclock_handle_p);
ACCLIB_EXTERN(void, acc_uclock_read) (acc_uclock_handle_p, acc_uclock_p);
ACCLIB_EXTERN(double, acc_uclock_get_elapsed) (acc_uclock_handle_p, const acc_uclock_p, const acc_uclock_p);
/*************************************************************************
// performance counters (virtual clock)
**************************************************************************/
#if defined(acc_int64l_t)
typedef struct { /* all private */
#if (ACC_OS_POSIX_LINUX)
void* h;
unsigned cpu_type, cpu_features, cpu_khz, cpu_nrctrs;
const char* cpu_name;
#else
void* h;
#endif
} acc_perfctr_handle_t;
typedef struct {
acc_uint64l_t tsc;
#if (ACC_OS_POSIX_LINUX)
acc_uint64l_t pmc[18];
#else
acc_uint64l_t pmc[1];
#endif
} acc_perfctr_clock_t;
#ifndef acc_perfctr_handle_p
#define acc_perfctr_handle_p acc_perfctr_handle_t *
#endif
#ifndef acc_perfctr_clock_p
#define acc_perfctr_clock_p acc_perfctr_clock_t *
#endif
ACCLIB_EXTERN(int, acc_perfctr_open) (acc_perfctr_handle_p);
ACCLIB_EXTERN(int, acc_perfctr_close) (acc_perfctr_handle_p);
ACCLIB_EXTERN(void, acc_perfctr_read) (acc_perfctr_handle_p, acc_perfctr_clock_p);
ACCLIB_EXTERN(double, acc_perfctr_get_elapsed) (acc_perfctr_handle_p, const acc_perfctr_clock_p, const acc_perfctr_clock_p);
ACCLIB_EXTERN(double, acc_perfctr_get_elapsed_tsc) (acc_perfctr_handle_p, acc_uint64l_t);
#endif
/*************************************************************************
// Big Endian / Little Endian
**************************************************************************/
ACCLIB_EXTERN(unsigned, acc_get_be16) (const acc_hvoid_p);
ACCLIB_EXTERN(acc_uint32l_t, acc_get_be24) (const acc_hvoid_p);
ACCLIB_EXTERN(acc_uint32l_t, acc_get_be32) (const acc_hvoid_p);
ACCLIB_EXTERN(void, acc_set_be16) (acc_hvoid_p, unsigned);
ACCLIB_EXTERN(void, acc_set_be24) (acc_hvoid_p, acc_uint32l_t);
ACCLIB_EXTERN(void, acc_set_be32) (acc_hvoid_p, acc_uint32l_t);
ACCLIB_EXTERN(unsigned, acc_get_le16) (const acc_hvoid_p);
ACCLIB_EXTERN(acc_uint32l_t, acc_get_le24) (const acc_hvoid_p);
ACCLIB_EXTERN(acc_uint32l_t, acc_get_le32) (const acc_hvoid_p);
ACCLIB_EXTERN(void, acc_set_le16) (acc_hvoid_p, unsigned);
ACCLIB_EXTERN(void, acc_set_le24) (acc_hvoid_p, acc_uint32l_t);
ACCLIB_EXTERN(void, acc_set_le32) (acc_hvoid_p, acc_uint32l_t);
#if defined(acc_uint64l_t)
ACCLIB_EXTERN(acc_uint64l_t, acc_get_be64) (const acc_hvoid_p);
ACCLIB_EXTERN(void, acc_set_be64) (acc_hvoid_p, acc_uint64l_t);
ACCLIB_EXTERN(acc_uint64l_t, acc_get_le64) (const acc_hvoid_p);
ACCLIB_EXTERN(void, acc_set_le64) (acc_hvoid_p, acc_uint64l_t);
#endif
/* inline versions */
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
# define ACC_GET_LE16(p) (* (const unsigned short *) (p))
# define ACC_GET_LE32(p) (* (const acc_uint32e_t *) (p))
# define ACC_SET_LE16(p,v) (* (unsigned short *) (p) = (unsigned short) (v))
# define ACC_SET_LE32(p,v) (* (acc_uint32e_t *) (p) = (acc_uint32e_t) (v))
#endif
#if (ACC_ARCH_AMD64)
# define ACC_GET_LE64(p) (* (const acc_uint64l_t *) (p))
# define ACC_SET_LE64(p,v) (* (acc_uint64l_t *) (p) = (acc_uint64l_t) (v))
#endif
/*************************************************************************
// getopt
**************************************************************************/
typedef struct {
const char* name;
int has_arg;
int* flag;
int val;
} acc_getopt_longopt_t;
#ifndef acc_getopt_longopt_p
#define acc_getopt_longopt_p acc_getopt_longopt_t *
#endif
typedef struct {
int go_argc;
char** go_argv;
const char* go_shortopts;
const acc_getopt_longopt_p longopts;
#if (ACC_BROKEN_CDECL_ALT_SYNTAX)
int __acc_cdecl_va (*go_error)(const char *, ...);
#else
int (__acc_cdecl_va *go_error)(const char *, ...);
#endif
} acc_getopt_t;
#ifndef acc_getopt_p
#define acc_getopt_p acc_getopt_t *
#endif
ACCLIB_EXTERN(void, acc_getopt_init) (acc_getopt_p);
ACCLIB_EXTERN(int, acc_getopt) (acc_getopt_p);
ACCLIB_EXTERN(void, acc_getopt_close)(acc_getopt_p);
/*************************************************************************
// rand
**************************************************************************/
typedef struct { /* all private */
acc_uint32l_t seed;
} acc_rand31_t;
#ifndef acc_rand31_p
#define acc_rand31_p acc_rand31_t *
#endif
ACCLIB_EXTERN(void, acc_srand31) (acc_rand31_p, acc_uint32l_t);
ACCLIB_EXTERN(acc_uint32l_t, acc_rand31) (acc_rand31_p);
#if defined(acc_uint64l_t)
typedef struct { /* all private */
acc_uint64l_t seed;
} acc_rand48_t;
#ifndef acc_rand48_p
#define acc_rand48_p acc_rand48_t *
#endif
ACCLIB_EXTERN(void, acc_srand48) (acc_rand48_p, acc_uint32l_t);
ACCLIB_EXTERN(acc_uint32l_t, acc_rand48) (acc_rand48_p);
ACCLIB_EXTERN(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p);
#endif
#if defined(acc_uint64l_t)
typedef struct { /* all private */
acc_uint64l_t seed;
} acc_rand64_t;
#ifndef acc_rand64_p
#define acc_rand64_p acc_rand64_t *
#endif
ACCLIB_EXTERN(void, acc_srand64) (acc_rand64_p, acc_uint64l_t);
ACCLIB_EXTERN(acc_uint32l_t, acc_rand64) (acc_rand64_p);
ACCLIB_EXTERN(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p);
#endif
typedef struct { /* all private */
unsigned n;
acc_uint32l_t s[624];
} acc_randmt_t;
#ifndef acc_randmt_p
#define acc_randmt_p acc_randmt_t *
#endif
ACCLIB_EXTERN(void, acc_srandmt) (acc_randmt_p, acc_uint32l_t);
ACCLIB_EXTERN(acc_uint32l_t, acc_randmt) (acc_randmt_p);
ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p);
#endif /* already included */
/*
vi:ts=4:et
*/
-199
View File
@@ -1,199 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*
* Memory Model - exactly one of:
*
* ACC_MM_FLAT [default]
* ACC_MM_TINY
* ACC_MM_SMALL
* ACC_MM_MEDIUM
* ACC_MM_COMPACT
* ACC_MM_LARGE
* ACC_MM_HUGE
*/
#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
#if (UINT_MAX != ACC_0xffffL)
# error "this should not happen"
#endif
#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
# define ACC_MM_TINY 1
#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
# define ACC_MM_HUGE 1
#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
# define ACC_MM_SMALL 1
#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
# define ACC_MM_MEDIUM 1
#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
# define ACC_MM_COMPACT 1
#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
# define ACC_MM_LARGE 1
#elif (ACC_CC_AZTECC)
# if defined(_LARGE_CODE) && defined(_LARGE_DATA)
# define ACC_MM_LARGE 1
# elif defined(_LARGE_CODE)
# define ACC_MM_MEDIUM 1
# elif defined(_LARGE_DATA)
# define ACC_MM_COMPACT 1
# else
# define ACC_MM_SMALL 1
# endif
#elif (ACC_CC_ZORTECHC && defined(__VCM__))
# define ACC_MM_LARGE 1
#else
# error "unknown memory model"
#endif
/* ACC_HAVE_MM_HUGE_PTR ... working __huge pointers
* ACC_HAVE_MM_HUGE_ARRAY ... char __huge x[256*1024L] works */
#define ACC_HAVE_MM_HUGE_PTR 1
#define ACC_HAVE_MM_HUGE_ARRAY 1
#if (ACC_MM_TINY)
# undef ACC_HAVE_MM_HUGE_ARRAY
#endif
#if (ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_ZORTECHC)
# undef ACC_HAVE_MM_HUGE_PTR
# undef ACC_HAVE_MM_HUGE_ARRAY
#elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
# undef ACC_HAVE_MM_HUGE_ARRAY
#elif (ACC_CC_MSC && defined(_QC))
# undef ACC_HAVE_MM_HUGE_ARRAY
# if (_MSC_VER < 600)
# undef ACC_HAVE_MM_HUGE_PTR
# endif
#elif (ACC_CC_TURBOC && (__TURBOC__ < 0x0295))
# undef ACC_HAVE_MM_HUGE_ARRAY
#elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 1200))
/* pointer arithmetics with __huge arrays seems broken in OpenWatcom 1.x */
# undef ACC_HAVE_MM_HUGE_ARRAY
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
extern void __near __cdecl _AHSHIFT(void);
# define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
#elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
extern void __near __cdecl _AHSHIFT(void);
# define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
#elif (ACC_CC_MSC || ACC_CC_TOPSPEEDC)
extern void __near __cdecl _AHSHIFT(void);
# define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
#elif (ACC_CC_TURBOC && (__TURBOC__ >= 0x0295))
extern void __near __cdecl _AHSHIFT(void);
# define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
#elif ((ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_TURBOC) && ACC_OS_DOS16)
# define ACC_MM_AHSHIFT 12
#elif (ACC_CC_WATCOMC)
extern unsigned char _HShift;
# define ACC_MM_AHSHIFT ((unsigned) _HShift)
#else
# error "FIXME - implement ACC_MM_AHSHIFT"
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#elif (ACC_ARCH_C166)
#if !defined(__MODEL__)
# error "FIXME - C166 __MODEL__"
#elif ((__MODEL__) == 0)
# define ACC_MM_SMALL 1
#elif ((__MODEL__) == 1)
# define ACC_MM_SMALL 1
#elif ((__MODEL__) == 2)
# define ACC_MM_LARGE 1
#elif ((__MODEL__) == 3)
# define ACC_MM_TINY 1
#elif ((__MODEL__) == 4)
# define ACC_MM_XTINY 1
#elif ((__MODEL__) == 5)
# define ACC_MM_XSMALL 1
#else
# error "FIXME - C166 __MODEL__"
#endif
#elif (ACC_ARCH_MCS251)
#if !defined(__MODEL__)
# error "FIXME - MCS251 __MODEL__"
#elif ((__MODEL__) == 0)
# define ACC_MM_SMALL 1
#elif ((__MODEL__) == 2)
# define ACC_MM_LARGE 1
#elif ((__MODEL__) == 3)
# define ACC_MM_TINY 1
#elif ((__MODEL__) == 4)
# define ACC_MM_XTINY 1
#elif ((__MODEL__) == 5)
# define ACC_MM_XSMALL 1
#else
# error "FIXME - MCS251 __MODEL__"
#endif
#elif (ACC_ARCH_MCS51)
#if !defined(__MODEL__)
# error "FIXME - MCS51 __MODEL__"
#elif ((__MODEL__) == 1)
# define ACC_MM_SMALL 1
#elif ((__MODEL__) == 2)
# define ACC_MM_LARGE 1
#elif ((__MODEL__) == 3)
# define ACC_MM_TINY 1
#elif ((__MODEL__) == 4)
# define ACC_MM_XTINY 1
#elif ((__MODEL__) == 5)
# define ACC_MM_XSMALL 1
#else
# error "FIXME - MCS51 __MODEL__"
#endif
#else
# define ACC_MM_FLAT 1
#endif
#if (ACC_MM_FLAT)
# define ACC_INFO_MM "flat"
#elif (ACC_MM_TINY)
# define ACC_INFO_MM "tiny"
#elif (ACC_MM_SMALL)
# define ACC_INFO_MM "small"
#elif (ACC_MM_MEDIUM)
# define ACC_INFO_MM "medium"
#elif (ACC_MM_COMPACT)
# define ACC_INFO_MM "compact"
#elif (ACC_MM_LARGE)
# define ACC_INFO_MM "large"
#elif (ACC_MM_HUGE)
# define ACC_INFO_MM "huge"
#else
# error "unknown memory model"
#endif
/*
vi:ts=4:et
*/
-200
View File
@@ -1,200 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*
* Operating System - exactly one of:
*
* ACC_OS_POSIX [default]
* ACC_OS_AMIGAOS
* ACC_OS_BEOS
* ACC_OS_CYGWIN hybrid WIN32 and POSIX
* ACC_OS_DOS16 16-bit DOS (segmented memory model)
* ACC_OS_DOS32
* ACC_OS_EMX hybrid OS/2, DOS32, WIN32 (with RSX) and POSIX
* ACC_OS_MACCLASSIC Macintosh Classic
* ACC_OS_PALMOS
* ACC_OS_OS2 OS/2
* ACC_OS_OS216 16-bit OS/2 1.x (segmented memory model)
* ACC_OS_QNX
* ACC_OS_RISCOS
* ACC_OS_TOS Atari TOS / MiNT
* ACC_OS_VMS
* ACC_OS_WIN16 16-bit Windows 3.x (segmented memory model)
* ACC_OS_WIN32
* ACC_OS_WIN64 64-bit Windows (LLP64 programming model)
*/
#if defined(__CYGWIN__) && defined(__GNUC__)
# define ACC_OS_CYGWIN 1
# define ACC_INFO_OS "cygwin"
#elif defined(__EMX__) && defined(__GNUC__)
# define ACC_OS_EMX 1
# define ACC_INFO_OS "emx"
#elif defined(__BEOS__)
# define ACC_OS_BEOS 1
# define ACC_INFO_OS "beos"
#elif defined(__QNX__)
# define ACC_OS_QNX 1
# define ACC_INFO_OS "qnx"
#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
# define ACC_OS_DOS32 1
# define ACC_INFO_OS "dos32"
#elif defined(__BORLANDC__) && defined(__DPMI16__)
# define ACC_OS_DOS16 1
# define ACC_INFO_OS "dos16"
#elif defined(__ZTC__) && defined(DOS386)
# define ACC_OS_DOS32 1
# define ACC_INFO_OS "dos32"
#elif defined(__OS2__) || defined(__OS2V2__)
# if (UINT_MAX == ACC_0xffffL)
# define ACC_OS_OS216 1
# define ACC_INFO_OS "os216"
# elif (UINT_MAX == ACC_0xffffffffL)
# define ACC_OS_OS2 1
# define ACC_INFO_OS "os2"
# else
# error "check your limits.h header"
# endif
#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
# define ACC_OS_WIN64 1
# define ACC_INFO_OS "win64"
#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
# define ACC_OS_WIN32 1
# define ACC_INFO_OS "win32"
#elif defined(__MWERKS__) && defined(__INTEL__)
# define ACC_OS_WIN32 1
# define ACC_INFO_OS "win32"
#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
# if (UINT_MAX == ACC_0xffffL)
# define ACC_OS_WIN16 1
# define ACC_INFO_OS "win16"
# elif (UINT_MAX == ACC_0xffffffffL)
# define ACC_OS_WIN32 1
# define ACC_INFO_OS "win32"
# else
# error "check your limits.h header"
# endif
#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
# if (UINT_MAX == ACC_0xffffL)
# define ACC_OS_DOS16 1
# define ACC_INFO_OS "dos16"
# elif (UINT_MAX == ACC_0xffffffffL)
# define ACC_OS_DOS32 1
# define ACC_INFO_OS "dos32"
# else
# error "check your limits.h header"
# endif
#elif defined(__WATCOMC__)
# if defined(__NT__) && (UINT_MAX == ACC_0xffffL)
/* wcl: NT host defaults to DOS target */
# define ACC_OS_DOS16 1
# define ACC_INFO_OS "dos16"
# elif defined(__NT__) && (__WATCOMC__ < 1100)
/* wcl386: Watcom C 11 defines _WIN32 */
# define ACC_OS_WIN32 1
# define ACC_INFO_OS "win32"
# else
# error "please specify a target using the -bt compiler option"
# endif
#elif defined(__palmos__)
# if (UINT_MAX == ACC_0xffffL)
# define ACC_OS_PALMOS 1
# define ACC_INFO_OS "palmos"
# else
# error "check your limits.h header"
# endif
#elif defined(__TOS__) || defined(__atarist__)
# define ACC_OS_TOS 1
# define ACC_INFO_OS "tos"
#elif defined(macintosh) && !defined(__ppc__)
# define ACC_OS_MACCLASSIC 1
# define ACC_INFO_OS "macclassic"
#elif defined(__VMS)
# define ACC_OS_VMS 1
# define ACC_INFO_OS "vms"
#else
# define ACC_OS_POSIX 1
# define ACC_INFO_OS "posix"
#endif
#if (ACC_OS_POSIX)
# if defined(_AIX) || defined(__AIX__) || defined(__aix__)
# define ACC_OS_POSIX_AIX 1
# define ACC_INFO_OS_POSIX "aix"
# elif defined(__FreeBSD__)
# define ACC_OS_POSIX_FREEBSD 1
# define ACC_INFO_OS_POSIX "freebsd"
# elif defined(__hpux__) || defined(__hpux)
# define ACC_OS_POSIX_HPUX 1
# define ACC_INFO_OS_POSIX "hpux"
# elif defined(__IRIX__) || defined(__irix__)
# define ACC_OS_POSIX_IRIX 1
# define ACC_INFO_OS_POSIX "irix"
# elif defined(__linux__) || defined(__linux)
# define ACC_OS_POSIX_LINUX 1
# define ACC_INFO_OS_POSIX "linux"
# elif defined(__APPLE__) || defined(__MACOS__)
# define ACC_OS_POSIX_MACOSX 1
# define ACC_INFO_OS_POSIX "macosx"
# elif defined(__NetBSD__)
# define ACC_OS_POSIX_NETBSD 1
# define ACC_INFO_OS_POSIX "netbsd"
# elif defined(__OpenBSD__)
# define ACC_OS_POSIX_OPENBSD 1
# define ACC_INFO_OS_POSIX "openbsd"
# elif defined(__osf__)
# define ACC_OS_POSIX_OSF 1
# define ACC_INFO_OS_POSIX "osf"
# elif defined(__solaris__) || defined(__sun)
# if defined(__SVR4) || defined(__svr4__)
# define ACC_OS_POSIX_SOLARIS 1
# define ACC_INFO_OS_POSIX "solaris"
# else
# define ACC_OS_POSIX_SUNOS 1
# define ACC_INFO_OS_POSIX "sunos"
# endif
# elif defined(__ultrix__) || defined(__ultrix)
# define ACC_OS_POSIX_ULTRIX 1
# define ACC_INFO_OS_POSIX "ultrix"
# else
# define ACC_OS_POSIX_UNKNOWN 1
# define ACC_INFO_OS_POSIX "unknown"
# endif
#endif
#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
# if (UINT_MAX != ACC_0xffffL)
# error "this should not happen"
# endif
# if (ULONG_MAX != ACC_0xffffffffL)
# error "this should not happen"
# endif
#endif
#if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if (UINT_MAX != ACC_0xffffffffL)
# error "this should not happen"
# endif
# if (ULONG_MAX != ACC_0xffffffffL)
# error "this should not happen"
# endif
#endif
/*
vi:ts=4:et
*/
-319
View File
@@ -1,319 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/***********************************************************************
//
************************************************************************/
#if (ACC_CC_GNUC >= 0x020800ul) /* 2.8.0 */
# define __acc_gnuc_extension__ __extension__
#else
# define __acc_gnuc_extension__
#endif
#if (SIZEOF_LONG_LONG > 0)
__acc_gnuc_extension__ typedef long long acc_llong_t;
#endif
#if (SIZEOF_UNSIGNED_LONG_LONG > 0)
__acc_gnuc_extension__ typedef unsigned long long acc_ullong_t;
#endif
#if (!(SIZEOF_SHORT > 0 && SIZEOF_INT > 0 && SIZEOF_LONG > 0))
# error "missing defines for sizes"
#endif
#if (!(SIZEOF_PTRDIFF_T > 0 && SIZEOF_SIZE_T > 0 && SIZEOF_VOID_P > 0 && SIZEOF_CHAR_P > 0))
# error "missing defines for sizes"
#endif
/***********************************************************************
// some <stdint.h> types:
// required: least & fast: acc_int32l_t, acc_int32f_t
// optional: exact32 acc_int32e_t
// optional: least64 acc_int64l_t
************************************************************************/
/* acc_int32e_t is int32_t in <stdint.h> terminology */
#if !defined(acc_int32e_t)
#if (SIZEOF_INT == 4)
# define acc_int32e_t int
# define acc_uint32e_t unsigned int
# define ACC_INT32E_C(c) c
# define ACC_UINT32E_C(c) c##U
#elif (SIZEOF_LONG == 4)
# define acc_int32e_t long int
# define acc_uint32e_t unsigned long int
# define ACC_INT32E_C(c) c##L
# define ACC_UINT32E_C(c) c##UL
#elif (SIZEOF_SHORT == 4)
# define acc_int32e_t short int
# define acc_uint32e_t unsigned short int
# define ACC_INT32E_C(c) c
# define ACC_UINT32E_C(c) c##U
#elif (SIZEOF_LONG_LONG == 4 && SIZEOF_UNSIGNED_LONG_LONG == 4)
# define acc_int32e_t acc_llong_t
# define acc_uint32e_t acc_ullong_t
# define ACC_INT32E_C(c) c##LL
# define ACC_UINT32E_C(c) c##ULL
#elif (SIZEOF___INT32 == 4 && SIZEOF_UNSIGNED___INT32 == 4)
# define acc_int32e_t __int32
# define acc_uint32e_t unsigned __int32
# if (SIZEOF_INT > 4)
# define ACC_INT32E_C(c) c
# define ACC_UINT32E_C(c) c##U
# elif (SIZEOF_LONG > 4)
# define ACC_INT32E_C(c) c##L
# define ACC_UINT32E_C(c) c##UL
# else
# define ACC_INT32E_C(c) c##i32
# define ACC_UINT32E_C(c) c##ui32
# endif
#else
/* no exact 32-bit integral type on this machine */
#endif
#endif
#if defined(acc_int32e_t)
# define SIZEOF_ACC_INT32E_T 4
#endif
/* acc_int32l_t is int_least32_t in <stdint.h> terminology */
#if !defined(acc_int32l_t)
#if defined(acc_int32e_t)
# define acc_int32l_t acc_int32e_t
# define acc_uint32l_t acc_uint32e_t
# define ACC_INT32L_C(c) ACC_INT32E_C(c)
# define ACC_UINT32L_C(c) ACC_UINT32E_C(c)
# define SIZEOF_ACC_INT32L_T SIZEOF_ACC_INT32E_T
#elif (SIZEOF_INT > 4)
# define acc_int32l_t int
# define acc_uint32l_t unsigned int
# define ACC_INT32L_C(c) c
# define ACC_UINT32L_C(c) c##U
# define SIZEOF_ACC_INT32L_T SIZEOF_INT
#elif (SIZEOF_LONG > 4)
# define acc_int32l_t long int
# define acc_uint32l_t unsigned long int
# define ACC_INT32L_C(c) c##L
# define ACC_UINT32L_C(c) c##UL
# define SIZEOF_ACC_INT32L_T SIZEOF_LONG
#else
# error "acc_int32l_t"
#endif
#endif
/* acc_int32f_t is int_fast32_t in <stdint.h> terminology */
#if !defined(acc_int32f_t)
#if (SIZEOF_INT >= 4)
# define acc_int32f_t int
# define acc_uint32f_t unsigned int
# define ACC_INT32F_C(c) c
# define ACC_UINT32F_C(c) c##U
# define SIZEOF_ACC_INT32F_T SIZEOF_INT
#elif (SIZEOF_LONG >= 4)
# define acc_int32f_t long int
# define acc_uint32f_t unsigned long int
# define ACC_INT32F_C(c) c##L
# define ACC_UINT32F_C(c) c##UL
# define SIZEOF_ACC_INT32F_T SIZEOF_LONG
#elif defined(acc_int32e_t)
# define acc_int32f_t acc_int32e_t
# define acc_uint32f_t acc_uint32e_t
# define ACC_INT32F_C(c) ACC_INT32E_C(c)
# define ACC_UINT32F_C(c) ACC_UINT32E_C(c)
# define SIZEOF_ACC_INT32F_T SIZEOF_ACC_INT32E_T
#else
# error "acc_int32f_t"
#endif
#endif
/* acc_int64l_t is int_least64_t in <stdint.h> terminology */
#if !defined(acc_int64l_t)
#if (SIZEOF___INT64 >= 8 && SIZEOF_UNSIGNED___INT64 >= 8)
# if (ACC_CC_BORLANDC) && !defined(ACC_CONFIG_PREFER___INT64)
# define ACC_CONFIG_PREFER___INT64 1
# endif
#endif
#if (SIZEOF_INT >= 8)
# define acc_int64l_t int
# define acc_uint64l_t unsigned int
# define ACC_INT64L_C(c) c
# define ACC_UINT64L_C(c) c##U
# define SIZEOF_ACC_INT64L_T SIZEOF_INT
#elif (SIZEOF_LONG >= 8)
# define acc_int64l_t long int
# define acc_uint64l_t unsigned long int
# define ACC_INT64L_C(c) c##L
# define ACC_UINT64L_C(c) c##UL
# define SIZEOF_ACC_INT64L_T SIZEOF_LONG
#elif (SIZEOF_LONG_LONG >= 8 && SIZEOF_UNSIGNED_LONG_LONG >= 8) && !defined(ACC_CONFIG_PREFER___INT64)
# define acc_int64l_t acc_llong_t
# define acc_uint64l_t acc_ullong_t
# if (ACC_CC_BORLANDC)
# define ACC_INT64L_C(c) ((c) + 0ll)
# define ACC_UINT64L_C(c) ((c) + 0ull)
# else
# define ACC_INT64L_C(c) c##LL
# define ACC_UINT64L_C(c) c##ULL
# endif
# define SIZEOF_ACC_INT64L_T SIZEOF_LONG_LONG
#elif (SIZEOF___INT64 >= 8 && SIZEOF_UNSIGNED___INT64 >= 8)
# define acc_int64l_t __int64
# define acc_uint64l_t unsigned __int64
# if (ACC_CC_BORLANDC)
# define ACC_INT64L_C(c) ((c) + 0i64)
# define ACC_UINT64L_C(c) ((c) + 0ui64)
# else
# define ACC_INT64L_C(c) c##i64
# define ACC_UINT64L_C(c) c##ui64
# endif
# define SIZEOF_ACC_INT64L_T SIZEOF___INT64
#else
/* no least 64-bit integral type on this machine */
#endif
#endif
#if !defined(acc_intptr_t)
#if (ACC_ARCH_IA32 && ACC_CC_MSC && (_MSC_VER >= 1300))
typedef __w64 int acc_intptr_t;
typedef __w64 unsigned int acc_uintptr_t;
# define acc_intptr_t acc_intptr_t
# define acc_uintptr_t acc_uintptr_t
# define SIZEOF_ACC_INTPTR_T SIZEOF_INT
#elif (SIZEOF_INT >= SIZEOF_VOID_P)
# define acc_intptr_t int
# define acc_uintptr_t unsigned int
# define SIZEOF_ACC_INTPTR_T SIZEOF_INT
#elif (SIZEOF_LONG >= SIZEOF_VOID_P)
# define acc_intptr_t long
# define acc_uintptr_t unsigned long
# define SIZEOF_ACC_INTPTR_T SIZEOF_LONG
#elif (SIZEOF_ACC_INT64L_T >= SIZEOF_VOID_P)
# define acc_intptr_t acc_int64l_t
# define acc_uintptr_t acc_uint64l_t
# define SIZEOF_ACC_INTPTR_T SIZEOF_ACC_INT64L_T
#else
# error "acc_intptr_t"
#endif
#endif
/* workaround for broken compilers */
#if (ACC_BROKEN_INTEGRAL_CONSTANTS)
# undef ACC_INT32E_C
# undef ACC_UINT32E_C
# undef ACC_INT32L_C
# undef ACC_UINT32L_C
# undef ACC_INT32F_C
# undef ACC_UINT32F_C
# if (SIZEOF_INT == 4)
# define ACC_INT32E_C(c) ((c) + 0)
# define ACC_UINT32E_C(c) ((c) + 0U)
# define ACC_INT32L_C(c) ((c) + 0)
# define ACC_UINT32L_C(c) ((c) + 0U)
# define ACC_INT32F_C(c) ((c) + 0)
# define ACC_UINT32F_C(c) ((c) + 0U)
# elif (SIZEOF_LONG == 4)
# define ACC_INT32E_C(c) ((c) + 0L)
# define ACC_UINT32E_C(c) ((c) + 0UL)
# define ACC_INT32L_C(c) ((c) + 0L)
# define ACC_UINT32L_C(c) ((c) + 0UL)
# define ACC_INT32F_C(c) ((c) + 0L)
# define ACC_UINT32F_C(c) ((c) + 0UL)
# else
# error "integral constants"
# endif
#endif
/***********************************************************************
// calling conventions
************************************************************************/
#if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC)
# elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
# define __acc_cdecl __cdecl
# define __acc_cdecl_atexit
# define __acc_cdecl_main __cdecl
# if (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
# define __acc_cdecl_qsort __pascal
# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
# define __acc_cdecl_qsort _stdcall
# else
# define __acc_cdecl_qsort __cdecl
# endif
# elif (ACC_CC_WATCOMC)
# define __acc_cdecl __cdecl
# else
# define __acc_cdecl __cdecl
# define __acc_cdecl_atexit __cdecl
# define __acc_cdecl_main __cdecl
# define __acc_cdecl_qsort __cdecl
# endif
# if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC || ACC_CC_WATCOMC)
# elif (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
# define __acc_cdecl_sighandler __pascal
# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
# define __acc_cdecl_sighandler _stdcall
# elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
# if defined(_DLL)
# define __acc_cdecl_sighandler _far _cdecl _loadds
# elif defined(_MT)
# define __acc_cdecl_sighandler _far _cdecl
# else
# define __acc_cdecl_sighandler _cdecl
# endif
# else
# define __acc_cdecl_sighandler __cdecl
# endif
#elif (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
# define __acc_cdecl cdecl
#endif
#if !defined(__acc_cdecl)
# define __acc_cdecl
#endif
#if !defined(__acc_cdecl_atexit)
# define __acc_cdecl_atexit
#endif
#if !defined(__acc_cdecl_main)
# define __acc_cdecl_main
#endif
#if !defined(__acc_cdecl_qsort)
# define __acc_cdecl_qsort
#endif
#if !defined(__acc_cdecl_sighandler)
# define __acc_cdecl_sighandler
#endif
#if !defined(__acc_cdecl_va)
# define __acc_cdecl_va __acc_cdecl
#endif
#if (ACC_BROKEN_CDECL_ALT_SYNTAX)
typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(int);
#elif defined(RETSIGTYPE)
typedef RETSIGTYPE (__acc_cdecl_sighandler *acc_sighandler_t)(int);
#else
typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(int);
#endif
/*
vi:ts=4:et
*/
-3
View File
@@ -1,3 +0,0 @@
fnmatch.ch
getopt.ch
perfctr.ch
-250
View File
@@ -1,250 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_BELE_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/*************************************************************************
// be16 / be24 / be32
**************************************************************************/
ACCLIB_PUBLIC(unsigned, acc_get_be16) (const acc_hvoid_p p)
{
const acc_hbyte_p b = (const acc_hbyte_p) p;
return ((unsigned)b[1]) | ((unsigned)b[0] << 8);
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_get_be24) (const acc_hvoid_p p)
{
const acc_hbyte_p b = (const acc_hbyte_p) p;
return ((acc_uint32l_t)b[2]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[0] << 16);
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_get_be32) (const acc_hvoid_p p)
{
const acc_hbyte_p b = (const acc_hbyte_p) p;
return ((acc_uint32l_t)b[3]) | ((acc_uint32l_t)b[2] << 8) | ((acc_uint32l_t)b[1] << 16) | ((acc_uint32l_t)b[0] << 24);
}
ACCLIB_PUBLIC(void, acc_set_be16) (acc_hvoid_p p, unsigned v)
{
acc_hbyte_p b = (acc_hbyte_p) p;
b[1] = (unsigned char) ((v >> 0) & 0xff);
b[0] = (unsigned char) ((v >> 8) & 0xff);
}
ACCLIB_PUBLIC(void, acc_set_be24) (acc_hvoid_p p, acc_uint32l_t v)
{
acc_hbyte_p b = (acc_hbyte_p) p;
b[2] = (unsigned char) ((v >> 0) & 0xff);
b[1] = (unsigned char) ((v >> 8) & 0xff);
b[0] = (unsigned char) ((v >> 16) & 0xff);
}
ACCLIB_PUBLIC(void, acc_set_be32) (acc_hvoid_p p, acc_uint32l_t v)
{
acc_hbyte_p b = (acc_hbyte_p) p;
b[3] = (unsigned char) ((v >> 0) & 0xff);
b[2] = (unsigned char) ((v >> 8) & 0xff);
b[1] = (unsigned char) ((v >> 16) & 0xff);
b[0] = (unsigned char) ((v >> 24) & 0xff);
}
ACCLIB_PUBLIC(unsigned, acc_get_le16) (const acc_hvoid_p p)
{
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
return (* (const unsigned short *) (p));
#else
const acc_hbyte_p b = (const acc_hbyte_p) p;
return ((unsigned)b[0]) | ((unsigned)b[1] << 8);
#endif
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_get_le24) (const acc_hvoid_p p)
{
const acc_hbyte_p b = (const acc_hbyte_p) p;
return ((acc_uint32l_t)b[0]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[2] << 16);
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_get_le32) (const acc_hvoid_p p)
{
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
return (* (const acc_uint32e_t *) (p));
#else
const acc_hbyte_p b = (const acc_hbyte_p) p;
return ((acc_uint32l_t)b[0]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[2] << 16) | ((acc_uint32l_t)b[3] << 24);
#endif
}
/*************************************************************************
// le16 / le24 / le32
**************************************************************************/
ACCLIB_PUBLIC(void, acc_set_le16) (acc_hvoid_p p, unsigned v)
{
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
(* (unsigned short *) (p) = (unsigned short) (v));
#else
acc_hbyte_p b = (acc_hbyte_p) p;
b[0] = (unsigned char) ((v >> 0) & 0xff);
b[1] = (unsigned char) ((v >> 8) & 0xff);
#endif
}
ACCLIB_PUBLIC(void, acc_set_le24) (acc_hvoid_p p, acc_uint32l_t v)
{
acc_hbyte_p b = (acc_hbyte_p) p;
b[0] = (unsigned char) ((v >> 0) & 0xff);
b[1] = (unsigned char) ((v >> 8) & 0xff);
b[2] = (unsigned char) ((v >> 16) & 0xff);
}
ACCLIB_PUBLIC(void, acc_set_le32) (acc_hvoid_p p, acc_uint32l_t v)
{
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
(* (acc_uint32e_t *) (p) = (acc_uint32e_t) (v));
#else
acc_hbyte_p b = (acc_hbyte_p) p;
b[0] = (unsigned char) ((v >> 0) & 0xff);
b[1] = (unsigned char) ((v >> 8) & 0xff);
b[2] = (unsigned char) ((v >> 16) & 0xff);
b[3] = (unsigned char) ((v >> 24) & 0xff);
#endif
}
/*************************************************************************
// be64
**************************************************************************/
#if defined(acc_uint64l_t)
ACCLIB_PUBLIC(acc_uint64l_t, acc_get_be64) (const acc_hvoid_p p)
{
const acc_hbyte_p b = (const acc_hbyte_p) p;
#if (SIZEOF_LONG >= 8) || (SIZEOF_SIZE_T >= 8)
return ((acc_uint64l_t)b[7]) | ((acc_uint64l_t)b[6] << 8) | ((acc_uint64l_t)b[5] << 16) | ((acc_uint64l_t)b[4] << 24) | ((acc_uint64l_t)b[3] << 32) | ((acc_uint64l_t)b[2] << 40) | ((acc_uint64l_t)b[1] << 48) | ((acc_uint64l_t)b[0] << 56);
#else
acc_uint32l_t v0, v1;
v1 = ((acc_uint32l_t)b[3]) | ((acc_uint32l_t)b[2] << 8) | ((acc_uint32l_t)b[1] << 16) | ((acc_uint32l_t)b[0] << 24);
b += 4;
v0 = ((acc_uint32l_t)b[3]) | ((acc_uint32l_t)b[2] << 8) | ((acc_uint32l_t)b[1] << 16) | ((acc_uint32l_t)b[0] << 24);
return ((acc_uint64l_t)v0) | ((acc_uint64l_t)v1 << 32);
#endif
}
ACCLIB_PUBLIC(void, acc_set_be64) (acc_hvoid_p p, acc_uint64l_t v)
{
acc_hbyte_p b = (acc_hbyte_p) p;
#if (SIZEOF_LONG >= 8) || (SIZEOF_SIZE_T >= 8)
b[7] = (unsigned char) ((v >> 0) & 0xff);
b[6] = (unsigned char) ((v >> 8) & 0xff);
b[5] = (unsigned char) ((v >> 16) & 0xff);
b[4] = (unsigned char) ((v >> 24) & 0xff);
b[3] = (unsigned char) ((v >> 32) & 0xff);
b[2] = (unsigned char) ((v >> 40) & 0xff);
b[1] = (unsigned char) ((v >> 48) & 0xff);
b[0] = (unsigned char) ((v >> 56) & 0xff);
#else
acc_uint32l_t x;
x = (acc_uint32l_t) (v >> 0);
b[7] = (unsigned char) ((x >> 0) & 0xff);
b[6] = (unsigned char) ((x >> 8) & 0xff);
b[5] = (unsigned char) ((x >> 16) & 0xff);
b[4] = (unsigned char) ((x >> 24) & 0xff);
x = (acc_uint32l_t) (v >> 32);
b[3] = (unsigned char) ((x >> 0) & 0xff);
b[2] = (unsigned char) ((x >> 8) & 0xff);
b[1] = (unsigned char) ((x >> 16) & 0xff);
b[0] = (unsigned char) ((x >> 24) & 0xff);
#endif
}
#endif /* acc_uint64l_t */
/*************************************************************************
// le64
**************************************************************************/
#if defined(acc_uint64l_t)
ACCLIB_PUBLIC(acc_uint64l_t, acc_get_le64) (const acc_hvoid_p p)
{
#if (ACC_ARCH_AMD64)
return (* (const acc_uint64l_t *) (p));
#elif (ACC_ARCH_IA32)
const acc_uint32e_t* b = (const acc_uint32e_t*) p;
return ((acc_uint64l_t)b[0]) | ((acc_uint64l_t)b[1] << 32);
#elif (SIZEOF_LONG >= 8) || (SIZEOF_SIZE_T >= 8)
const acc_hbyte_p b = (const acc_hbyte_p) p;
return ((acc_uint64l_t)b[0]) | ((acc_uint64l_t)b[1] << 8) | ((acc_uint64l_t)b[2] << 16) | ((acc_uint64l_t)b[3] << 24) | ((acc_uint64l_t)b[4] << 32) | ((acc_uint64l_t)b[5] << 40) | ((acc_uint64l_t)b[6] << 48) | ((acc_uint64l_t)b[7] << 56);
#else
const acc_hbyte_p b = (const acc_hbyte_p) p;
acc_uint32l_t v0, v1;
v0 = ((acc_uint32l_t)b[0]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[2] << 16) | ((acc_uint32l_t)b[3] << 24);
b += 4;
v1 = ((acc_uint32l_t)b[0]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[2] << 16) | ((acc_uint32l_t)b[3] << 24);
return ((acc_uint64l_t)v0) | ((acc_uint64l_t)v1 << 32);
#endif
}
ACCLIB_PUBLIC(void, acc_set_le64) (acc_hvoid_p p, acc_uint64l_t v)
{
#if (ACC_ARCH_AMD64)
(* (acc_uint64l_t *) (p)) = v;
#elif (ACC_ARCH_IA32)
(((acc_uint32e_t *)(p))[0] = (acc_uint32e_t) (v >> 0));
(((acc_uint32e_t *)(p))[1] = (acc_uint32e_t) (v >> 32));
#elif (SIZEOF_LONG >= 8) || (SIZEOF_SIZE_T >= 8)
acc_hbyte_p b = (acc_hbyte_p) p;
b[0] = (unsigned char) ((v >> 0) & 0xff);
b[1] = (unsigned char) ((v >> 8) & 0xff);
b[2] = (unsigned char) ((v >> 16) & 0xff);
b[3] = (unsigned char) ((v >> 24) & 0xff);
b[4] = (unsigned char) ((v >> 32) & 0xff);
b[5] = (unsigned char) ((v >> 40) & 0xff);
b[6] = (unsigned char) ((v >> 48) & 0xff);
b[7] = (unsigned char) ((v >> 56) & 0xff);
#else
acc_hbyte_p b = (acc_hbyte_p) p;
acc_uint32l_t x;
x = (acc_uint32l_t) (v >> 0);
b[0] = (unsigned char) ((x >> 0) & 0xff);
b[1] = (unsigned char) ((x >> 8) & 0xff);
b[2] = (unsigned char) ((x >> 16) & 0xff);
b[3] = (unsigned char) ((x >> 24) & 0xff);
x = (acc_uint32l_t) (v >> 32);
b[4] = (unsigned char) ((x >> 0) & 0xff);
b[5] = (unsigned char) ((x >> 8) & 0xff);
b[6] = (unsigned char) ((x >> 16) & 0xff);
b[7] = (unsigned char) ((x >> 24) & 0xff);
#endif
}
#endif /* acc_uint64l_t */
/*
vi:ts=4:et
*/
-106
View File
@@ -1,106 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_DOSALLOC_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
#if (ACC_OS_OS216)
ACC_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short);
ACC_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short);
#endif
/***********************************************************************
// dos_alloc
************************************************************************/
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
#if !defined(ACC_CC_AZTECC)
ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size)
{
void __far* p = 0;
union REGS ri, ro;
if ((long)size <= 0)
return p;
size = (size + 15) >> 4;
if (size > 0xffffu)
return p;
ri.x.ax = 0x4800;
ri.x.bx = (unsigned short) size;
int86(0x21, &ri, &ro);
if ((ro.x.cflag & 1) == 0) /* if carry flag not set */
p = (void __far*) ACC_MK_FP(ro.x.ax, 0);
return p;
}
ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
{
union REGS ri, ro;
struct SREGS rs;
if (!p)
return 0;
if (ACC_FP_OFF(p) != 0)
return -1;
segread(&rs);
ri.x.ax = 0x4900;
rs.es = ACC_FP_SEG(p);
int86x(0x21, &ri, &ro, &rs);
if (ro.x.cflag & 1) /* if carry flag set */
return -1;
return 0;
}
#endif
#endif
#if (ACC_OS_OS216)
ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size)
{
void __far* p = 0;
unsigned short sel = 0;
if ((long)size <= 0)
return p;
if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0)
p = (void __far*) ACC_MK_FP(sel, 0);
return p;
}
ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
{
if (!p)
return 0;
if (ACC_FP_OFF(p) != 0)
return -1;
if (DosFreeSeg(ACC_FP_SEG(p)) != 0)
return -1;
return 0;
}
#endif
/*
vi:ts=4:et
*/
-157
View File
@@ -1,157 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_HALLOC_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
#if (ACC_HAVE_MM_HUGE_PTR)
#if 1 && (ACC_OS_DOS16 && defined(BLX286))
# define __ACCLIB_HALLOC_USE_DAH 1
#elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
# define __ACCLIB_HALLOC_USE_DAH 1
#elif 1 && (ACC_OS_OS216)
# define __ACCLIB_HALLOC_USE_DAH 1
#elif 1 && (ACC_OS_WIN16)
# define __ACCLIB_HALLOC_USE_GA 1
#elif 1 && (ACC_OS_DOS16) && (ACC_CC_BORLANDC) && defined(__DPMI16__)
# define __ACCLIB_HALLOC_USE_GA 1
#endif
#endif
#if (__ACCLIB_HALLOC_USE_DAH)
#if 0 && (ACC_OS_OS216)
#include <os2.h>
#else
ACC_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short);
ACC_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short);
#endif
#endif
#if (__ACCLIB_HALLOC_USE_GA)
#if 0
#define STRICT 1
#include <windows.h>
#else
ACC_EXTERN_C const void __near* __far __pascal GlobalAlloc(unsigned, unsigned long);
ACC_EXTERN_C const void __near* __far __pascal GlobalFree(const void __near*);
ACC_EXTERN_C unsigned long __far __pascal GlobalHandle(unsigned);
ACC_EXTERN_C void __far* __far __pascal GlobalLock(const void __near*);
ACC_EXTERN_C int __far __pascal GlobalUnlock(const void __near*);
#endif
#endif
/***********************************************************************
// halloc
************************************************************************/
ACCLIB_PUBLIC(acc_hvoid_p, acc_halloc) (acc_hsize_t size)
{
acc_hvoid_p p = 0;
if (size <= 0)
return p;
#if 0 && defined(__palmos__)
p = MemPtrNew(size);
#elif !defined(ACC_HAVE_MM_HUGE_PTR)
if (size < (size_t) -1)
p = malloc((size_t) size);
#else
if ((long)size <= 0)
return p;
{
#if (__ACCLIB_HALLOC_USE_DAH)
unsigned short sel = 0;
if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0)
p = (acc_hvoid_p) ACC_MK_FP(sel, 0);
#elif (__ACCLIB_HALLOC_USE_GA)
const void __near* h = GlobalAlloc(2, size);
if (h) {
p = GlobalLock(h);
if (p && ACC_FP_OFF(p) != 0) {
GlobalUnlock(h);
p = 0;
}
if (!p)
GlobalFree(h);
}
#elif (ACC_CC_MSC && (_MSC_VER >= 700))
p = _halloc(size, 1);
#elif (ACC_CC_MSC || ACC_CC_WATCOMC)
p = halloc(size, 1);
#elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
p = farmalloc(size);
#elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
p = farmalloc(size);
#elif defined(ACC_CC_AZTECC)
p = lmalloc(size);
#else
if (size < (size_t) -1)
p = malloc((size_t) size);
#endif
}
#endif
return p;
}
ACCLIB_PUBLIC(void, acc_hfree) (acc_hvoid_p p)
{
if (!p)
return;
#if 0 && defined(__palmos__)
MemPtrFree(p);
#elif !defined(ACC_HAVE_MM_HUGE_PTR)
free(p);
#else
#if (__ACCLIB_HALLOC_USE_DAH)
if (ACC_FP_OFF(p) == 0)
DosFreeSeg((unsigned short) ACC_FP_SEG(p));
#elif (__ACCLIB_HALLOC_USE_GA)
if (ACC_FP_OFF(p) == 0) {
const void __near* h = (const void __near*) (unsigned) GlobalHandle(ACC_FP_SEG(p));
if (h) {
GlobalUnlock(h);
GlobalFree(h);
}
}
#elif (ACC_CC_MSC && (_MSC_VER >= 700))
_hfree(p);
#elif (ACC_CC_MSC || ACC_CC_WATCOMC)
hfree(p);
#elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
farfree((void __far*) p);
#elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
farfree((void __far*) p);
#elif defined(ACC_CC_AZTECC)
lfree(p);
#else
free(p);
#endif
#endif
}
/*
vi:ts=4:et
*/
-114
View File
@@ -1,114 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_HFREAD_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/***********************************************************************
// huge pointer layer - stdio.h
************************************************************************/
ACCLIB_PUBLIC(acc_hsize_t, acc_hfread) (ACC_FILE_P fp, acc_hvoid_p buf, acc_hsize_t size)
{
#if (ACC_HAVE_MM_HUGE_PTR)
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
unsigned char tmp[512];
acc_hsize_t l = 0;
while (l < size)
{
size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l);
n = fread(tmp, 1, n, fp);
if (n == 0)
break;
__ACCLIB_FUNCNAME(acc_hmemcpy)((acc_hbyte_p)buf + l, tmp, (acc_hsize_t)n);
l += n;
}
return l;
#elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
acc_hbyte_p b = (acc_hbyte_p) buf;
acc_hsize_t l = 0;
while (l < size)
{
size_t n;
n = ACC_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
if ((acc_hsize_t) n > size - l)
n = (size_t) (size - l);
n = fread((void __far*)b, 1, n, fp);
if (n == 0)
break;
b += n; l += n;
}
return l;
#else
# error "unknown memory model"
#endif
#else
return fread(buf, 1, size, fp);
#endif
}
ACCLIB_PUBLIC(acc_hsize_t, acc_hfwrite) (ACC_FILE_P fp, const acc_hvoid_p buf, acc_hsize_t size)
{
#if (ACC_HAVE_MM_HUGE_PTR)
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
unsigned char tmp[512];
acc_hsize_t l = 0;
while (l < size)
{
size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l);
__ACCLIB_FUNCNAME(acc_hmemcpy)(tmp, (const acc_hbyte_p)buf + l, (acc_hsize_t)n);
n = fwrite(tmp, 1, n, fp);
if (n == 0)
break;
l += n;
}
return l;
#elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
const acc_hbyte_p b = (const acc_hbyte_p) buf;
acc_hsize_t l = 0;
while (l < size)
{
size_t n;
n = ACC_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
if ((acc_hsize_t) n > size - l)
n = (size_t) (size - l);
n = fwrite((void __far*)b, 1, n, fp);
if (n == 0)
break;
b += n; l += n;
}
return l;
#else
# error "unknown memory model"
#endif
#else
return fwrite(buf, 1, size, fp);
#endif
}
/*
vi:ts=4:et
*/
-111
View File
@@ -1,111 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_HMEMCPY_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/***********************************************************************
// memcmp, memcpy, memmove, memset
************************************************************************/
ACCLIB_PUBLIC(int, acc_hmemcmp) (const acc_hvoid_p s1, const acc_hvoid_p s2, acc_hsize_t len)
{
#if (ACC_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCMP)
const acc_hbyte_p p1 = (const acc_hbyte_p) s1;
const acc_hbyte_p p2 = (const acc_hbyte_p) s2;
if (len > 0) do
{
int d = *p1 - *p2;
if (d != 0)
return d;
p1++; p2++;
} while (--len > 0);
return 0;
#else
return memcmp(s1, s2, len);
#endif
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len)
{
#if (ACC_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCPY)
acc_hbyte_p p1 = (acc_hbyte_p) dest;
const acc_hbyte_p p2 = (const acc_hbyte_p) src;
if (len <= 0 || p1 == p2)
return dest;
do
*p1++ = *p2++;
while (--len > 0);
return dest;
#else
return memcpy(dest, src, len);
#endif
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len)
{
#if (ACC_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMMOVE)
acc_hbyte_p p1 = (acc_hbyte_p) dest;
const acc_hbyte_p p2 = (const acc_hbyte_p) src;
if (len <= 0 || p1 == p2)
return dest;
if (p1 < p2)
{
do
*p1++ = *p2++;
while (--len > 0);
}
else
{
p1 += len;
p2 += len;
do
*--p1 = *--p2;
while (--len > 0);
}
return dest;
#else
return memmove(dest, src, len);
#endif
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemset) (acc_hvoid_p s, int c, acc_hsize_t len)
{
#if (ACC_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMSET)
acc_hbyte_p p = (acc_hbyte_p) s;
if (len > 0) do
*p++ = (unsigned char) c;
while (--len > 0);
return s;
#else
return memset(s, c, len);
#endif
}
/*
vi:ts=4:et
*/
-118
View File
@@ -1,118 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_HREAD_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/***********************************************************************
// huge pointer layer - read/write
************************************************************************/
#if (ACC_HAVE_MM_HUGE_PTR)
ACCLIB_PUBLIC(long, acc_hread) (int fd, acc_hvoid_p buf, long size)
{
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
unsigned char tmp[512];
long l = 0;
while (l < size)
{
int n = size - l > (long)sizeof(tmp) ? (int) sizeof(tmp) : (int) (size - l);
n = read(fd, tmp, n);
if (n == 0)
break;
if (n < 0)
return -1;
__ACCLIB_FUNCNAME(acc_hmemcpy)((acc_hbyte_p)buf + l, tmp, (acc_hsize_t)n);
l += n;
}
return l;
#elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
acc_hbyte_p b = (acc_hbyte_p) buf;
long l = 0;
while (l < size)
{
unsigned n;
n = ACC_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
if ((long) n > size - l)
n = (unsigned) (size - l);
n = read(fd, (void __far*)b, n);
if (n == 0)
break;
if (n == (unsigned)-1)
return -1;
b += n; l += n;
}
return l;
#else
# error "unknown memory model"
#endif
}
ACCLIB_PUBLIC(long, acc_hwrite) (int fd, const acc_hvoid_p buf, long size)
{
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
unsigned char tmp[512];
long l = 0;
while (l < size)
{
int n = size - l > (long)sizeof(tmp) ? (int) sizeof(tmp) : (int) (size - l);
__ACCLIB_FUNCNAME(acc_hmemcpy)(tmp, (const acc_hbyte_p)buf + l, (acc_hsize_t)n);
n = write(fd, tmp, n);
if (n == 0)
break;
if (n < 0)
return -1;
l += n;
}
return l;
#elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
const acc_hbyte_p b = (const acc_hbyte_p) buf;
long l = 0;
while (l < size)
{
unsigned n;
n = ACC_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
if ((long) n > size - l)
n = (unsigned) (size - l);
n = write(fd, (void __far*)b, n);
if (n == 0)
break;
if (n == (unsigned)-1)
return -1;
b += n; l += n;
}
return l;
#else
# error "unknown memory model"
#endif
}
#endif /* #if (ACC_HAVE_MM_HUGE_PTR) */
/*
vi:ts=4:et
*/
-97
View File
@@ -1,97 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_HSREAD_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/***********************************************************************
// huge pointer layer - safe read/write
// handles partial pipe writes and interrupted system calls
************************************************************************/
ACCLIB_PUBLIC(long, acc_safe_hread) (int fd, acc_hvoid_p buf, long size)
{
acc_hbyte_p b = (acc_hbyte_p) buf;
long l = 0;
int saved_errno;
saved_errno = errno;
while (l < size)
{
long n = size - l;
#if (ACC_HAVE_MM_HUGE_PTR)
# define __ACCLIB_REQUIRE_HREAD_CH 1
errno = 0; n = acc_hread(fd, b, n);
#elif (ACC_OS_DOS32) && defined(__DJGPP__)
errno = 0; n = _read(fd, b, n);
#else
errno = 0; n = read(fd, b, n);
#endif
if (n == 0)
break;
if (n < 0) {
#if defined(EINTR)
if (errno == (EINTR)) continue;
#endif
if (errno == 0) errno = 1;
return l;
}
b += n; l += n;
}
errno = saved_errno;
return l;
}
ACCLIB_PUBLIC(long, acc_safe_hwrite) (int fd, const acc_hvoid_p buf, long size)
{
const acc_hbyte_p b = (const acc_hbyte_p) buf;
long l = 0;
int saved_errno;
saved_errno = errno;
while (l < size)
{
long n = size - l;
#if (ACC_HAVE_MM_HUGE_PTR)
# define __ACCLIB_REQUIRE_HREAD_CH 1
errno = 0; n = acc_hwrite(fd, b, n);
#elif (ACC_OS_DOS32) && defined(__DJGPP__)
errno = 0; n = _write(fd, b, n);
#else
errno = 0; n = write(fd, b, n);
#endif
if (n == 0)
break;
if (n < 0) {
#if defined(EINTR)
if (errno == (EINTR)) continue;
#endif
if (errno == 0) errno = 1;
return l;
}
b += n; l += n;
}
errno = saved_errno;
return l;
}
/*
vi:ts=4:et
*/
-566
View File
@@ -1,566 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_HSTRING_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/***********************************************************************
// strlen
************************************************************************/
ACCLIB_PUBLIC(acc_hsize_t, acc_hstrlen) (const acc_hchar_p s)
{
/* TODO: which one is the fastest generic version? */
#if 1
const acc_hchar_p start = s; while (*s) ++s;
return (acc_hsize_t) (s - start);
#elif 1
acc_hsize_t n = 0; while (*s) ++s, ++n; return n;
#elif 1
acc_hsize_t n = 0; while (s[n]) ++n; return n;
#endif
}
/***********************************************************************
// strcmp, strncmp, ascii_stricmp, ascii_strnicmp, ascii_memicmp
************************************************************************/
ACCLIB_PUBLIC(int, acc_hstrcmp) (const acc_hchar_p p, const acc_hchar_p s)
{
for ( ; *p; ++p, ++s) {
if (*p != *s)
break;
}
return (unsigned char)*p - (unsigned char)*s;
}
ACCLIB_PUBLIC(int, acc_hstrncmp) (const acc_hchar_p p, const acc_hchar_p s, acc_hsize_t n)
{
for ( ; *p && n > 0; ++p, ++s, --n) {
if (*p != *s)
break;
}
return (unsigned char)*p - (unsigned char)*s;
}
ACCLIB_PUBLIC(int, acc_ascii_hstricmp) (const acc_hchar_p p, const acc_hchar_p s)
{
for ( ; *p; ++p, ++s) {
if (*p != *s) {
int d = acc_ascii_utolower(*p) - acc_ascii_utolower(*s);
if (d != 0)
return d;
}
}
return acc_ascii_utolower(*p) - acc_ascii_utolower(*s);
}
ACCLIB_PUBLIC(int, acc_ascii_hstrnicmp) (const acc_hchar_p p, const acc_hchar_p s, acc_hsize_t n)
{
for ( ; *p && n > 0; ++p, ++s, --n) {
if (*p != *s) {
int d = acc_ascii_utolower(*p) - acc_ascii_utolower(*s);
if (d != 0)
return d;
}
}
return acc_ascii_utolower(*p) - acc_ascii_utolower(*s);
}
ACCLIB_PUBLIC(int, acc_ascii_hmemicmp) (const acc_hvoid_p pp, const acc_hvoid_p ss, acc_hsize_t n)
{
const acc_hbyte_p p = (const acc_hbyte_p) pp;
const acc_hbyte_p s = (const acc_hbyte_p) ss;
for ( ; n > 0; ++p, ++s, --n) {
if (*p != *s) {
int d = acc_ascii_utolower(*p) - acc_ascii_utolower(*s);
if (d != 0)
return d;
}
}
return acc_ascii_utolower(*p) - acc_ascii_utolower(*s);
}
/***********************************************************************
// strstr, ascii_stristr, memmem, ascii_memimem
************************************************************************/
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrstr) (const acc_hchar_p p, const acc_hchar_p s)
{
acc_hsize_t pn = __ACCLIB_FUNCNAME(acc_hstrlen)(p);
acc_hsize_t sn = __ACCLIB_FUNCNAME(acc_hstrlen)(s);
return (acc_hchar_p) __ACCLIB_FUNCNAME(acc_hmemmem)(p, pn, s, sn);
}
ACCLIB_PUBLIC(acc_hchar_p, acc_ascii_hstristr) (const acc_hchar_p p, const acc_hchar_p s)
{
acc_hsize_t pn = __ACCLIB_FUNCNAME(acc_hstrlen)(p);
acc_hsize_t sn = __ACCLIB_FUNCNAME(acc_hstrlen)(s);
return (acc_hchar_p) __ACCLIB_FUNCNAME(acc_ascii_hmemimem)(p, pn, s, sn);
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemmem) (const acc_hvoid_p p, acc_hsize_t pn, const acc_hvoid_p s, acc_hsize_t sn)
{
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
if (sn == 0) __ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
for ( ; pn >= sn; --pn) {
if (__ACCLIB_FUNCNAME(acc_hmemcmp)(p, s, sn) == 0)
__ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
p = (const acc_hbyte_p)p + 1;
}
return (acc_hvoid_p) 0;
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_ascii_hmemimem) (const acc_hvoid_p p, acc_hsize_t pn, const acc_hvoid_p s, acc_hsize_t sn)
{
if (sn == 0) __ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
for ( ; pn >= sn; --pn) {
if (__ACCLIB_FUNCNAME(acc_ascii_hmemicmp)(p, s, sn) == 0)
__ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
p = (const acc_hbyte_p)p + 1;
}
return (acc_hvoid_p) 0;
}
/***********************************************************************
// strcpy, strcat
************************************************************************/
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrcpy) (acc_hchar_p d, const acc_hchar_p s)
{
acc_hchar_p dest = d;
for (;;) {
if ((*d = *s) == 0) return dest;
++d; ++s;
}
}
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrcat) (acc_hchar_p d, const acc_hchar_p s)
{
acc_hchar_p dest = d;
while (*d) ++d;
for (;;) {
if ((*d = *s) == 0) return dest;
++d; ++s;
}
}
/***********************************************************************
// strlcpy, strlcat
************************************************************************/
ACCLIB_PUBLIC(acc_hsize_t, acc_hstrlcpy) (acc_hchar_p d, const acc_hchar_p s, acc_hsize_t size)
{
acc_hsize_t n = 0;
if (n != size) {
do {
if ((*d = *s) == 0) return n;
++d; ++s; ++n;
} while (n != size);
d[-1] = 0;
}
while (*s) ++s, ++n;
return n;
}
ACCLIB_PUBLIC(acc_hsize_t, acc_hstrlcat) (acc_hchar_p d, const acc_hchar_p s, acc_hsize_t size)
{
acc_hsize_t n = 0;
while (*d && n != size) ++d, ++n;
if (n != size) {
do {
if ((*d = *s) == 0) return n;
++d; ++s; ++n;
} while (n != size);
d[-1] = 0;
}
while (*s) ++s, ++n;
return n;
}
/***********************************************************************
// strscpy, strscat
// (same as strlcpy/strlcat, but just return -1 in case of failure)
************************************************************************/
ACCLIB_PUBLIC(int, acc_hstrscpy) (acc_hchar_p d, const acc_hchar_p s, acc_hsize_t size)
{
acc_hsize_t n = 0;
if (n != size) {
do {
if ((*d = *s) == 0) return 0;
++d; ++s; ++n;
} while (n != size);
d[-1] = 0;
}
return -1;
}
ACCLIB_PUBLIC(int, acc_hstrscat) (acc_hchar_p d, const acc_hchar_p s, acc_hsize_t size)
{
acc_hsize_t n = 0;
while (*d && n != size) ++d, ++n;
if (n != size) {
do {
if ((*d = *s) == 0) return 0;
++d; ++s; ++n;
} while (n != size);
d[-1] = 0;
}
return -1;
}
/***********************************************************************
// strccpy, memccpy
************************************************************************/
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrccpy) (acc_hchar_p d, const acc_hchar_p s, int c)
{
for (;;) {
if ((*d = *s) == 0) break;
if (*d++ == (char) c) return d;
++s;
}
return (acc_hchar_p) 0;
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemccpy) (acc_hvoid_p d, const acc_hvoid_p s, int c, acc_hsize_t n)
{
acc_hbyte_p a = (acc_hbyte_p) d;
const acc_hbyte_p p = (const acc_hbyte_p) s;
const acc_hbyte_p e = (const acc_hbyte_p) s + n;
while (p != e) {
if ((*a++ = *p++) == (unsigned char) c)
return a;
}
return (acc_hvoid_p) 0;
}
/***********************************************************************
// strchr, strrchr, ascii_strichr, ascii_strrichr
************************************************************************/
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrchr) (const acc_hchar_p s, int c)
{
for ( ; *s; ++s) {
if (*s == (char) c)
__ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
}
if ((char) c == 0) __ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
return (acc_hchar_p) 0;
}
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrrchr) (const acc_hchar_p s, int c)
{
const acc_hchar_p start = s;
while (*s) ++s;
if ((char) c == 0) __ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
for (;;) {
if (s == start) break; --s;
if (*s == (char) c)
__ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
}
return (acc_hchar_p) 0;
}
ACCLIB_PUBLIC(acc_hchar_p, acc_ascii_hstrichr) (const acc_hchar_p s, int c)
{
c = acc_ascii_utolower(c);
for ( ; *s; ++s) {
if (acc_ascii_utolower(*s) == c)
__ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
}
if (c == 0) __ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
return (acc_hchar_p) 0;
}
ACCLIB_PUBLIC(acc_hchar_p, acc_ascii_hstrrichr) (const acc_hchar_p s, int c)
{
const acc_hchar_p start = s;
c = acc_ascii_utolower(c);
while (*s) ++s;
if (c == 0) __ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
for (;;) {
if (s == start) break; --s;
if (acc_ascii_utolower(*s) == c)
__ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
}
return (acc_hchar_p) 0;
}
/***********************************************************************
// memchr, memrchr, ascii_memichr, ascii_memrichr
************************************************************************/
ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemchr) (const acc_hvoid_p s, int c, acc_hsize_t n)
{
const acc_hbyte_p p = (const acc_hbyte_p) s;
const acc_hbyte_p e = (const acc_hbyte_p) s + n;
while (p != e) {
if (*p == (unsigned char) c)
__ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
++p;
}
return (acc_hvoid_p) 0;
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemrchr) (const acc_hvoid_p s, int c, acc_hsize_t n)
{
const acc_hbyte_p p = (const acc_hbyte_p) s + n;
const acc_hbyte_p e = (const acc_hbyte_p) s;
while (p != e) {
--p;
if (*p == (unsigned char) c)
__ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
}
return (acc_hvoid_p) 0;
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_ascii_hmemichr) (const acc_hvoid_p s, int c, acc_hsize_t n)
{
const acc_hbyte_p p = (const acc_hbyte_p) s;
const acc_hbyte_p e = (const acc_hbyte_p) s + n;
c = acc_ascii_utolower(c);
while (p != e) {
if (acc_ascii_utolower(*p) == c)
__ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
++p;
}
return (acc_hvoid_p) 0;
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_ascii_hmemrichr) (const acc_hvoid_p s, int c, acc_hsize_t n)
{
const acc_hbyte_p p = (const acc_hbyte_p) s + n;
const acc_hbyte_p e = (const acc_hbyte_p) s;
c = acc_ascii_utolower(c);
while (p != e) {
--p;
if (acc_ascii_utolower(*p) == c)
__ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
}
return (acc_hvoid_p) 0;
}
/***********************************************************************
// strspn, strrspn
************************************************************************/
ACCLIB_PUBLIC(acc_hsize_t, acc_hstrspn) (const acc_hchar_p s, const acc_hchar_p accept)
{
acc_hsize_t n = 0;
for ( ; *s; ++s) {
const acc_hchar_p a;
for (a = accept; *a; ++a)
if (*s == *a)
goto acc_label_next;
break;
acc_label_next:
++n;
}
return n;
}
ACCLIB_PUBLIC(acc_hsize_t, acc_hstrrspn) (const acc_hchar_p s, const acc_hchar_p accept)
{
acc_hsize_t n = 0;
const acc_hchar_p start = s;
while (*s) ++s;
for (;;) {
const acc_hchar_p a;
if (s == start) break; --s;
for (a = accept; *a; ++a)
if (*s == *a)
goto acc_label_next;
break;
acc_label_next:
++n;
}
return n;
}
/***********************************************************************
// strcspn, strrcspn
************************************************************************/
ACCLIB_PUBLIC(acc_hsize_t, acc_hstrcspn) (const acc_hchar_p s, const acc_hchar_p reject)
{
acc_hsize_t n = 0;
for ( ; *s; ++s, ++n) {
const acc_hchar_p r;
for (r = reject; *r; ++r)
if (*s == *r)
return n;
}
return n;
}
ACCLIB_PUBLIC(acc_hsize_t, acc_hstrrcspn) (const acc_hchar_p s, const acc_hchar_p reject)
{
acc_hsize_t n = 0;
const acc_hchar_p start = s;
while (*s) ++s;
for ( ; ; ++n) {
const acc_hchar_p r;
if (s == start) break; --s;
for (r = reject; *r; ++r)
if (*s == *r)
return n;
}
return n;
}
/***********************************************************************
// strpbrk, strrpbrk
************************************************************************/
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrpbrk) (const acc_hchar_p s, const acc_hchar_p accept)
{
for ( ; *s; ++s) {
const acc_hchar_p a;
for (a = accept; *a; ++a) {
if (*s == *a)
__ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
}
}
return (acc_hchar_p) 0;
}
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrrpbrk) (const acc_hchar_p s, const acc_hchar_p accept)
{
const acc_hchar_p start = s;
while (*s) ++s;
for (;;) {
const acc_hchar_p a;
if (s == start) break; --s;
for (a = accept; *a; ++a) {
if (*s == *a)
__ACCLIB_CONST_CAST_RETURN(acc_hchar_p, s)
}
}
return (acc_hchar_p) 0;
}
/***********************************************************************
// strsep, strrsep
************************************************************************/
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrsep) (acc_hchar_pp ss, const acc_hchar_p delim)
{
acc_hchar_p s = *ss;
if (s) {
acc_hchar_p p = __ACCLIB_FUNCNAME(acc_hstrpbrk)(s, delim);
if (p) *p++ = 0;
*ss = p;
}
return s;
}
ACCLIB_PUBLIC(acc_hchar_p, acc_hstrrsep) (acc_hchar_pp ss, const acc_hchar_p delim)
{
acc_hchar_p s = *ss;
if (s) {
acc_hchar_p p = __ACCLIB_FUNCNAME(acc_hstrrpbrk)(s, delim);
if (p) {
*p++ = 0;
return p;
}
*ss = (acc_hchar_p) 0;
}
return s;
}
/***********************************************************************
// ascii_strlwr, ascii_strupr, ascii_memlwr, ascii_memupr
************************************************************************/
ACCLIB_PUBLIC(acc_hchar_p, acc_ascii_hstrlwr) (acc_hchar_p s)
{
acc_hbyte_p p = (acc_hbyte_p) s;
for ( ; *p; ++p)
*p = (unsigned char) acc_ascii_utolower(*p);
return s;
}
ACCLIB_PUBLIC(acc_hchar_p, acc_ascii_hstrupr) (acc_hchar_p s)
{
acc_hbyte_p p = (acc_hbyte_p) s;
for ( ; *p; ++p)
*p = (unsigned char) acc_ascii_utoupper(*p);
return s;
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_ascii_hmemlwr) (acc_hvoid_p s, acc_hsize_t n)
{
acc_hbyte_p p = (acc_hbyte_p) s;
acc_hbyte_p e = (acc_hbyte_p) s + n;
for ( ; p != e; ++p)
*p = (unsigned char) acc_ascii_utolower(*p);
return s;
}
ACCLIB_PUBLIC(acc_hvoid_p, acc_ascii_hmemupr) (acc_hvoid_p s, acc_hsize_t n)
{
acc_hbyte_p p = (acc_hbyte_p) s;
acc_hbyte_p e = (acc_hbyte_p) s + n;
for ( ; p != e; ++p)
*p = (unsigned char) acc_ascii_utoupper(*p);
return s;
}
/*
vi:ts=4:et
*/
-199
View File
@@ -1,199 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_MISC_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/*************************************************************************
// wrap misc
**************************************************************************/
ACCLIB_PUBLIC(acclib_handle_t, acc_get_osfhandle) (int fd)
{
if (fd < 0)
return -1;
#if (ACC_OS_CYGWIN)
return get_osfhandle(fd);
#elif (ACC_OS_EMX && defined(__RSXNT__))
return -1; /* FIXME */
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
return -1; /* FIXME */
#elif (ACC_OS_WIN32 || ACC_OS_WIN64)
# if (ACC_CC_PELLESC && (__POCC__ < 280))
return -1; /* FIXME */
# elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
return -1; /* FIXME */
# elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
return _os_handle(fd);
# else
return _get_osfhandle(fd);
# endif
#else
return fd;
#endif
}
ACCLIB_PUBLIC(int, acc_set_binmode) (int fd, int binary)
{
#if (ACC_OS_TOS && defined(__MINT__))
FILE* fp; int old_binary;
if (fd == STDIN_FILENO) fp = stdin;
else if (fd == STDOUT_FILENO) fp = stdout;
else if (fd == STDERR_FILENO) fp = stderr;
else return -1;
old_binary = fp->__mode.__binary;
__set_binmode(fp, binary ? 1 : 0);
return old_binary ? 1 : 0;
#elif (ACC_OS_TOS)
ACC_UNUSED(fd); ACC_UNUSED(binary);
return -1; /* FIXME */
#elif (ACC_OS_DOS16 && (ACC_CC_AZTECC || ACC_CC_PACIFICC))
ACC_UNUSED(fd); ACC_UNUSED(binary);
return -1; /* FIXME */
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
int r; unsigned old_flags = __djgpp_hwint_flags;
ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
ACC_COMPILE_TIME_ASSERT(O_TEXT > 0)
if (fd < 0) return -1;
r = setmode(fd, binary ? O_BINARY : O_TEXT);
if ((old_flags & 1u) != (__djgpp_hwint_flags & 1u))
__djgpp_set_ctrl_c(!(old_flags & 1));
if (r == -1) return -1;
return (r & O_TEXT) ? 0 : 1;
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
if (fd < 0) return -1;
ACC_UNUSED(binary);
return 1;
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
FILE* fp; int r;
if (fd == fileno(stdin)) fp = stdin;
else if (fd == fileno(stdout)) fp = stdout;
else if (fd == fileno(stderr)) fp = stderr;
else return -1;
r = _setmode(fp, binary ? _BINARY : _TEXT);
if (r == -1) return -1;
return (r & _BINARY) ? 1 : 0;
#elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
ACC_UNUSED(fd); ACC_UNUSED(binary);
return -1; /* FIXME */
#elif (ACC_OS_CYGWIN && (ACC_CC_GNUC < 0x025a00ul))
ACC_UNUSED(fd); ACC_UNUSED(binary);
return -1; /* FIXME */
#elif (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
int r;
#if !defined(ACC_CC_ZORTECHC)
ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
#endif
ACC_COMPILE_TIME_ASSERT(O_TEXT > 0)
if (fd < 0) return -1;
r = setmode(fd, binary ? O_BINARY : O_TEXT);
if (r == -1) return -1;
return (r & O_TEXT) ? 0 : 1;
#else
if (fd < 0) return -1;
ACC_UNUSED(binary);
return 1;
#endif
}
ACCLIB_PUBLIC(int, acc_isatty) (int fd)
{
/* work around library implementations that think that
* any character device like `nul' is a tty */
if (fd < 0)
return 0;
#if (ACC_OS_DOS16 && !defined(ACC_CC_AZTECC))
{
union REGS ri, ro;
ri.x.ax = 0x4400; ri.x.bx = fd;
int86(0x21, &ri, &ro);
if ((ro.x.cflag & 1) == 0) /* if carry flag not set */
if ((ro.x.ax & 0x83) != 0x83)
return 0;
}
#elif (ACC_OS_DOS32 && ACC_CC_WATCOMC)
{
union REGS ri, ro;
ri.w.ax = 0x4400; ri.w.bx = (unsigned short) fd;
int386(0x21, &ri, &ro);
if ((ro.w.cflag & 1) == 0) /* if carry flag not set */
if ((ro.w.ax & 0x83) != 0x83)
return 0;
}
#elif (ACC_HAVE_WINDOWS_H)
{
acclib_handle_t h = __ACCLIB_FUNCNAME(acc_get_osfhandle)(fd);
if ((HANDLE)h != INVALID_HANDLE_VALUE)
{
DWORD d = 0;
if (GetConsoleMode((HANDLE)h, &d) == 0)
return 0; /* GetConsoleMode failed -> not a tty */
}
}
#endif
return (isatty(fd)) ? 1 : 0;
}
ACCLIB_PUBLIC(int, acc_mkdir) (const char* name, unsigned mode)
{
#if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
ACC_UNUSED(mode);
return Dcreate(name);
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
return mkdir(name, mode);
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
return mkdir(name, mode);
#elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
ACC_UNUSED(mode);
# if (ACC_CC_HIGHC || ACC_CC_PACIFICC)
return mkdir((char*) name);
# else
return mkdir(name);
# endif
#else
return mkdir(name, mode);
#endif
}
ACCLIB_PUBLIC(acc_int32l_t, acc_muldiv32) (acc_int32l_t a, acc_int32l_t b, acc_int32l_t x)
{
acc_int32l_t r = 0;
if (x == 0) return x;
/* FIXME */
ACC_UNUSED(a); ACC_UNUSED(b);
return r;
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_umuldiv32) (acc_uint32l_t a, acc_uint32l_t b, acc_uint32l_t x)
{
acc_uint32l_t r = 0;
if (x == 0) return x;
/* FIXME */
ACC_UNUSED(a); ACC_UNUSED(b);
return r;
}
/*
vi:ts=4:et
*/
-255
View File
@@ -1,255 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_OPENDIR_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/*************************************************************************
// wrap <dirent.h>
**************************************************************************/
#if !defined(__ACCLIB_USE_OPENDIR)
#if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_TOS || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
static int __ACCLIB_FUNCNAME(acc_opendir_init)(acc_dir_p f, const char* path, char* buf, size_t bufsize)
{
size_t l; char* p;
f->f_name[0] = 0; buf[0] = 0;
l = strlen(path);
if (l == 0 || bufsize <= 4 || l >= bufsize - 4)
return -1;
strcpy(buf, path); p = buf + l;
if (p[-1] == ':' || p[-1] == '\\' || p[-1] == '/')
strcpy(p, "*.*");
else
strcpy(p, "\\*.*");
return 0;
}
#endif
#endif
#if defined(__ACCLIB_USE_OPENDIR)
ACCLIB_PUBLIC(int, acc_opendir) (acc_dir_p f, const char* path)
{
f->u_dirp = opendir(path);
if (!f->u_dirp)
return -2;
return __ACCLIB_FUNCNAME(acc_readdir)(f);
}
ACCLIB_PUBLIC(int, acc_readdir) (acc_dir_p f)
{
const struct dirent* dp;
f->f_name[0] = 0;
if (!f->u_dirp)
return -1;
dp = (const struct dirent*) readdir((DIR*) f->u_dirp);
if (!dp)
return -1;
if (!dp->d_name[0] || strlen(dp->d_name) >= sizeof(f->f_name))
return -1;
strcpy(f->f_name, dp->d_name);
#if (ACC_CC_WATCOMC)
ACC_COMPILE_TIME_ASSERT(sizeof(f->f_name) >= sizeof(dp->d_name))
f->f_time = dp->d_time;
f->f_date = dp->d_date;
f->f_size = dp->d_size;
#endif
return 0;
}
ACCLIB_PUBLIC(int, acc_closedir) (acc_dir_p f)
{
int r = -1;
if (f->u_dirp)
r = closedir((DIR*) f->u_dirp);
f->u_dirp = 0;
return r;
}
#elif (ACC_OS_WIN32 || ACC_OS_WIN64)
ACCLIB_PUBLIC(int, acc_opendir) (acc_dir_p f, const char* path)
{
WIN32_FIND_DATAA d;
HANDLE h;
if (__ACCLIB_FUNCNAME(acc_opendir_init)(f, path, f->f_name, sizeof(f->f_name)) != 0)
return -1;
h = FindFirstFileA(f->f_name, &d);
f->f_name[0] = 0;
if ((f->u_handle = (acclib_handle_t) h) == -1)
return -1;
if (!d.cFileName[0] || strlen(d.cFileName) >= sizeof(f->f_name))
return -1;
strcpy(f->f_name, d.cFileName);
f->f_attr = d.dwFileAttributes;
f->f_size_high = d.nFileSizeHigh;
f->f_size_low = d.nFileSizeLow;
return 0;
}
ACCLIB_PUBLIC(int, acc_readdir) (acc_dir_p f)
{
WIN32_FIND_DATAA d;
f->f_name[0] = 0;
if (f->u_handle == -1 || FindNextFileA((HANDLE) f->u_handle, &d) == 0)
return -1;
if (!d.cFileName[0] || strlen(d.cFileName) >= sizeof(f->f_name))
return -1;
strcpy(f->f_name, d.cFileName);
f->f_attr = d.dwFileAttributes;
f->f_size_high = d.nFileSizeHigh;
f->f_size_low = d.nFileSizeLow;
return 0;
}
ACCLIB_PUBLIC(int, acc_closedir) (acc_dir_p f)
{
int r = -1;
if (f->u_handle != -1)
r = FindClose((HANDLE) f->u_handle);
f->u_handle = -1;
return r;
}
#elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_WIN16)
ACCLIB_PUBLIC(int, acc_opendir) (acc_dir_p f, const char* path)
{
char tmp[ACC_FN_PATH_MAX+1];
int r;
f->u_dirp = 0;
if (__ACCLIB_FUNCNAME(acc_opendir_init)(f, path, tmp, sizeof(tmp)) != 0)
return -1;
#if (ACC_CC_AZTECC || ACC_CC_PACIFICC)
r = -1;
#elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
r = findfirst(tmp, (struct ffblk*) f->u_dta, FA_HIDDEN|FA_SYSTEM|FA_RDONLY|FA_DIREC);
#else
r = _dos_findfirst(tmp, _A_HIDDEN|_A_SYSTEM|_A_RDONLY|_A_SUBDIR, (struct find_t*) f->u_dta);
#endif
if (r != 0) f->f_name[0] = 0;
if (!f->f_name[0]) return -1;
f->u_dirp = 1;
return 0;
}
ACCLIB_PUBLIC(int, acc_readdir) (acc_dir_p f)
{
int r;
f->f_name[0] = 0;
if (!f->u_dirp)
return -1;
#if (ACC_CC_AZTECC || ACC_CC_PACIFICC)
r = -1;
#elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
r = findnext((struct ffblk*) f->u_dta);
#else
r = _dos_findnext((struct find_t*) f->u_dta);
#endif
if (r != 0) f->f_name[0] = 0;
if (!f->f_name[0]) return -1;
return 0;
}
ACCLIB_PUBLIC(int, acc_closedir) (acc_dir_p f)
{
ACC_COMPILE_TIME_ASSERT(sizeof(*f) == 44);
f->f_name[0] = 0;
f->u_dirp = 0;
return 0;
}
#elif (ACC_OS_TOS)
ACCLIB_PUBLIC(int, acc_opendir) (acc_dir_p f, const char* path)
{
char tmp[ACC_FN_PATH_MAX+1];
int r;
DTA* olddta;
f->u_dirp = 0;
if (__ACCLIB_FUNCNAME(acc_opendir_init)(f, path, tmp, sizeof(tmp)) != 0)
return -1;
olddta = Fgetdta();
Fsetdta((DTA*) f->u_dta);
r = Fsfirst(tmp, FA_HIDDEN|FA_SYSTEM|FA_READONLY|FA_SUBDIR);
Fsetdta(olddta);
if (r != 0) f->f_name[0] = 0;
if (!f->f_name[0]) return -1;
f->u_dirp = 1;
return 0;
}
ACCLIB_PUBLIC(int, acc_readdir) (acc_dir_p f)
{
int r;
DTA* olddta;
f->f_name[0] = 0;
if (!f->u_dirp)
return -1;
olddta = Fgetdta();
Fsetdta((DTA*) f->u_dta);
r = Fsnext();
Fsetdta(olddta);
if (r != 0) f->f_name[0] = 0;
if (!f->f_name[0]) return -1;
return 0;
}
ACCLIB_PUBLIC(int, acc_closedir) (acc_dir_p f)
{
ACC_COMPILE_TIME_ASSERT(sizeof(*f) == 44);
f->f_name[0] = 0;
f->u_dirp = 0;
return 0;
}
#else
ACCLIB_PUBLIC(int, acc_opendir) (acc_dir_p f, const char* path)
{
ACC_UNUSED(path);
f->f_name[0] = 0;
return -3;
}
ACCLIB_PUBLIC(int, acc_readdir) (acc_dir_p f)
{
f->f_name[0] = 0;
return -1;
}
ACCLIB_PUBLIC(int, acc_closedir) (acc_dir_p f)
{
f->u_dirp = 0;
return -1;
}
#endif
/*
vi:ts=4:et
*/
-135
View File
@@ -1,135 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_RAND_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
/*************************************************************************
// some linear congruential pseudo random number generators (PRNG)
**************************************************************************/
ACCLIB_PUBLIC(void, acc_srand31) (acc_rand31_p r, acc_uint32l_t seed)
{
r->seed = seed & ACC_UINT32L_C(0xffffffff);
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_rand31) (acc_rand31_p r)
{
r->seed = r->seed * ACC_UINT32L_C(1103515245) + 12345;
r->seed &= ACC_UINT32L_C(0x7fffffff);
return r->seed;
}
#if defined(acc_uint64l_t)
ACCLIB_PUBLIC(void, acc_srand48) (acc_rand48_p r, acc_uint32l_t seed)
{
r->seed = seed & ACC_UINT32L_C(0xffffffff);
r->seed <<= 16; r->seed |= 0x330e;
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48) (acc_rand48_p r)
{
r->seed = r->seed * ACC_UINT64L_C(25214903917) + 11;
r->seed &= ACC_UINT64L_C(0xffffffffffff);
return (acc_uint32l_t) (r->seed >> 17);
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p r)
{
r->seed = r->seed * ACC_UINT64L_C(25214903917) + 11;
r->seed &= ACC_UINT64L_C(0xffffffffffff);
return (acc_uint32l_t) (r->seed >> 16);
}
#endif /* acc_uint64l_t */
#if defined(acc_uint64l_t)
ACCLIB_PUBLIC(void, acc_srand64) (acc_rand64_p r, acc_uint64l_t seed)
{
r->seed = seed & ACC_UINT64L_C(0xffffffffffffffff);
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64) (acc_rand64_p r)
{
r->seed = r->seed * ACC_UINT64L_C(6364136223846793005) + 1;
#if (SIZEOF_ACC_INT64L_T > 8)
r->seed &= ACC_UINT64L_C(0xffffffffffffffff);
#endif
return (acc_uint32l_t) (r->seed >> 33);
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p r)
{
r->seed = r->seed * ACC_UINT64L_C(6364136223846793005) + 1;
#if (SIZEOF_ACC_INT64L_T > 8)
r->seed &= ACC_UINT64L_C(0xffffffffffffffff);
#endif
return (acc_uint32l_t) (r->seed >> 32);
}
#endif /* acc_uint64l_t */
/*************************************************************************
// mersenne twister PRNG
**************************************************************************/
ACCLIB_PUBLIC(void, acc_srandmt) (acc_randmt_p r, acc_uint32l_t seed)
{
unsigned i = 0;
do {
r->s[i++] = (seed &= ACC_UINT32L_C(0xffffffff));
seed ^= seed >> 30;
seed = seed * ACC_UINT32L_C(0x6c078965) + i;
} while (i != 624);
r->n = i;
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt) (acc_randmt_p r)
{
return (__ACCLIB_FUNCNAME(acc_randmt_r32)(r)) >> 1;
}
ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p r)
{
acc_uint32l_t v;
if (r->n == 624) {
int i = 0, j;
r->n = 0;
do {
j = i - 623; if (j < 0) j += 624;
v = (r->s[i] & ACC_UINT32L_C(0x80000000)) ^ (r->s[j] & ACC_UINT32L_C(0x7fffffff));
j = i - 227; if (j < 0) j += 624;
r->s[i] = r->s[j] ^ (v >> 1);
if (v & 1) r->s[i] ^= ACC_UINT32L_C(0x9908b0df);
} while (++i != 624);
}
v = r->s[r->n++];
v ^= v >> 11; v ^= (v & ACC_UINT32L_C(0x013a58ad)) << 7;
v ^= (v & ACC_UINT32L_C(0x0001df8c)) << 15; v ^= v >> 18;
return v;
}
/*
vi:ts=4:et
*/
-127
View File
@@ -1,127 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_RDTSC_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
#if defined(acc_int32e_t)
/*************************************************************************
// read TSC
**************************************************************************/
ACCLIB_PUBLIC(int, acc_tsc_read) (acc_uint32e_t* t)
{
#if ((ACC_ARCH_AMD64 || ACC_ARCH_IA32) && ACC_CC_GNUC)
__asm__ __volatile__(
"clc \n" ".byte 0x0f, 0x31\n"
"movl %%eax,(%0)\n" "movl %%edx,4(%0)\n"
# if (ACC_CC_GNUC >= 0x020000ul)
: : "r" (t) : "cc", "memory", "eax", "edx"
# else
: : "r" (t) : "ax", "dx"
# endif
);
return 0;
#elif (ACC_ARCH_IA32 && ACC_CC_INTELC) && defined(__linux__)
__asm__ __volatile__(
"clc \n" ".byte 0x0f, 0x31\n"
"movl %%eax,(%0)\n" "movl %%edx,4(%0)\n"
: : "r" (t) : "memory", "eax", "edx"
);
return 0;
#elif (ACC_ARCH_IA32 && (ACC_OS_DOS32 || ACC_OS_WIN32) && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC))
ACC_UNUSED(t);
__asm {
mov ecx, t
clc
# if (ACC_CC_MSC && (_MSC_VER < 1200))
_emit 0x0f
_emit 0x31
# else
rdtsc
# endif
mov [ecx], eax
mov [ecx+4], edx
}
return 0;
#else
t[0] = t[1] = 0;
return -1;
#endif
}
/*************************************************************************
// read and add TSC
**************************************************************************/
ACCLIB_PUBLIC(int, acc_tsc_read_add) (acc_uint32e_t* t)
{
#if ((ACC_ARCH_AMD64 || ACC_ARCH_IA32) && ACC_CC_GNUC)
__asm__ __volatile__(
"clc \n" ".byte 0x0f, 0x31\n"
"addl %%eax,(%0)\n" "adcl $0,%%edx\n" "addl %%edx,4(%0)\n"
# if (ACC_CC_GNUC >= 0x020000ul)
: : "r" (t) : "cc", "memory", "eax", "edx"
# else
: : "r" (t) : "ax", "dx"
# endif
);
return 0;
#elif (ACC_ARCH_IA32 && ACC_CC_INTELC) && defined(__linux__)
__asm__ __volatile__(
"clc \n" ".byte 0x0f, 0x31\n"
"addl %%eax,(%0)\n" "adcl $0,%%edx\n" "addl %%edx,4(%0)\n"
: : "r" (t) : "memory", "eax", "edx"
);
return 0;
#elif (ACC_ARCH_IA32 && (ACC_OS_DOS32 || ACC_OS_WIN32) && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC))
ACC_UNUSED(t);
__asm {
mov ecx, t
clc
# if (ACC_CC_MSC && (_MSC_VER < 1200))
_emit 0x0f
_emit 0x31
# else
rdtsc
# endif
add [ecx], eax
adc edx, 0
add [ecx+4], edx
}
return 0;
#else
acc_uint32e_t v[2];
int r;
r = acc_tsc_read(v);
t[0] += v[0];
if (t[0] < v[0]) t[1] += 1;
t[1] += v[1];
return r;
#endif
}
#endif /* defined(acc_int32e_t) */
/*
vi:ts=4:et
*/
-230
View File
@@ -1,230 +0,0 @@
/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
#define __ACCLIB_UCLOCK_CH_INCLUDED 1
#if !defined(ACCLIB_PUBLIC)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
#elif (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H)
# if defined(acc_int64l_t)
/* See also: KB Q274323: PRB: Performance Counter Value May
* Unexpectedly Leap Forward */
# define __ACCLIB_UCLOCK_USE_QPC 1
# endif
/* fallbacks */
# if ((ACC_CC_DMC && (__DMC__ < 0x838)) || ACC_CC_LCC)
/* winmm.lib is missing */
# define __ACCLIB_UCLOCK_USE_CLOCK 1
# else
# define __ACCLIB_UCLOCK_USE_WINMM 1
# if (ACC_CC_MSC && (_MSC_VER >= 1000))
/* avoid `-W4' warnings in <mmsystem.h> */
# pragma warning(disable: 4201)
# elif (ACC_CC_MWERKS)
/* avoid duplicate typedef in <mmsystem.h> */
# define LPUINT __ACC_MMSYSTEM_H_LPUINT
# endif
# if 1
# include <mmsystem.h>
# else
# if (ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC)
ACC_EXTERN_C __declspec(dllimport) unsigned long __stdcall timeGetTime(void);
# else
ACC_EXTERN_C unsigned long __stdcall timeGetTime(void);
# endif
# endif
# if (ACC_CC_DMC)
# pragma DMC includelib "winmm.lib"
# elif (ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC)
# pragma comment(lib, "winmm.lib")
# elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3000))
# pragma comment(lib, "winmm.lib")
# elif (ACC_CC_SYMANTECC)
# pragma SC includelib "winmm.lib"
# elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 1050))
# pragma library("winmm.lib")
# endif
# endif
#elif (ACC_OS_EMX) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
# define __ACCLIB_UCLOCK_USE_QPC 1
#elif (ACC_OS_CYGWIN || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_TOS || ACC_OS_WIN32 || ACC_OS_WIN64)
# define __ACCLIB_UCLOCK_USE_CLOCK 1
#endif
#if (__ACCLIB_UCLOCK_USE_CLOCK) && !defined(CLOCKS_PER_SEC)
# if defined(CLK_TCK)
# define CLOCKS_PER_SEC CLK_TCK
# else
# undef __ACCLIB_UCLOCK_USE_CLOCK
# endif
#endif
/*************************************************************************
//
**************************************************************************/
ACCLIB_PUBLIC(int, acc_uclock_open) (acc_uclock_handle_p h)
{
acc_uclock_t c;
int i;
#if (__ACCLIB_UCLOCK_USE_QPC)
LARGE_INTEGER li;
h->qpf = 0.0;
if (QueryPerformanceFrequency(&li) != 0) {
h->qpf = (double) li.QuadPart;
if (h->qpf <= 0.0 || QueryPerformanceCounter(&li) == 0) {
h->qpf = 0.0;
}
}
#elif (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
h->qpf = 0.0;
#endif
h->h = 1;
h->mode = 0;
/* warm up */
i = 100;
do {
acc_uclock_read(h, &c);
#if (__ACCLIB_UCLOCK_USE_QPC)
if (h->qpf > 0.0 && c.qpc == 0) { h->qpf = 0.0; i = 100; }
#endif
} while (--i > 0);
return 0;
}
ACCLIB_PUBLIC(int, acc_uclock_close) (acc_uclock_handle_p h)
{
h->h = 0;
h->mode = -1;
return 0;
}
/*************************************************************************
//
**************************************************************************/
ACCLIB_PUBLIC(void, acc_uclock_read) (acc_uclock_handle_p h, acc_uclock_p c)
{
#if (__ACCLIB_UCLOCK_USE_QPC)
if (h->qpf > 0.0) {
LARGE_INTEGER li;
if (QueryPerformanceCounter(&li) != 0) {
c->qpc = (acc_int64l_t) li.QuadPart;
if (c->qpc > 0)
return;
}
c->qpc = 0; /* failed */
}
#elif (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
/* c->qpc = 0; */
#endif
{
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
# if (ACC_CC_AZTECC)
c->ticks.t32 = 0;
# else
union REGS ri, ro;
ri.x.ax = 0x2c00; int86(0x21, &ri, &ro);
c->ticks.t32 = ro.h.ch*60UL*60UL*100UL + ro.h.cl*60UL*100UL + ro.h.dh*100UL + ro.h.dl;
# endif
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
c->ticks.t64 = uclock();
#elif (__ACCLIB_UCLOCK_USE_CLOCK) && defined(acc_int64l_t)
c->ticks.t64 = clock();
#elif (__ACCLIB_UCLOCK_USE_CLOCK)
c->ticks.t32 = clock();
#elif (__ACCLIB_UCLOCK_USE_WINMM)
c->ticks.t32 = timeGetTime();
#elif (__ACCLIB_UCLOCK_USE_GETRUSAGE)
struct rusage ru;
if (getrusage(RUSAGE_SELF, &ru) != 0) c->ticks.rd = 0;
else c->ticks.td = ru.ru_utime.tv_sec + ru.ru_utime.tv_usec / 1000000.0;
#elif (HAVE_GETTIMEOFDAY)
struct timeval tv;
if (gettimeofday(&tv, 0) != 0) c->ticks.td = 0;
else c->ticks.td = tv.tv_sec + tv.tv_usec / 1000000.0;
#else
ACC_UNUSED(c);
#endif
}
ACC_UNUSED(h);
}
/*************************************************************************
//
**************************************************************************/
ACCLIB_PUBLIC(double, acc_uclock_get_elapsed) (acc_uclock_handle_p h, const acc_uclock_p start, const acc_uclock_p stop)
{
double d;
if (!h->h) {
h->mode = -1;
return 0.0;
}
#if (__ACCLIB_UCLOCK_USE_QPC)
if (h->qpf > 0.0) {
h->mode = 1;
if (start->qpc == 0 || stop->qpc == 0) return 0.0;
return (double) (stop->qpc - start->qpc) / h->qpf;
}
#endif
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
h->mode = 2;
d = (double) (stop->ticks.t32 - start->ticks.t32) / 100.0;
if (d < 0.0) d += 86400.0; /* midnight passed */
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
h->mode = 3;
d = (double) (stop->ticks.t64 - start->ticks.t64) / (UCLOCKS_PER_SEC);
#elif (__ACCLIB_UCLOCK_USE_CLOCK) && defined(acc_int64l_t)
h->mode = 4;
d = (double) (stop->ticks.t64 - start->ticks.t64) / (CLOCKS_PER_SEC);
#elif (__ACCLIB_UCLOCK_USE_CLOCK)
h->mode = 5;
d = (double) (stop->ticks.t32 - start->ticks.t32) / (CLOCKS_PER_SEC);
#elif (__ACCLIB_UCLOCK_USE_WINMM)
h->mode = 6;
d = (double) (stop->ticks.t32 - start->ticks.t32) / 1000.0;
#elif (__ACCLIB_UCLOCK_USE_GETRUSAGE)
h->mode = 7;
d = stop->ticks.td - start->ticks.td;
#elif (HAVE_GETTIMEOFDAY)
h->mode = 8;
d = stop->ticks.td - start->ticks.td;
#else
h->mode = 0;
d = 0.0;
#endif
return d;
}
/*
vi:ts=4:et
*/
+17 -57
View File
@@ -93,8 +93,8 @@ inline void set_be32(void *bb, unsigned v)
inline unsigned get_le16(const void *bb) inline unsigned get_le16(const void *bb)
{ {
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32) #if defined(ACC_GET_LE16)
return * (const unsigned short *) bb; return ACC_GET_LE16(bb);
#else #else
const unsigned char* b = (const unsigned char*) bb; const unsigned char* b = (const unsigned char*) bb;
unsigned v; unsigned v;
@@ -106,8 +106,8 @@ inline unsigned get_le16(const void *bb)
inline void set_le16(void *bb, unsigned v) inline void set_le16(void *bb, unsigned v)
{ {
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32) #if defined(ACC_SET_LE16)
(* (unsigned short *) bb) = (unsigned short) (v & 0xffff); ACC_SET_LE16(bb, v);
#else #else
unsigned char* b = (unsigned char*) bb; unsigned char* b = (unsigned char*) bb;
b[0] = (unsigned char) (v >> 0); b[0] = (unsigned char) (v >> 0);
@@ -137,8 +137,8 @@ inline void set_le24(void *bb, unsigned v)
inline unsigned get_le32(const void *bb) inline unsigned get_le32(const void *bb)
{ {
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32) #if defined(ACC_GET_LE32)
return * (const acc_uint32e_t *) bb; return ACC_GET_LE32(bb);
#else #else
const unsigned char* b = (const unsigned char*) bb; const unsigned char* b = (const unsigned char*) bb;
unsigned v; unsigned v;
@@ -152,8 +152,8 @@ inline unsigned get_le32(const void *bb)
inline void set_le32(void *bb, unsigned v) inline void set_le32(void *bb, unsigned v)
{ {
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32) #if defined(ACC_SET_LE32)
(* (acc_uint32e_t *) bb) = v; ACC_SET_LE32(bb, v);
#else #else
unsigned char* b = (unsigned char*) bb; unsigned char* b = (unsigned char*) bb;
b[0] = (unsigned char) (v >> 0); b[0] = (unsigned char) (v >> 0);
@@ -214,23 +214,16 @@ inline int get_le32_signed(const void *bb)
/************************************************************************* /*************************************************************************
// classes for portable unaligned access // classes for portable unaligned access
//
// Important: these classes must be PODs (Plain Old Data), i.e. no
// constructor, no destructor, no virtual functions and no default
// assignment operator, and all fields must be public(!).
**************************************************************************/ **************************************************************************/
class BE16 struct BE16
{ {
unsigned char d[2]; unsigned char d[2];
public:
BE16() { }
BE16& operator = (const BE16 &v) {
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
* (acc_uint32e_t *) d = * (const acc_uint32e_t *) v.d;
#else
memcpy(d, v.d, sizeof(d));
#endif
return *this;
}
BE16& operator = (unsigned v) { set_be16(d, v); return *this; } BE16& operator = (unsigned v) { set_be16(d, v); return *this; }
BE16& operator += (unsigned v) { set_be16(d, get_be16(d) + v); return *this; } BE16& operator += (unsigned v) { set_be16(d, get_be16(d) + v); return *this; }
BE16& operator -= (unsigned v) { set_be16(d, get_be16(d) - v); return *this; } BE16& operator -= (unsigned v) { set_be16(d, get_be16(d) - v); return *this; }
@@ -242,21 +235,10 @@ public:
__attribute_packed; __attribute_packed;
class BE32 struct BE32
{ {
unsigned char d[4]; unsigned char d[4];
public:
BE32() { }
BE32& operator = (const BE32 &v) {
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
* (unsigned int *) d = * (const unsigned int *) v.d;
#else
memcpy(d, v.d, sizeof(d));
#endif
return *this;
}
BE32& operator = (unsigned v) { set_be32(d, v); return *this; } BE32& operator = (unsigned v) { set_be32(d, v); return *this; }
BE32& operator += (unsigned v) { set_be32(d, get_be32(d) + v); return *this; } BE32& operator += (unsigned v) { set_be32(d, get_be32(d) + v); return *this; }
BE32& operator -= (unsigned v) { set_be32(d, get_be32(d) - v); return *this; } BE32& operator -= (unsigned v) { set_be32(d, get_be32(d) - v); return *this; }
@@ -268,21 +250,10 @@ public:
__attribute_packed; __attribute_packed;
class LE16 struct LE16
{ {
unsigned char d[2]; unsigned char d[2];
public:
LE16() { }
LE16& operator = (const LE16 &v) {
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
* (unsigned short *) d = * (const unsigned short *) v.d;
#else
memcpy(d, v.d, sizeof(d));
#endif
return *this;
}
LE16& operator = (unsigned v) { set_le16(d, v); return *this; } LE16& operator = (unsigned v) { set_le16(d, v); return *this; }
LE16& operator += (unsigned v) { set_le16(d, get_le16(d) + v); return *this; } LE16& operator += (unsigned v) { set_le16(d, get_le16(d) + v); return *this; }
LE16& operator -= (unsigned v) { set_le16(d, get_le16(d) - v); return *this; } LE16& operator -= (unsigned v) { set_le16(d, get_le16(d) - v); return *this; }
@@ -294,21 +265,10 @@ public:
__attribute_packed; __attribute_packed;
class LE32 struct LE32
{ {
unsigned char d[4]; unsigned char d[4];
public:
LE32() { }
LE32& operator = (const LE32 &v) {
#if (ACC_ARCH_AMD64 || ACC_ARCH_IA32)
* (acc_uint32e_t *) d = * (const acc_uint32e_t *) v.d;
#else
memcpy(d, v.d, sizeof(d));
#endif
return *this;
}
LE32& operator = (unsigned v) { set_le32(d, v); return *this; } LE32& operator = (unsigned v) { set_le32(d, v); return *this; }
LE32& operator += (unsigned v) { set_le32(d, get_le32(d) + v); return *this; } LE32& operator += (unsigned v) { set_le32(d, get_le32(d) + v); return *this; }
LE32& operator -= (unsigned v) { set_le32(d, get_le32(d) - v); return *this; } LE32& operator -= (unsigned v) { set_le32(d, get_le32(d) - v); return *this; }
@@ -386,7 +346,7 @@ int __acc_cdecl_qsort le32_compare_signed(const void *e1, const void *e2);
// just for testing... // just for testing...
#if 1 && (ACC_ARCH_AMD64 || ACC_ARCH_IA32) && (ACC_CC_GNUC >= 0x030200) #if 0 && (ACC_ARCH_AMD64 || ACC_ARCH_IA32) && (ACC_CC_GNUC >= 0x030200)
typedef unsigned short LE16_unaligned __attribute__((__aligned__(1))); typedef unsigned short LE16_unaligned __attribute__((__aligned__(1)));
typedef acc_uint32e_t LE32_unaligned __attribute__((__aligned__(1))); typedef acc_uint32e_t LE32_unaligned __attribute__((__aligned__(1)));
# define LE16 LE16_unaligned # define LE16 LE16_unaligned
+27 -12
View File
@@ -36,18 +36,10 @@
// ACC // ACC
**************************************************************************/ **************************************************************************/
#include "acc/acc.h" #include "miniacc.h"
#if ((ACC_OS_WIN32 || ACC_OS_WIN64) && ACC_CC_MWERKS) && defined(__MSL__) #if ((ACC_OS_WIN32 || ACC_OS_WIN64) && ACC_CC_MWERKS) && defined(__MSL__)
# undef HAVE_UTIME_H /* this pulls in <windows.h> */ # undef HAVE_UTIME_H /* this pulls in <windows.h> */
#endif #endif
#include "acc/acc_incd.h"
#include "acc/acc_ince.h"
#include "acc/acc_lib.h"
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR)
# error "something pulled in <windows.h>"
# endif
#endif
#if (ACC_CC_BORLANDC) #if (ACC_CC_BORLANDC)
@@ -95,6 +87,15 @@
# pragma warning(disable: 4512) // W4: 'class': assignment operator could not be generated # pragma warning(disable: 4512) // W4: 'class': assignment operator could not be generated
# pragma warning(disable: 4514) // W4: 'function': unreferenced inline function has been removed # pragma warning(disable: 4514) // W4: 'function': unreferenced inline function has been removed
# pragma warning(disable: 4710) // W4: 'function': function not inlined # pragma warning(disable: 4710) // W4: 'function': function not inlined
# if (_MSC_VER >= 1300)
# pragma warning(disable: 4625) // W4: 'class' : copy constructor could not be generated because a base class copy constructor is inaccessible
# pragma warning(disable: 4626) // W4: 'class' : assignment operator could not be generated because a base class assignment operator is inaccessible
# pragma warning(disable: 4711) // W4: 'function' selected for automatic inline expansion
# pragma warning(disable: 4820) // W4: 'struct' : 'x' bytes padding added after member 'member'
# endif
# if (_MSC_VER >= 1400)
# pragma warning(disable: 4996) // W1: 'function': was declared deprecated
# endif
#elif (ACC_CC_WATCOMC) #elif (ACC_CC_WATCOMC)
# if (__WATCOMC__ < 1100) # if (__WATCOMC__ < 1100)
# error "need Watcom C++ 11.0c or newer" # error "need Watcom C++ 11.0c or newer"
@@ -105,6 +106,18 @@
#endif #endif
#define ACC_WANT_ACC_INCD_H 1
#define ACC_WANT_ACC_INCE_H 1
#define ACC_WANT_ACC_LIB_H 1
#define ACC_WANT_ACC_CXX_H 1
#include "miniacc.h"
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR)
# error "something pulled in <windows.h>"
# endif
#endif
/************************************************************************* /*************************************************************************
// //
**************************************************************************/ **************************************************************************/
@@ -274,13 +287,14 @@
// avoid warnings about shadowing global functions // avoid warnings about shadowing global functions
#undef index
#define basename upx_basename #define basename upx_basename
#define index upx_index #define index upx_index
#define outp upx_outp #define outp upx_outp
#undef __attribute_packed #undef __attribute_packed
#if (ACC_CC_GNUC || ACC_CC_INTELC) #if (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
# if (1 && (ACC_ARCH_IA32)) # if (1 && (ACC_ARCH_IA32))
# define __attribute_packed # define __attribute_packed
# else # else
@@ -309,12 +323,12 @@
#if 1 #if 1
# define __COMPILE_TIME_ASSERT_ALIGNOF_SIZEOF(a,b) { \ # define __COMPILE_TIME_ASSERT_ALIGNOF_SIZEOF(a,b) { \
typedef a acc_tmp_a_t; typedef b acc_tmp_b_t; \ typedef a acc_tmp_a_t; typedef b acc_tmp_b_t; \
struct acc_tmp_t { acc_tmp_b_t x; acc_tmp_a_t y; acc_tmp_b_t z[7]; }; \ struct acc_tmp_t { acc_tmp_b_t x; acc_tmp_a_t y; acc_tmp_b_t z[7]; } __attribute_packed; \
COMPILE_TIME_ASSERT(sizeof(struct acc_tmp_t) == 8*sizeof(b)+sizeof(a)) \ COMPILE_TIME_ASSERT(sizeof(struct acc_tmp_t) == 8*sizeof(b)+sizeof(a)) \
} }
#else #else
# define __COMPILE_TIME_ASSERT_ALIGNOF_SIZEOF(a,b) { \ # define __COMPILE_TIME_ASSERT_ALIGNOF_SIZEOF(a,b) { \
struct acc_tmp_t { b x; a y; b z[7]; }; \ struct acc_tmp_t { b x; a y; b z[7]; } __attribute_packed; \
COMPILE_TIME_ASSERT(sizeof(struct acc_tmp_t) == 8*sizeof(b)+sizeof(a)) \ COMPILE_TIME_ASSERT(sizeof(struct acc_tmp_t) == 8*sizeof(b)+sizeof(a)) \
} }
#endif #endif
@@ -434,6 +448,7 @@ inline void operator delete[](void *p)
#define UPX_F_BVMLINUZ_i386 16 #define UPX_F_BVMLINUZ_i386 16
#define UPX_F_ELKS_8086 17 #define UPX_F_ELKS_8086 17
#define UPX_F_PS1_EXE 18 #define UPX_F_PS1_EXE 18
#define UPX_F_VMLINUX_i386 19
#define UPX_F_ATARI_TOS 129 #define UPX_F_ATARI_TOS 129
#define UPX_F_SOLARIS_SPARC 130 #define UPX_F_SOLARIS_SPARC 130
+8 -1
View File
@@ -36,11 +36,11 @@ static int F(Filter *f)
#ifdef U #ifdef U
// filter // filter
upx_byte *b = f->buf; upx_byte *b = f->buf;
const unsigned addvalue = f->addvalue;
#else #else
// scan // scan
const upx_byte *b = f->buf; const upx_byte *b = f->buf;
#endif #endif
const unsigned addvalue = f->addvalue;
const unsigned size = f->buf_len; const unsigned size = f->buf_len;
unsigned ic, jc, kc; unsigned ic, jc, kc;
@@ -52,6 +52,11 @@ static int F(Filter *f)
unsigned char buf[256]; unsigned char buf[256];
memset(buf,0,256); memset(buf,0,256);
// A call to a destination that is inside the buffer
// will be rewritten and marked with cto8 as first byte.
// So, a call to a destination that is outside the buffer
// must not conflict with the mark.
// Note that unsigned comparison checks both edges of buffer.
for (ic = 0; ic < size - 5; ic++) for (ic = 0; ic < size - 5; ic++)
if (COND(b,ic) && get_le32(b+ic+1)+ic+1 >= size) if (COND(b,ic) && get_le32(b+ic+1)+ic+1 >= size)
{ {
@@ -74,6 +79,8 @@ static int F(Filter *f)
// try to detect 'real' calls only // try to detect 'real' calls only
if (jc < size) if (jc < size)
{ {
if ((1u<<24)<=(jc+addvalue)) // hi 8 bits won't be cto8
return 1; // fail - buffer not restored
#ifdef U #ifdef U
set_be32(b+ic+1,jc+addvalue+cto); set_be32(b+ic+1,jc+addvalue+cto);
#endif #endif
+3 -1
View File
@@ -40,11 +40,11 @@ static int F(Filter *f)
#ifdef U #ifdef U
// filter // filter
upx_byte *b = f->buf; upx_byte *b = f->buf;
const unsigned addvalue = f->addvalue;
#else #else
// scan // scan
const upx_byte *b = f->buf; const upx_byte *b = f->buf;
#endif #endif
const unsigned addvalue = f->addvalue;
const unsigned size = f->buf_len; const unsigned size = f->buf_len;
unsigned ic, jc, kc; unsigned ic, jc, kc;
@@ -78,6 +78,8 @@ static int F(Filter *f)
// try to detect 'real' calls only // try to detect 'real' calls only
if (jc < size) if (jc < size)
{ {
if ((1u<<24)<=(jc+addvalue)) // hi 8 bits won't be cto8
return 1; // fail - buffer not restored
#ifdef U #ifdef U
set_be32(b+ic+1,jc+addvalue+cto); set_be32(b+ic+1,jc+addvalue+cto);
#endif #endif
+3 -1
View File
@@ -40,11 +40,11 @@ static int F(Filter *f)
#ifdef U #ifdef U
// filter // filter
upx_byte *b = f->buf; upx_byte *b = f->buf;
const unsigned addvalue = f->addvalue;
#else #else
// scan // scan
const upx_byte *b = f->buf; const upx_byte *b = f->buf;
#endif #endif
const unsigned addvalue = f->addvalue;
const unsigned size = f->buf_len; const unsigned size = f->buf_len;
unsigned const id = f->id; unsigned const id = f->id;
@@ -79,6 +79,8 @@ static int F(Filter *f)
// try to detect 'real' calls only // try to detect 'real' calls only
if (jc < size) if (jc < size)
{ {
if ((1u<<24)<=(jc+addvalue)) // hi 8 bits won't be cto8
return 1; // fail - buffer not restored
#ifdef U #ifdef U
set_be32(b+ic+1,jc+addvalue+cto); set_be32(b+ic+1,jc+addvalue+cto);
#endif #endif
+13 -10
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2004 Laszlo Molnar Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -48,7 +48,7 @@ void show_head(void)
fg = con_fg(f,FG_GREEN); fg = con_fg(f,FG_GREEN);
con_fprintf(f, con_fprintf(f,
" Ultimate Packer for eXecutables\n" " Ultimate Packer for eXecutables\n"
" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004\n" " Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005\n"
"UPX %-12s Markus F.X.J. Oberhumer & Laszlo Molnar %20s\n\n", "UPX %-12s Markus F.X.J. Oberhumer & Laszlo Molnar %20s\n\n",
#if (ACC_OS_DOS16 || ACC_OS_DOS32) #if (ACC_OS_DOS16 || ACC_OS_DOS32)
V("d"), V("d"),
@@ -105,7 +105,7 @@ void show_help(int x)
" -d decompress -l list compressed file\n" " -d decompress -l list compressed file\n"
" -t test compressed file -V display version number\n" " -t test compressed file -V display version number\n"
" -h give %s help -L display software license\n%s", " -h give %s help -L display software license\n%s",
x == 0 ? "" : " --best compress best (can be very slow for big files)\n", x == 0 ? "" : " --best compress best (can be slow for big files)\n",
x == 0 ? "more" : "this", x == 0 ? "" : "\n"); x == 0 ? "more" : "this", x == 0 ? "" : "\n");
fg = con_fg(f,FG_YELLOW); fg = con_fg(f,FG_YELLOW);
@@ -140,7 +140,7 @@ void show_help(int x)
fg = con_fg(f,fg); fg = con_fg(f,fg);
con_fprintf(f, con_fprintf(f,
" --overlay=copy copy any extra data attached to the file [default]\n" " --overlay=copy copy any extra data attached to the file [default]\n"
" --overlay=strip strip any extra data attached to the file [dangerous]\n" " --overlay=strip strip any extra data attached to the file [DANGEROUS]\n"
" --overlay=skip don't compress a file with an overlay\n" " --overlay=skip don't compress a file with an overlay\n"
"\n"); "\n");
fg = con_fg(f,FG_YELLOW); fg = con_fg(f,FG_YELLOW);
@@ -207,7 +207,7 @@ void show_help(int x)
" --all-filters try all available preprocessing filters\n" " --all-filters try all available preprocessing filters\n"
"\n"); "\n");
fg = con_fg(f,FG_YELLOW); fg = con_fg(f,FG_YELLOW);
con_fprintf(f,"Options for [b]vmlinuz/386\n"); con_fprintf(f,"Options for vmlinuz/386\n");
fg = con_fg(f,fg); fg = con_fg(f,fg);
con_fprintf(f, con_fprintf(f,
" --all-methods try all available compression methods\n" " --all-methods try all available compression methods\n"
@@ -229,6 +229,8 @@ void show_help(int x)
" --compress-icons=1 compress all but the first icon\n" " --compress-icons=1 compress all but the first icon\n"
" --compress-icons=2 compress all but the first icon directory [default]\n" " --compress-icons=2 compress all but the first icon directory [default]\n"
" --compress-resources=0 do not compress any resources at all\n" " --compress-resources=0 do not compress any resources at all\n"
" --strip-loadconf=0 do not strip SEH load config [default]\n"
" --strip-loadconf=1 strip SEH load config [DANGEROUS]\n"
" --strip-relocs=0 do not strip relocations\n" " --strip-relocs=0 do not strip relocations\n"
" --strip-relocs=1 strip relocations [default]\n" " --strip-relocs=1 strip relocations [default]\n"
" --all-methods try all available compression methods\n" " --all-methods try all available compression methods\n"
@@ -258,6 +260,7 @@ void show_help(int x)
" rtm32/pe," " rtm32/pe,"
" tmt/adam," " tmt/adam,"
"\n " "\n "
" vmlinux/386,"
" vmlinuz/386," " vmlinuz/386,"
" watcom/le," " watcom/le,"
//" win16/ne," //" win16/ne,"
@@ -345,10 +348,10 @@ void show_version(int x)
#if defined(WITH_UCL) #if defined(WITH_UCL)
fprintf(f,"UCL data compression library %s\n", ucl_version_string()); fprintf(f,"UCL data compression library %s\n", ucl_version_string());
#endif #endif
fprintf(f,"Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer\n"); fprintf(f,"Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer\n");
fprintf(f,"Copyright (C) 1996-2004 Laszlo Molnar\n"); fprintf(f,"Copyright (C) 1996-2005 Laszlo Molnar\n");
fprintf(f,"Copyright (C) 2000-2004 John F. Reiser\n"); fprintf(f,"Copyright (C) 2000-2005 John F. Reiser\n");
fprintf(f,"Copyright (C) 2002-2004 Jens Medoch\n"); fprintf(f,"Copyright (C) 2002-2005 Jens Medoch\n");
fprintf(f,"UPX comes with ABSOLUTELY NO WARRANTY; for details type `%s -L'.\n", progname); fprintf(f,"UPX comes with ABSOLUTELY NO WARRANTY; for details type `%s -L'.\n", progname);
} }
+4 -3
View File
@@ -57,7 +57,8 @@ Linker::Linker(const void *pdata, int plen, int pinfo)
info = pinfo; info = pinfo;
njumps = nsections = frozen = 0; njumps = nsections = frozen = 0;
jumps = new jump[200]; jumps = new jump[200];
sections = new section[200]; #define NSECTIONS 350
sections = new section[NSECTIONS];
char *p = iloader + info; char *p = iloader + info;
while (get32(p) != (unsigned)(-1)) while (get32(p) != (unsigned)(-1))
@@ -68,7 +69,7 @@ Linker::Linker(const void *pdata, int plen, int pinfo)
sections[nsections].istart = get32(p+8); sections[nsections].istart = get32(p+8);
sections[nsections++].ostart = -1; sections[nsections++].ostart = -1;
p += 12; p += 12;
assert(nsections < 200); assert(nsections < NSECTIONS);
} }
else else
{ {
@@ -154,7 +155,7 @@ void Linker::addSection(const char *sname, const void *sdata, unsigned len)
sections[nsections].istart = ilen; sections[nsections].istart = ilen;
sections[nsections].len = len; sections[nsections].len = len;
sections[nsections++].ostart = olen; sections[nsections++].ostart = olen;
assert(nsections < 200); assert(nsections < NSECTIONS);
memcpy(iloader+ilen,sdata,len); memcpy(iloader+ilen,sdata,len);
ilen += len; ilen += len;
} }
+25 -11
View File
@@ -71,6 +71,7 @@ void init_options(struct options_t *o)
for (unsigned i = 0; i < TABLESIZE(o->win32_pe.compress_rt); i++) for (unsigned i = 0; i < TABLESIZE(o->win32_pe.compress_rt); i++)
o->win32_pe.compress_rt[i] = -1; o->win32_pe.compress_rt[i] = -1;
o->win32_pe.compress_rt[24] = false; // 24 == RT_MANIFEST o->win32_pe.compress_rt[24] = false; // 24 == RT_MANIFEST
o->win32_pe.strip_loadconf = -1;
o->win32_pe.strip_relocs = -1; o->win32_pe.strip_relocs = -1;
} }
@@ -676,6 +677,12 @@ static int do_option(int optc, const char *arg)
//printf("compress_resources: %d\n", opt->win32_pe.compress_resources); //printf("compress_resources: %d\n", opt->win32_pe.compress_resources);
break; break;
case 633: case 633:
opt->win32_pe.strip_loadconf = 1;
if (mfx_optarg && strcmp(mfx_optarg,"0") == 0)
opt->win32_pe.strip_loadconf = 0;
//printf("strip_loadconf: %d\n", opt->win32_pe.strip_loadconf);
break;
case 634:
opt->win32_pe.strip_relocs = 1; opt->win32_pe.strip_relocs = 1;
if (mfx_optarg && strcmp(mfx_optarg,"0") == 0) if (mfx_optarg && strcmp(mfx_optarg,"0") == 0)
opt->win32_pe.strip_relocs = 0; opt->win32_pe.strip_relocs = 0;
@@ -699,11 +706,11 @@ static int do_option(int optc, const char *arg)
opt->o_unix.ptinterp = true; opt->o_unix.ptinterp = true;
break; break;
case 670: case 670:
opt->ps1_exe.console_run = true; opt->ps1_exe.boot_only = true;
break; break;
case 671: case 671:
opt->ps1_exe.no_align = true; opt->ps1_exe.no_align = true;
opt->ps1_exe.console_run = true; opt->ps1_exe.boot_only = false;
break; break;
case 672: case 672:
opt->ps1_exe.do_8bit = true; opt->ps1_exe.do_8bit = true;
@@ -823,9 +830,10 @@ static const struct mfx_option longopts[] =
{"compress-exports", 2, 0, 630}, {"compress-exports", 2, 0, 630},
{"compress-icons", 2, 0, 631}, {"compress-icons", 2, 0, 631},
{"compress-resources", 2, 0, 632}, {"compress-resources", 2, 0, 632},
{"strip-relocs", 2, 0, 633}, {"strip-loadconf", 0x12, 0, 633},
{"strip-relocs", 0x12, 0, 634},
// ps1/exe // ps1/exe
{"console-run", 0x10, 0, 670}, {"boot-only", 0x10, 0, 670},
{"no-align", 0x10, 0, 671}, {"no-align", 0x10, 0, 671},
{"8-bit", 0x10, 0, 672}, {"8-bit", 0x10, 0, 672},
@@ -904,7 +912,8 @@ static const struct mfx_option longopts[] =
{"compress-exports", 2, 0, 630}, {"compress-exports", 2, 0, 630},
{"compress-icons", 2, 0, 631}, {"compress-icons", 2, 0, 631},
{"compress-resources", 2, 0, 632}, {"compress-resources", 2, 0, 632},
{"strip-relocs", 2, 0, 633}, {"strip-loadconf", 0x12, 0, 633},
{"strip-relocs", 0x12, 0, 634},
{ NULL, 0, NULL, 0 } { NULL, 0, NULL, 0 }
}; };
@@ -1019,9 +1028,17 @@ static void first_options(int argc, char **argv)
// assert a sane architecture and compiler // assert a sane architecture and compiler
**************************************************************************/ **************************************************************************/
#define ACC_WANT_ACC_CHK_CH 1
#undef ACCCHK_ASSERT
#include "miniacc.h"
void upx_sanity_check(void) void upx_sanity_check(void)
{ {
#include "acc/acc_chk.ch" #define ACC_WANT_ACC_CHK_CH 1
#undef ACCCHK_ASSERT
#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
#include "miniacc.h"
#undef ACCCHK_ASSERT
COMPILE_TIME_ASSERT(sizeof(char) == 1) COMPILE_TIME_ASSERT(sizeof(char) == 1)
COMPILE_TIME_ASSERT(sizeof(short) == 2) COMPILE_TIME_ASSERT(sizeof(short) == 2)
@@ -1088,15 +1105,12 @@ int __acc_cdecl_main main(int argc, char *argv[])
// LFN=n may cause problems with 2.03's _rename and mkdir under WinME // LFN=n may cause problems with 2.03's _rename and mkdir under WinME
putenv("LFN=y"); putenv("LFN=y");
#endif #endif
#if defined(__EMX__)
_response(&argc,&argv);
_wildcard(&argc,&argv);
#endif
#if defined(__MINT__) #if defined(__MINT__)
__binmode(1); __binmode(1);
__set_binmode(stdout, 0); __set_binmode(stdout, 0);
__set_binmode(stderr, 0); __set_binmode(stderr, 0);
#endif #endif
acc_wildargv(&argc, &argv);
upx_sanity_check(); upx_sanity_check();
init_options(opt); init_options(opt);
@@ -1226,7 +1240,7 @@ int __acc_cdecl_main main(int argc, char *argv[])
set_term(stdout); set_term(stdout);
do_files(i,argc,argv); do_files(i,argc,argv);
#if 1 && (UPX_VERSION_HEX < 0x020000) #if 0 && (UPX_VERSION_HEX < 0x020000)
{ {
FILE *f = stdout; FILE *f = stdout;
int fg = con_fg(f,FG_RED); int fg = con_fg(f,FG_RED);
+4774
View File
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -21,14 +21,13 @@
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef PROGNAME
#if 0
#ifndef EOF #ifndef EOF
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#endif #endif
#undef PROGNAME
#if 1
#define PROGNAME(x) (x) #define PROGNAME(x) (x)
#else #else
#include "conf.h" #include "conf.h"
+2 -1
View File
@@ -109,7 +109,7 @@ struct options_t {
bool no_reloc; bool no_reloc;
} dos_exe; } dos_exe;
struct { struct {
bool console_run; bool boot_only;
bool no_align; bool no_align;
bool do_8bit; bool do_8bit;
} ps1_exe; } ps1_exe;
@@ -128,6 +128,7 @@ struct options_t {
int compress_icons; int compress_icons;
int compress_resources; int compress_resources;
signed char compress_rt[25]; // 25 == RT_LAST signed char compress_rt[25]; // 25 == RT_LAST
int strip_loadconf;
int strip_relocs; int strip_relocs;
} win32_pe; } win32_pe;
}; };
+9
View File
@@ -51,6 +51,15 @@ struct Elf_LE32_Ehdr
LE16 e_shentsize; /* Section header table entry size */ LE16 e_shentsize; /* Section header table entry size */
LE16 e_shnum; /* Section header table entry count */ LE16 e_shnum; /* Section header table entry count */
LE16 e_shstrndx; /* Section header string table index */ LE16 e_shstrndx; /* Section header string table index */
// Values for e_type
enum {
ET_NONE = 0, /* No file type */
ET_REL = 1, /* Relocatable file */
ET_EXEC = 2, /* Executable file */
ET_DYN = 3, /* Shared object file */
ET_CORE = 4 /* Core file */
};
} }
__attribute_packed; __attribute_packed;
+6 -7
View File
@@ -338,7 +338,7 @@ unsigned optimize_relocs(upx_byte *b, const unsigned size,
set_le16 (crel_save+2,seg_high); set_le16 (crel_save+2,seg_high);
//OutputFile::dump("x.rel", crel_save, crel - crel_save); //OutputFile::dump("x.rel", crel_save, crel - crel_save);
return crel - crel_save; return (unsigned) (crel - crel_save);
} }
@@ -605,12 +605,11 @@ void PackExe::unpack(OutputFile *fo)
{ {
relocs -= get_le16(obuf+ph.u_len-2); relocs -= get_le16(obuf+ph.u_len-2);
ph.u_len -= 2; ph.u_len -= 2;
upx_byte *p;
wrkmem.alloc(4*MAXRELOCS); wrkmem.alloc(4*MAXRELOCS);
unsigned es = 0,ones = get_le16(relocs); unsigned es = 0, ones = get_le16(relocs);
unsigned seghi = get_le16(relocs+2); const unsigned seghi = get_le16(relocs+2);
p = relocs + 4; const upx_byte *p = relocs + 4;
while (ones) while (ones)
{ {
@@ -628,10 +627,10 @@ void PackExe::unpack(OutputFile *fo)
dorel = true; dorel = true;
if (*p == 0) if (*p == 0)
{ {
upx_byte *q; const upx_byte *q;
for (q = obuf+es*16+di; !(*q == 0x9a && get_le16(q+3) <= seghi); q++) for (q = obuf+es*16+di; !(*q == 0x9a && get_le16(q+3) <= seghi); q++)
; ;
di = q - (obuf+es*16) + 3; di = ptr_diff(q, obuf+es*16) + 3;
} }
else if (*p == 1) else if (*p == 1)
{ {
+1 -1
View File
@@ -257,7 +257,7 @@ PackLinuxI386::buildLinuxLoader(
// This adds the definition to the "library", to be used later. // This adds the definition to the "library", to be used later.
linker->addSection("FOLDEXEC", cprLoader, sizeof(h) + h.sz_cpr); linker->addSection("FOLDEXEC", cprLoader, sizeof(h) + h.sz_cpr);
delete cprLoader; delete [] cprLoader;
n_mru = ft->n_mru; n_mru = ft->n_mru;
+12 -1
View File
@@ -104,7 +104,11 @@ bool PackLinuxI386sh::getShellName(char *buf)
return false; return false;
for (int j = 0; NULL != shname[j]; ++j) { for (int j = 0; NULL != shname[j]; ++j) {
if (0 == strcmp(shname[j], bname + 1)) { if (0 == strcmp(shname[j], bname + 1)) {
return super::canPack(); bool const s = super::canPack();
if (s) {
opt->o_unix.blocksize = blocksize = file_size;
}
return s;
} }
} }
return false; return false;
@@ -139,6 +143,13 @@ PackLinuxI386sh::pack1(OutputFile *fo, Filter &)
generateElfHdr(fo, linux_i386sh_fold, 0x08048000); generateElfHdr(fo, linux_i386sh_fold, 0x08048000);
} }
void
PackLinuxI386sh::pack3(OutputFile *fo, Filter &ft)
{
super::pack3(fo,ft);
elfout.phdr[0].p_filesz = fo->getBytesWritten();
}
/* /*
vi:ts=4:et vi:ts=4:et
*/ */
+1
View File
@@ -48,6 +48,7 @@ public:
virtual int buildLoader(const Filter *); virtual int buildLoader(const Filter *);
virtual void pack1(OutputFile *fo, Filter &ft); virtual void pack1(OutputFile *fo, Filter &ft);
virtual void pack3(OutputFile *fo, Filter &ft);
virtual bool canPack(); virtual bool canPack();
// virtual void unpack(OutputFile *fo) { super::unpack(fo); } // virtual void unpack(OutputFile *fo) { super::unpack(fo); }
+65 -37
View File
@@ -49,6 +49,8 @@ static const
#define CD_SEC 2048 #define CD_SEC 2048
#define PS_HDR_SIZE CD_SEC #define PS_HDR_SIZE CD_SEC
#define PS_RAM_SIZE 0x200000
#define PS_MIN_SIZE (PS_HDR_SIZE*3)
#define PS_MAX_SIZE 0x1e8000 #define PS_MAX_SIZE 0x1e8000
#define SZ_IH_BKUP (10 * sizeof(LE32)) #define SZ_IH_BKUP (10 * sizeof(LE32))
@@ -75,17 +77,17 @@ static const
PackPs1::PackPs1(InputFile *f) : PackPs1::PackPs1(InputFile *f) :
super(f), super(f),
isCon(false^opt->ps1_exe.console_run), is32Bit(true^opt->ps1_exe.do_8bit), isCon(true^opt->ps1_exe.boot_only), is32Bit(true^opt->ps1_exe.do_8bit),
overlap(0), sa_cnt(0), cfile_size(0) overlap(0), sa_cnt(0)
{ {
COMPILE_TIME_ASSERT(sizeof(ps1_exe_t) == 188); COMPILE_TIME_ASSERT(sizeof(ps1_exe_t) == 188);
COMPILE_TIME_ASSERT(PS_HDR_SIZE > sizeof(ps1_exe_t)); COMPILE_TIME_ASSERT(PS_HDR_SIZE > sizeof(ps1_exe_t));
COMPILE_TIME_ASSERT(SZ_IH_BKUP == 40); COMPILE_TIME_ASSERT(SZ_IH_BKUP == 40);
#if 1 || defined(WITH_NRV) #if 1 || defined(WITH_NRV)
COMPILE_TIME_ASSERT(sizeof(nrv_boot_loader) == 3918); COMPILE_TIME_ASSERT(sizeof(nrv_boot_loader) == 3918);
COMPILE_TIME_ASSERT(NRV_BOOT_LOADER_CRC32 == 0xb1939f02); COMPILE_TIME_ASSERT(NRV_BOOT_LOADER_CRC32 == 0xdf0cbd9e);
COMPILE_TIME_ASSERT(sizeof(nrv_con_loader) == 2810); COMPILE_TIME_ASSERT(sizeof(nrv_con_loader) == 2810);
COMPILE_TIME_ASSERT(NRV_CON_LOADER_CRC32 == 0xaf39f37f); COMPILE_TIME_ASSERT(NRV_CON_LOADER_CRC32 == 0x31747f8b);
#endif #endif
fdata_size = file_size - PS_HDR_SIZE; fdata_size = file_size - PS_HDR_SIZE;
} }
@@ -127,23 +129,30 @@ int PackPs1::readFileHeader()
bool PackPs1::checkFileHeader() bool PackPs1::checkFileHeader()
{ {
if (fdata_size != ih.tx_len || (ih.tx_len & 3) && !opt->force ) if (fdata_size != ih.tx_len || (ih.tx_len & 3))
{ {
infoWarning("check header for file size"); if (!opt->force)
throwCantPack("file size entry damaged (try --force)");
else
{
opt->info_mode += !opt->info_mode ? 1 : 0;
infoWarning("fixing damaged header, keeping backup file");
opt->backup = 1;
ih.tx_len = fdata_size;
}
}
if (!opt->force &&
(ih.da_ptr != 0 || ih.da_len != 0 ||
ih.bs_ptr != 0 || ih.bs_len != 0))
{
infoWarning("unsupported header field entry");
return false; return false;
} }
cfile_size = fdata_size; if (!opt->force && ih.is_ptr == 0)
if (ih.da_ptr != 0 || ih.da_len != 0 ||
ih.bs_ptr != 0 || ih.bs_len != 0 && !opt->force)
{ {
infoWarning("stack pointer field empty");
return false; return false;
} }
if (ih.is_ptr == 0 && !opt->force)
{
infoWarning("check header for stack pointer");
return false;
}
cfile_size = ih.tx_len;
return true; return true;
} }
@@ -189,20 +198,30 @@ void PackPs1::patch_mips_le(void *b, int blen, const void *old, unsigned new_)
bool PackPs1::canPack() bool PackPs1::canPack()
{ {
unsigned char buf[PS_HDR_SIZE-HD_CODE_OFS];
if (!readFileHeader()) if (!readFileHeader())
return false; return false;
unsigned char buf[PS_HDR_SIZE-HD_CODE_OFS];
fi->readx(buf, sizeof(buf)); fi->readx(buf, sizeof(buf));
for (unsigned i = 0; i < sizeof(buf); i++)
if (buf[i] != 0 && !opt->force)
throwCantPack("unknown data in header (try --force)");
checkAlreadyPacked(buf, sizeof(buf)); checkAlreadyPacked(buf, sizeof(buf));
for (unsigned i = 0; i < sizeof(buf); i++)
if (buf[i] != 0)
if (!opt->force)
throwCantPack("unknown data in header (try --force)");
else
{
opt->info_mode += !opt->info_mode ? 1 : 0;
infoWarning("clearing header, keeping backup file");
opt->backup = 1;
break;
}
if (!checkFileHeader()) if (!checkFileHeader())
throwCantPack("unsupported header flags (try --force)"); throwCantPack("unsupported header flags (try --force)");
if (file_size <= (PS_HDR_SIZE*3) && !opt->force) if (!opt->force && file_size < PS_MIN_SIZE)
throwCantPack("file is too small (try --force)"); throwCantPack("file is too small (try --force)");
if (file_size > PS_MAX_SIZE && !opt->force) if (!opt->force && file_size > PS_MAX_SIZE)
throwCantPack("file is too big (try --force)"); throwCantPack("file is too big (try --force)");
return true; return true;
} }
@@ -223,8 +242,7 @@ int PackPs1::buildLoader(const Filter *)
isCon ? ph.c_len & 3 ? "PS1PADCD" : "" : "PS1ENTRY", isCon ? ph.c_len & 3 ? "PS1PADCD" : "" : "PS1ENTRY",
ih.tx_ptr & 0xffff ? "PS1CONHL" : "PS1CONHI", ih.tx_ptr & 0xffff ? "PS1CONHL" : "PS1CONHI",
isCon ? "PS1ENTRY" : "", isCon ? "PS1ENTRY" : "",
NULL NULL);
);
if (ph.method == M_NRV2B_8) if (ph.method == M_NRV2B_8)
addLoader("PS1N2B08", NULL); addLoader("PS1N2B08", NULL);
@@ -242,14 +260,14 @@ int PackPs1::buildLoader(const Filter *)
throwInternalError("unknown compression method"); throwInternalError("unknown compression method");
if (sa_cnt) if (sa_cnt)
addLoader(sa_cnt > 0xfffc ? "PS1MSETB" : "PS1MSETS", // set small/big memset addLoader(sa_cnt > (0x10000 << 2) ? "PS1MSETB" : "PS1MSETS",
ih.tx_len & 3 ? "PS1MSETU" : "PS1MSETA", // un/aligned memset ih.tx_len & 3 ? "PS1MSETU" : "PS1MSETA",
NULL NULL);
);
addLoader("PS1EXITC", "IDENTSTR", "PS1PAHDR", addLoader("PS1EXITC", "IDENTSTR", "PS1PAHDR",
isCon ? "PS1SREGS" : "", isCon ? "PS1SREGS" : "",
NULL NULL);
);
return getLoaderSize(); return getLoaderSize();
} }
@@ -262,7 +280,7 @@ void PackPs1::pack(OutputFile *fo)
{ {
ibuf.alloc(fdata_size); ibuf.alloc(fdata_size);
obuf.allocForCompression(fdata_size); obuf.allocForCompression(fdata_size);
const upx_byte *p_scan = ibuf+(fdata_size-1); const upx_byte *p_scan = ibuf+fdata_size;
// read file // read file
fi->seek(PS_HDR_SIZE,SEEK_SET); fi->seek(PS_HDR_SIZE,SEEK_SET);
@@ -270,10 +288,10 @@ void PackPs1::pack(OutputFile *fo)
// scan EOF for 2048 bytes sector alignment // scan EOF for 2048 bytes sector alignment
// the removed space will secure in-place decompression // the removed space will secure in-place decompression
while (!(*p_scan--)) { if (sa_cnt++ > (0xfffc<<3)) break; } while (!(*--p_scan)) { if (sa_cnt++ > (0x10000<<5) || sa_cnt >= fdata_size-1024) break; }
if (sa_cnt > 0xfffc) if (sa_cnt > (0x10000<<2))
sa_cnt = ALIGN_DOWN(sa_cnt,8); sa_cnt = ALIGN_DOWN(sa_cnt,32);
else else
sa_cnt = ALIGN_DOWN(sa_cnt,4); sa_cnt = ALIGN_DOWN(sa_cnt,4);
@@ -304,6 +322,14 @@ void PackPs1::pack(OutputFile *fo)
memcpy(&oh.ih_bkup, &ih.epc, SZ_IH_BKUP); memcpy(&oh.ih_bkup, &ih.epc, SZ_IH_BKUP);
oh.ih_csum = upx_adler32(&ih.epc, SZ_IH_BKUP); oh.ih_csum = upx_adler32(&ih.epc, SZ_IH_BKUP);
if (ih.is_ptr == 0)
oh.is_ptr = PS_RAM_SIZE-0x10;
if (ih.da_ptr != 0 || ih.da_len != 0 ||
ih.bs_ptr != 0 || ih.bs_len != 0)
oh.da_ptr = oh.da_len =
oh.bs_ptr = oh.bs_len = 0;
const int lsize = getLoaderSize(); const int lsize = getLoaderSize();
MemBuffer loader(lsize); MemBuffer loader(lsize);
memcpy(loader, getLoader(), lsize); memcpy(loader, getLoader(), lsize);
@@ -311,7 +337,7 @@ void PackPs1::pack(OutputFile *fo)
patchPackHeader(loader,lsize); patchPackHeader(loader,lsize);
unsigned pad = 0; unsigned pad = 0;
unsigned filelen = ALIGN_UP((cfile_size ? cfile_size : (unsigned) ih.tx_len), 4); unsigned filelen = ALIGN_UP(ih.tx_len, 4);
unsigned pad_code = TIL_ALIGNED(ph.c_len, 4); unsigned pad_code = TIL_ALIGNED(ph.c_len, 4);
const unsigned decomp_data_start = ih.tx_ptr; const unsigned decomp_data_start = ih.tx_ptr;
@@ -335,7 +361,8 @@ void PackPs1::pack(OutputFile *fo)
patch_mips_le(loader,c_len,"JPEP",MIPS_JP(ih.epc)); patch_mips_le(loader,c_len,"JPEP",MIPS_JP(ih.epc));
if (sa_cnt) if (sa_cnt)
patch_mips_le(loader,c_len,"SC",MIPS_LO(sa_cnt > 0xfffc ? sa_cnt >> 3 : sa_cnt)); patch_mips_le(loader,c_len,"SC",
MIPS_LO(sa_cnt > (0x10000 << 2) ? sa_cnt >> 5 : sa_cnt >> 2));
if (ih.tx_ptr & 0xffff) if (ih.tx_ptr & 0xffff)
patch_mips_le(loader,c_len,"DECO",decomp_data_start); patch_mips_le(loader,c_len,"DECO",decomp_data_start);
else else
@@ -401,6 +428,7 @@ void PackPs1::pack(OutputFile *fo)
throwNotCompressible(); throwNotCompressible();
#if 0 #if 0
printf("%-13s: uncompressed : %8ld bytes\n", getName(), (long) ph.u_len);
printf("%-13s: compressed : %8ld bytes\n", getName(), (long) ph.c_len); printf("%-13s: compressed : %8ld bytes\n", getName(), (long) ph.c_len);
printf("%-13s: decompressor : %8ld bytes\n", getName(), (long) lsize - h_len); printf("%-13s: decompressor : %8ld bytes\n", getName(), (long) lsize - h_len);
printf("%-13s: code entry : %08X bytes\n", getName(), (unsigned int) oh.epc); printf("%-13s: code entry : %08X bytes\n", getName(), (unsigned int) oh.epc);
@@ -448,7 +476,7 @@ void PackPs1::unpack(OutputFile *fo)
assert(oh.tx_len >= ph.u_len); assert(oh.tx_len >= ph.u_len);
const unsigned pad = oh.tx_len - ph.u_len; const unsigned pad = oh.tx_len - ph.u_len;
ibuf.alloc(fdata_size); ibuf.alloc(fdata_size > PS_HDR_SIZE ? fdata_size : PS_HDR_SIZE);
obuf.allocForUncompression(ph.u_len, pad); obuf.allocForUncompression(ph.u_len, pad);
fi->seek(PS_HDR_SIZE, SEEK_SET); fi->seek(PS_HDR_SIZE, SEEK_SET);
@@ -466,7 +494,7 @@ void PackPs1::unpack(OutputFile *fo)
// write header // write header
fo->write(&oh, sizeof(oh)); fo->write(&oh, sizeof(oh));
// align the ps exe header (mode 2 sector data size) // align the ps exe header (mode 2 sector data size)
ibuf.clear(0, PS_HDR_SIZE - sizeof(oh)); ibuf.clear();
// write uncompressed data + pad // write uncompressed data + pad
fo->write(ibuf, PS_HDR_SIZE - sizeof(oh)); fo->write(ibuf, PS_HDR_SIZE - sizeof(oh));
obuf.clear(ph.u_len, pad); obuf.clear(ph.u_len, pad);
-2
View File
@@ -104,8 +104,6 @@ protected:
// filesize-PS_HDR_SIZE // filesize-PS_HDR_SIZE
unsigned fdata_size; unsigned fdata_size;
// calculated filesize
unsigned cfile_size;
}; };
+622
View File
@@ -0,0 +1,622 @@
/* p_vmlinx.cpp -- pack vmlinux ET_EXEC file (before bootsect or setup)
This file is part of the UPX executable compressor.
Copyright (C) 2004 John Reiser
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2004 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
John Reiser
jreiser@users.sourceforge.net
*/
#include "conf.h"
#include "file.h"
#include "filter.h"
#include "packer.h"
#include "p_vmlinx.h"
static const
#include "stub/l_vmlinx.h"
/*************************************************************************
//
**************************************************************************/
PackVmlinuxI386::PackVmlinuxI386(InputFile *f) :
super(f), n_ptload(0), phdri(NULL), shdri(NULL)
{
}
PackVmlinuxI386::~PackVmlinuxI386()
{
delete [] phdri;
delete [] shdri;
}
const int *PackVmlinuxI386::getCompressionMethods(int method, int level) const
{
return Packer::getDefaultCompressionMethods_le32(method, level);
}
const int *PackVmlinuxI386::getFilters() const
{
static const int filters[] = {
0x49,
-1 };
return filters;
}
static int __acc_cdecl_qsort
compare_Phdr(void const *aa, void const *bb)
{
Elf_LE32_Phdr const *const a = (Elf_LE32_Phdr const *)aa;
Elf_LE32_Phdr const *const b = (Elf_LE32_Phdr const *)bb;
unsigned const xa = a->p_type - Elf_LE32_Phdr::PT_LOAD;
unsigned const xb = b->p_type - Elf_LE32_Phdr::PT_LOAD;
if (xa < xb) return -1; // PT_LOAD first
if (xa > xb) return 1;
if (a->p_paddr < b->p_paddr) return -1; // ascending by .p_paddr
if (a->p_paddr > b->p_paddr) return 1;
return 0;
}
//
// Examples as of 2004-07-16 [readelf --segments vmlinux # before fiddling]:
//
//----- kernel-2.6.7 plain [defconfig?]
//Program Headers(2):
// Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
// LOAD 0x001000 0x00100000 0x00100000 0x1c7e61 0x1c7e61 R E 0x1000
// LOAD 0x1c8e64 0x002c8e64 0x002c8e64 0x00000 0x00000 RW 0x1000
//
//----- kernel-2.6.7-1.488 Fedora Core 3 test 1
//Program Headers(5):
// Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
// LOAD 0x001000 0x02100000 0x02100000 0x202246 0x202246 R E 0x1000
// LOAD 0x204000 0xffff3000 0x02303000 0x00664 0x00664 R E 0x1000
// LOAD 0x205000 0x02304000 0x02304000 0x43562 0x43562 R 0x1000
// LOAD 0x249000 0x02348000 0x02348000 0x81800 0xcb0fc RWE 0x1000
// STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
//
bool PackVmlinuxI386::canPack()
{
fi->seek(0, SEEK_SET);
fi->readx(&ehdri, sizeof(ehdri));
// now check the ELF header
if (memcmp(&ehdri, "\x7f\x45\x4c\x46\x01\x01\x01", 7) // ELF 32-bit LSB
|| !memcmp(&ehdri.e_ident[8], "FreeBSD", 7) // branded
|| ehdri.e_machine != 3 // Intel 80386
|| ehdri.e_version != 1 // version
)
return false;
// additional requirements for vmlinux
if (ehdri.e_ehsize != sizeof(ehdri) // different <elf.h> ?
|| ehdri.e_phoff != sizeof(ehdri) // Phdrs not contiguous with Ehdr
|| ehdri.e_phentsize!=sizeof(Elf_LE32_Phdr)
|| ehdri.e_type!=Elf_LE32_Ehdr::ET_EXEC
|| 0x00100000!=(0x001fffff & ehdri.e_entry) // entry not an odd 1MB
) {
return false;
}
phdri = new Elf_LE32_Phdr[(unsigned) ehdri.e_phnum];
fi->seek(ehdri.e_phoff, SEEK_SET);
fi->readx(phdri, ehdri.e_phnum * sizeof(*phdri));
// Put PT_LOAD together at the beginning, ascending by .p_paddr.
qsort(phdri, ehdri.e_phnum, sizeof(*phdri), compare_Phdr);
// Check that PT_LOADs form one contiguous chunk of the file.
for (unsigned j = 0; j < ehdri.e_phnum; ++j) {
if (Elf_LE32_Phdr::PT_LOAD==phdri[j].p_type) {
if (0xfff & (phdri[j].p_offset | phdri[j].p_paddr
| phdri[j].p_align | phdri[j].p_vaddr) ) {
return false;
}
if (0 < j) {
unsigned const sz = (0u - phdri[j-1].p_align)
& (phdri[j-1].p_align -1 + phdri[j-1].p_filesz);
if ((sz + phdri[j-1].p_offset)!=phdri[j].p_offset) {
return false;
}
}
++n_ptload;
sz_ptload = phdri[j].p_filesz + phdri[j].p_offset - phdri[0].p_offset;
}
}
return 0 < n_ptload;
}
int PackVmlinuxI386::buildLoader(const Filter *ft)
{
// prepare loader
initLoader(nrv_loader, sizeof(nrv_loader));
addLoader("LINUX000",
(0x40==(0xf0 & ft->id)) ? "LXCKLLT1" : (ft->id ? "LXCALLT1" : ""),
"LXMOVEUP",
getDecompressor(),
NULL
);
if (ft->id)
{
assert(ft->calls > 0);
if (0x40==(0xf0 & ft->id)) {
addLoader("LXCKLLT9", NULL);
}
else {
addLoader("LXCALLT9", NULL);
}
addFilter32(ft->id);
}
addLoader("LINUX990""IDENTSTR""UPX1HEAD", NULL);
return getLoaderSize();
}
void PackVmlinuxI386::pack(OutputFile *fo)
{
unsigned fo_off = 0;
Elf_LE32_Ehdr ehdro;
LE32 tmp_le32;
// NULL
// .text(PT_LOADs) .note(1st page) .note(rest)
// .shstrtab /* .symtab .strtab */
Elf_LE32_Shdr shdro[1+3+1/*+2*/];
memset(shdro, 0, sizeof(shdro));
char const shstrtab[]= "\0.text\0.note\0.shstrtab\0.symtab\0.strtab";
char const *p = shstrtab;
ibuf.alloc(file_size);
obuf.allocForCompression(file_size);
// .e_ident, .e_machine, .e_version, .e_flags
memcpy(&ehdro, &ehdri, sizeof(ehdro));
ehdro.e_type = Elf_LE32_Ehdr::ET_REL;
ehdro.e_entry = 0;
ehdro.e_phoff = 0;
ehdro.e_shoff = 0; // later
ehdro.e_phentsize = 0;
ehdro.e_phnum = 0;
ehdro.e_shnum = 1+3+1/*+2*/;
ehdro.e_shstrndx = 4;
fo->write(&ehdro, sizeof(ehdro)); fo_off+= sizeof(ehdro);
ph.u_len = sz_ptload;
fi->seek(phdri[0].p_offset, SEEK_SET);
fi->readx(ibuf, ph.u_len);
checkAlreadyPacked(ibuf + ph.u_len - 1024, 1024);
// prepare filter
ph.filter = 0;
Filter ft(ph.level);
ft.buf_len = ph.u_len;
ft.addvalue = 0; // we are independent of actual runtime address; see ckt32
compressWithFilters(&ft, 1 << 20);
const unsigned lsize = getLoaderSize();
MemBuffer loader(lsize);
memcpy(loader, getLoader(), lsize);
patchPackHeader(loader, lsize);
patch_le32(loader, lsize, "ULEN", ph.u_len);
patchFilter32(loader, lsize, &ft);
while (0!=*p++) ;
shdro[1].sh_name = ptr_diff(p, shstrtab);
shdro[1].sh_type = Elf_LE32_Shdr::SHT_PROGBITS;
shdro[1].sh_flags = Elf_LE32_Shdr::SHF_ALLOC | Elf_LE32_Shdr::SHF_EXECINSTR;
shdro[1].sh_offset = fo_off;
shdro[1].sh_size = 1+ 4+ ph.c_len + lsize;
shdro[1].sh_addralign = 1;
unsigned char const call = 0xE8; // opcode for CALL d32
fo->write(&call, 1); fo_off+=1;
tmp_le32 = ph.c_len; fo->write(&tmp_le32, 4); fo_off += 4;
fo->write(obuf, ph.c_len); fo_off += ph.c_len;
fo->write(loader, lsize); fo_off += lsize;
#if 0
printf("%-13s: compressed : %8u bytes\n", getName(), ph.c_len);
printf("%-13s: decompressor : %8u bytes\n", getName(), lsize);
#endif
verifyOverlappingDecompression();
// .note with 1st page --------------------------------
ph.u_len = phdri[0].p_offset;
fi->seek(0, SEEK_SET);
fi->readx(ibuf, ph.u_len);
compress(ibuf, obuf);
while (0!=*p++) ;
shdro[2].sh_name = ptr_diff(p, shstrtab);
shdro[2].sh_type = Elf_LE32_Shdr::SHT_NOTE;
shdro[2].sh_offset = fo_off;
shdro[2].sh_size = sizeof(ph.u_len) + ph.c_len;
shdro[2].sh_addralign = 1;
tmp_le32 = ph.u_len; fo->write(&tmp_le32, 4);
fo->write(obuf, ph.c_len); fo_off += shdro[2].sh_size;
// .note with rest --------------------------------
ph.u_len = file_size - (sz_ptload + phdri[0].p_offset);
fi->seek(sz_ptload + phdri[0].p_offset, SEEK_SET);
fi->readx(ibuf, ph.u_len);
// Temporarily decrease ph.level by about (1+ log2(sz_rest / sz_ptload))
// to avoid spending unreasonable effort compressing large symbol tables
// that are discarded 99.9% of the time anyway.
int const old_level = ph.level;
for (unsigned v = ((ph.u_len>>3) + ph.u_len) / sz_ptload; 0 < v; v>>=1) {
if (0== --ph.level) {
ph.level = 1;
}
}
compress(ibuf, obuf);
ph.level = old_level;
// while (0!=*p++) ; // name is the same
shdro[3].sh_name = ptr_diff(p, shstrtab);
shdro[3].sh_type = Elf_LE32_Shdr::SHT_NOTE;
shdro[3].sh_offset = fo_off;
shdro[3].sh_size = sizeof(ph.u_len) + ph.c_len;
shdro[3].sh_addralign = 1;
tmp_le32 = ph.u_len; fo->write(&tmp_le32, 4);
fo->write(obuf, ph.c_len); fo_off += shdro[3].sh_size;
while (0!=*p++) ;
shdro[4].sh_name = ptr_diff(p, shstrtab);
shdro[4].sh_type = Elf_LE32_Shdr::SHT_STRTAB;
shdro[4].sh_offset = fo_off;
shdro[4].sh_size = 1+ sizeof(shstrtab); // 1+: terminating '\0'
shdro[4].sh_addralign = 1;
fo->write(shstrtab, shdro[4].sh_size); fo_off += shdro[4].sh_size;
#if 0 /*{ no symbols! */
while (0!=*p++) ;
fo_off = ~3 & (3+ fo_off);
shdro[5].sh_name = ptr_diff(p, shstrtab);
shdro[5].sh_type = Elf_LE32_Shdr::SHT_SYMTAB;
shdro[5].sh_offset = fo_off;
shdro[5].sh_size = 16; // XXX ?
shdro[5].sh_link = 6; // to .strtab for symbols
shdro[5].sh_addralign = 4;
shdro[5].sh_entsize = 16; // XXX Elf32_Sym
fo->seek(fo_off, SEEK_SET);
fo->write("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16); fo_off += 16;
while (0!=*p++) ;
shdro[6].sh_name = ptr_diff(p, shstrtab);
shdro[6].sh_type = Elf_LE32_Shdr::SHT_STRTAB;
shdro[6].sh_offset = fo_off;
shdro[6].sh_size = 1; // XXX ?
shdro[6].sh_addralign = 1;
fo->write("", 1); fo_off += 1;
#endif /*}*/
fo_off = ~3 & (3+ fo_off);
fo->seek(fo_off, SEEK_SET);
ehdro.e_shoff = fo_off;
fo->write(shdro, sizeof(shdro));
fo->seek(0, SEEK_SET);
fo->write(&ehdro, sizeof(ehdro));
if (!checkFinalCompressionRatio(fo))
throwNotCompressible();
}
/*************************************************************************
// unpack
**************************************************************************/
int PackVmlinuxI386::canUnpack()
{
fi->seek(0, SEEK_SET);
fi->readx(&ehdri, sizeof(ehdri));
// now check the ELF header
if (memcmp(&ehdri, "\x7f\x45\x4c\x46\x01\x01\x01", 7) // ELF 32-bit LSB
|| !memcmp(&ehdri.e_ident[8], "FreeBSD", 7) // branded
|| ehdri.e_machine != 3 // Intel 80386
|| ehdri.e_version != 1 // version
|| ehdri.e_type != Elf_LE32_Ehdr::ET_REL
|| ehdri.e_shnum < 4
|| (unsigned)file_size < (ehdri.e_shnum * sizeof(Elf_LE32_Shdr) + ehdri.e_shoff)
)
return false;
// find the .shstrtab section
char shstrtab[40];
Elf_LE32_Shdr *p, *p_shstrtab=0;
shdri = new Elf_LE32_Shdr[(unsigned) ehdri.e_shnum];
fi->seek(ehdri.e_shoff, SEEK_SET);
fi->readx(shdri, ehdri.e_shnum * sizeof(*shdri));
int j;
for (p = shdri, j= ehdri.e_shnum; --j>=0; ++p) {
if (Elf_LE32_Shdr::SHT_STRTAB==p->sh_type
&& p->sh_size <= sizeof(shstrtab)
&& (p->sh_size + p->sh_offset) <= (unsigned) file_size
&& (10+ p->sh_name) <= p->sh_size // 1+ strlen(".shstrtab")
) {
fi->seek(p->sh_offset, SEEK_SET);
fi->readx(shstrtab, p->sh_size);
if (0==strcmp(".shstrtab", shstrtab + p->sh_name)) {
p_shstrtab = p;
break;
}
}
}
if (0==p_shstrtab) {
return false;
}
// check for .text .note .note and sane (.sh_size + .sh_offset)
p_note0 = p_note1 = p_text = 0;
for (p= shdri, j= ehdri.e_shnum; --j>=0; ++p) {
if ((unsigned)file_size < (p->sh_size + p->sh_offset)
|| p_shstrtab->sh_size < (5+ p->sh_name) ) {
continue;
}
if (0==strcmp(".text", shstrtab + p->sh_name)) {
p_text = p;
}
if (0==strcmp(".note", shstrtab + p->sh_name)) {
if (0==p_note0) {
p_note0 = p;
} else
if (0==p_note1) {
p_note1 = p;
}
}
}
if (0==p_text || 0==p_note0 || 0==p_note1) {
return false;
}
char buf[1024];
fi->seek(p_text->sh_offset + p_text->sh_size - sizeof(buf), SEEK_SET);
fi->readx(buf, sizeof(buf));
if (!getPackHeader(buf, sizeof(buf)))
return false;
return true;
}
void PackVmlinuxI386::unpack(OutputFile *fo)
{
unsigned char buf[5];
PackHeader const ph_tmp(ph);
fi->seek(p_note0->sh_offset, SEEK_SET);
fi->readx(&buf[0], 4);
ph.u_len = get_le32(buf);
ph.c_len = p_note0->sh_size - 4;
ibuf.alloc(ph.c_len);
fi->readx(ibuf, ph.c_len);
obuf.allocForUncompression(ph.u_len);
decompress(ibuf, obuf, false);
fo->write(obuf, ph.u_len);
obuf.dealloc();
ibuf.dealloc();
ph = ph_tmp;
fi->seek(p_text->sh_offset, SEEK_SET);
fi->readx(&buf[0], 5);
if (0xE8!=buf[0] || get_le32(&buf[1]) != ph.c_len)
{
throwCantUnpack(".text corrupted");
}
ibuf.alloc(ph.c_len);
fi->readx(ibuf, ph.c_len);
obuf.allocForUncompression(ph.u_len);
decompress(ibuf, obuf);
Filter ft(ph.level);
ft.init(ph.filter, 0);
ft.cto = (unsigned char) ph.filter_cto;
ft.unfilter(obuf, ph.u_len);
fo->write(obuf, ph.u_len);
obuf.dealloc();
ibuf.dealloc();
fi->seek(p_note1->sh_offset, SEEK_SET);
fi->readx(&buf[0], 4);
ph.u_len = get_le32(buf);
ph.c_len = p_note1->sh_size - 4;
ibuf.alloc(ph.c_len);
fi->readx(ibuf, p_note1->sh_size - sizeof(ph.u_len));
obuf.allocForUncompression(ph.u_len);
decompress(ibuf, obuf, false);
fo->write(obuf, ph.u_len);
obuf.dealloc();
ibuf.dealloc();
ph = ph_tmp;
}
//
// Example usage within build system of Linux kernel-2.6.7:
//
//----- arch/i386/boot/compressed/Makefile
//#
//# linux/arch/i386/boot/compressed/Makefile
//#
//# create a compressed vmlinux image from the original vmlinux
//#
//
//targets := vmlinux upx-head.o upx-piggy.o
//
//LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32
//
//$(obj)/vmlinux: $(obj)/upx-head.o $(obj)/upx-piggy.o FORCE
// $(call if_changed,ld)
// @:
//
//$(obj)/upx-piggy.o: vmlinux FORCE
// rm -f $@
// upx --best -o $@ $<
//-----
//
//----- arch/i386/boot/compressed/upx-head.S
// .text
//startup_32: .globl startup_32 # In: %esi=0x90000 setup data "real_mode pointer"
// #cli # this must be true already
//
// /* The only facts about segments here, that are true for all kernels:
// * %cs is a valid "flat" code segment; no other segment reg is valid;
// * the next segment after %cs is a valid "flat" data segment, but
// * no segment register designates it yet.
// */
// movl %cs,%eax; addl $1<<3,%eax # the next segment after %cs
// movl %eax,%ds
// movl %eax,%es
// leal 0x9000(%esi),%ecx # 0x99000 typical
// movl %ecx,-8(%ecx) # 32-bit offset for stack pointer
// movl %eax,-4(%ecx) # segment for stack pointer
// lss -8(%ecx),%esp # %ss:%esp= %ds:0x99000
// /* Linux Documentation/i386/boot.txt "SAMPLE BOOT CONFIGURATION" says
// 0x8000-0x8FFF Stack and heap [inside the "real mode segment",
// just below the command line at offset 0x9000].
//
// arch/i386/boot/compressed/head.S "Do the decompression ..." says
// %esi contains the "real mode pointer" [as a 32-bit addr].
//
// In any case, avoid EBDA (Extended BIOS Data Area) below 0xA0000.
// boot.txt says 0x9A000 is the limit. LILO goes up to 0x9B000.
// */
//
// pushl $0; popf # subsumes "cli; cld"; also clears NT for buggy BIOS
//
// movl $ 0x100000,%eax # destination of uncompression (and entry point)
// push %cs
/* Fall into .text of upx-compressed vmlinux. */
//-----
// Approximate translation for Linux 2.4.x:
// - - -
// arch/i386/Makefile: LD_FLAGS=-e startup_32
//----- arch/i386/boot/compressed/Makefile
//# linux/arch/i386/boot/compressed/Makefile
//#
//# create a compressed vmlinux image from the original vmlinux
//#
//
//HEAD = upx-head.o
//SYSTEM = $(TOPDIR)/vmlinux
//
//OBJECTS = $(HEAD)
//
//ZLDFLAGS = -e startup_32
//
//#
//# ZIMAGE_OFFSET is the load offset of the compression loader
//# BZIMAGE_OFFSET is the load offset of the high loaded compression loader
//#
//ZIMAGE_OFFSET = 0x1000
//BZIMAGE_OFFSET = 0x100000
//
//ZLINKFLAGS = -Ttext $(ZIMAGE_OFFSET) $(ZLDFLAGS)
//BZLINKFLAGS = -Ttext $(BZIMAGE_OFFSET) $(ZLDFLAGS)
//
//all: vmlinux
//
//vmlinux: upx-piggy.o $(OBJECTS)
// $(LD) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) upx-piggy.o
//
//bvmlinux: upx-piggy.o $(OBJECTS)
// $(LD) $(BZLINKFLAGS) -o bvmlinux $(OBJECTS) upx-piggy.o
//
//upx-piggy.o: $(SYSTEM)
// $(RM) -f $@
// upx --best -o $@ $<
//
//clean:
// rm -f vmlinux bvmlinux _tmp_*
//-----
//
// Example test jig:
// $ gcc -o test-piggy -nostartfiles -nostdlib test-piggy.o piggy.o
// $ gdb test-piggy
// (gdb) run >dumped
// (gdb) /* Execute [single step, etc.; the decompressor+unfilter moves!]
// * until reaching the 'lret' at the end of unfilter.
// */
// (gdb) set $pc= &dump
// (gdb) stepi
// (gdb) set $edx=<actual_uncompressed_length>
// (gdb) continue
// (gdb) q
// $ # Compare file 'dumped' with the portion of vmlinux that made piggy.o.
// $ dd if=vmlinux bs=<leader_size> skip=1 | cmp - dumped
// cmp: EOF on dumped
// $
//----- test-piggy.S
//#include <asm/mman.h>
//#include <asm/unistd.h>
//
//dump:
// movl $0x456789,%edx # length MODIFY THIS VALUE TO SUIT YOUR CASE
// movl $0x100000,%ecx # base
// movl $1,%ebx # stdout
// movl $ __NR_write,%eax
// int $0x80
// nop
// hlt
//mmap:
// pushl %ebx
// leal 2*4(%esp),%ebx
// pushl $ __NR_mmap; popl %eax
// int $0x80
// popl %ebx
// ret $6*4
//
//_start: .globl _start
// nop
// int3 # enter debugger!
// pushl $0
// pushl $0
// pushl $ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED
// pushl $ PROT_EXEC | PROT_WRITE | PROT_READ
// pushl $0x600000 # 6MB length
// pushl $0x100000 # 1MB address
// call mmap
// leal -0x9000(%esp),%esi # expect "lea 0x9000(%esi),%esp" later
// push %cs
///* Fall into .text of upx-compressed vmlinux. */
//-----
/*
vi:ts=4:et
*/
+78
View File
@@ -0,0 +1,78 @@
/* p_vmlinx.h --
This file is part of the UPX executable compressor.
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2004 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
*/
#ifndef __UPX_P_VMLINX_H
#define __UPX_P_VMLINX_H
#include "p_elf.h"
/*************************************************************************
// vmlinx/i386 (bare binary Linux kernel image)
**************************************************************************/
class PackVmlinuxI386 : public Packer
{
typedef Packer super;
public:
PackVmlinuxI386(InputFile *f);
virtual ~PackVmlinuxI386();
virtual int getVersion() const { return 13; }
virtual int getFormat() const { return UPX_F_VMLINUX_i386; }
virtual const char *getName() const { return "vmlinux/386"; }
virtual const int *getCompressionMethods(int method, int level) const;
virtual const int *getFilters() const;
virtual void pack(OutputFile *fo);
virtual void unpack(OutputFile *fo);
virtual bool canPack();
virtual int canUnpack();
protected:
virtual int buildLoader(const Filter *ft);
// virtual const upx_byte *getLoader() const;
// virtual int getLoaderSize() const;
int n_ptload;
unsigned sz_ptload;
Elf_LE32_Phdr *phdri; // from input file
Elf_LE32_Shdr *shdri; // from input file
Elf_LE32_Shdr *p_text;
Elf_LE32_Shdr *p_note0;
Elf_LE32_Shdr *p_note1;
Elf_LE32_Ehdr ehdri; // from input file
};
#endif /* already included */
/*
vi:ts=4:et
*/
+6 -5
View File
@@ -38,7 +38,8 @@ static const
#include "stub/l_vmlinz.h" #include "stub/l_vmlinz.h"
static const unsigned kernel_entry = 0x100000; static const unsigned kernel_entry = 0x100000;
static const unsigned stack_during_uncompression = 0x90000; static const unsigned stack_offset_during_uncompression = 0x9000;
// add to "real mode pointer" in %esi; total 0x99000 is typical
// from /usr/src/linux/arch/i386/boot/compressed/Makefile // from /usr/src/linux/arch/i386/boot/compressed/Makefile
static const unsigned zimage_offset = 0x1000; static const unsigned zimage_offset = 0x1000;
@@ -273,7 +274,7 @@ void PackVmlinuzI386::pack(OutputFile *fo)
// prepare filter // prepare filter
Filter ft(ph.level); Filter ft(ph.level);
ft.buf_len = ph.u_len; ft.buf_len = ph.u_len;
ft.addvalue = kernel_entry; ft.addvalue = kernel_entry; // saves 4 bytes in unfilter code
// compress // compress
compressWithFilters(&ft, 1 << 20); compressWithFilters(&ft, 1 << 20);
@@ -285,7 +286,7 @@ void PackVmlinuzI386::pack(OutputFile *fo)
patchFilter32(loader, lsize, &ft); patchFilter32(loader, lsize, &ft);
patch_le32(loader, lsize, "ESI1", zimage_offset + lsize); patch_le32(loader, lsize, "ESI1", zimage_offset + lsize);
patch_le32(loader, lsize, "KEIP", kernel_entry); patch_le32(loader, lsize, "KEIP", kernel_entry);
patch_le32(loader, lsize, "STAK", stack_during_uncompression); patch_le32(loader, lsize, "STAK", stack_offset_during_uncompression);
boot_sect_t * const bs = (boot_sect_t *) ((unsigned char *) setup_buf); boot_sect_t * const bs = (boot_sect_t *) ((unsigned char *) setup_buf);
bs->sys_size = ALIGN_UP(lsize + ph.c_len, 16) / 16; bs->sys_size = ALIGN_UP(lsize + ph.c_len, 16) / 16;
@@ -348,7 +349,7 @@ void PackBvmlinuzI386::pack(OutputFile *fo)
// prepare filter // prepare filter
Filter ft(ph.level); Filter ft(ph.level);
ft.buf_len = ph.u_len; ft.buf_len = ph.u_len;
ft.addvalue = kernel_entry; ft.addvalue = kernel_entry; // saves 4 bytes in unfilter code
// compress // compress
compressWithFilters(&ft, 512); compressWithFilters(&ft, 512);
@@ -385,7 +386,7 @@ void PackBvmlinuzI386::pack(OutputFile *fo)
patch_le32(loader, e_len, "ULEN", ph.u_len); patch_le32(loader, e_len, "ULEN", ph.u_len);
} }
patch_le32(loader, e_len, "KEIP", kernel_entry); patch_le32(loader, e_len, "KEIP", kernel_entry);
patch_le32(loader, e_len, "STAK", stack_during_uncompression); patch_le32(loader, e_len, "STAK", stack_offset_during_uncompression);
boot_sect_t * const bs = (boot_sect_t *) ((unsigned char *) setup_buf); boot_sect_t * const bs = (boot_sect_t *) ((unsigned char *) setup_buf);
bs->sys_size = (ALIGN_UP(lsize + clen, 16) / 16) & 0xffff; bs->sys_size = (ALIGN_UP(lsize + clen, 16) / 16) & 0xffff;
+46 -21
View File
@@ -66,6 +66,19 @@ static const
# define strcpy(a,b) strcpy((char *)(a),(const char *)(b)) # define strcpy(a,b) strcpy((char *)(a),(const char *)(b))
#endif #endif
#if 1
static unsigned my_strlen(const char *s)
{
size_t l = strlen((const char*)s); assert((unsigned) l == l); return (unsigned) l;
}
static unsigned my_strlen(const unsigned char *s)
{
size_t l = strlen((const char*)s); assert((unsigned) l == l); return (unsigned) l;
}
#undef strlen
#define strlen my_strlen
#endif
// Unicode string compare // Unicode string compare
static bool ustrsame(const void *s1, const void *s2) static bool ustrsame(const void *s1, const void *s2)
@@ -728,11 +741,11 @@ unsigned PackW32Pe::processImports() // pass 1
} }
ppi++; ppi++;
unsigned esize = ptr_diff(tarr,idlls[ic]->lookupt); unsigned esize = ptr_diff((char *)tarr, (char *)idlls[ic]->lookupt);
lookups.add(idlls[ic]->lookupt,esize); lookups.add(idlls[ic]->lookupt,esize);
if (ptr_diff(ibuf + idlls[ic]->iat,idlls[ic]->lookupt)) if (ptr_diff(ibuf + idlls[ic]->iat, (char *)idlls[ic]->lookupt))
{ {
memcpy(ibuf + idlls[ic]->iat,idlls[ic]->lookupt,esize); memcpy(ibuf + idlls[ic]->iat, idlls[ic]->lookupt, esize);
iats.add(idlls[ic]->iat,esize); iats.add(idlls[ic]->iat,esize);
} }
names.add(idlls[ic]->name,strlen(idlls[ic]->name) + 1 + 1); names.add(idlls[ic]->name,strlen(idlls[ic]->name) + 1 + 1);
@@ -908,26 +921,26 @@ void Export::convert(unsigned eoffs,unsigned esize)
#endif #endif
} }
void Export::build(char *newbase,unsigned newoffs) void Export::build(char *newbase, unsigned newoffs)
{ {
char *functionp = newbase + sizeof(edir); char * const functionp = newbase + sizeof(edir);
char *namep = functionp + 4 * edir.functions; char * const namep = functionp + 4 * edir.functions;
char *ordinalp = namep + 4 * edir.names; char * const ordinalp = namep + 4 * edir.names;
char *enamep = ordinalp + 2 * edir.names; char * const enamep = ordinalp + 2 * edir.names;
char *exports = enamep + strlen(ename) + 1; char * exports = enamep + strlen(ename) + 1;
edir.addrtable = newoffs + functionp - newbase; edir.addrtable = newoffs + ptr_diff(functionp, newbase);
edir.ordinaltable = newoffs + ordinalp - newbase; edir.ordinaltable = newoffs + ptr_diff(ordinalp, newbase);
memcpy(ordinalp,ordinals,2 * edir.names); memcpy(ordinalp,ordinals,2 * edir.names);
edir.name = newoffs + enamep - newbase; edir.name = newoffs + ptr_diff(enamep, newbase);
strcpy(enamep,ename); strcpy(enamep,ename);
edir.nameptrtable = newoffs + namep - newbase; edir.nameptrtable = newoffs + ptr_diff(namep, newbase);
unsigned ic; unsigned ic;
for (ic = 0; ic < edir.names; ic++) for (ic = 0; ic < edir.names; ic++)
{ {
strcpy(exports,names[ic]); strcpy(exports,names[ic]);
set_le32(namep + 4 * ic,newoffs + exports - newbase); set_le32(namep + 4 * ic,newoffs + ptr_diff(exports, newbase));
exports += strlen(exports) + 1; exports += strlen(exports) + 1;
} }
@@ -936,7 +949,7 @@ void Export::build(char *newbase,unsigned newoffs)
if (names[edir.names + ic]) if (names[edir.names + ic])
{ {
strcpy(exports,names[edir.names + ic]); strcpy(exports,names[edir.names + ic]);
set_le32(functionp + 4 * ic,newoffs + exports - newbase); set_le32(functionp + 4 * ic,newoffs + ptr_diff(exports, newbase));
exports += strlen(exports) + 1; exports += strlen(exports) + 1;
} }
@@ -1589,6 +1602,9 @@ int PackW32Pe::buildLoader(const Filter *ft)
void PackW32Pe::pack(OutputFile *fo) void PackW32Pe::pack(OutputFile *fo)
{ {
if (opt->win32_pe.strip_loadconf < 0)
opt->win32_pe.strip_loadconf = false;
const unsigned objs = ih.objects; const unsigned objs = ih.objects;
isection = new pe_section_t[objs]; isection = new pe_section_t[objs];
fi->seek(pe_offset+sizeof(ih),SEEK_SET); fi->seek(pe_offset+sizeof(ih),SEEK_SET);
@@ -1600,8 +1616,8 @@ void PackW32Pe::pack(OutputFile *fo)
// check the PE header // check the PE header
// FIXME: add more checks // FIXME: add more checks
if (!opt->force if (!opt->force && (
&& (ih.cpu < 0x14c || ih.cpu > 0x150 ih.cpu < 0x14c || ih.cpu > 0x150
|| ih.opthdrsize != 0xE0 || ih.opthdrsize != 0xE0
|| (ih.flags & EXECUTABLE) == 0 || (ih.flags & EXECUTABLE) == 0
|| (ih.subsystem != 2 && ih.subsystem != 3 && ih.subsystem != 1) || (ih.subsystem != 2 && ih.subsystem != 3 && ih.subsystem != 1)
@@ -1609,15 +1625,18 @@ void PackW32Pe::pack(OutputFile *fo)
|| ih.ddirsentries != 16 || ih.ddirsentries != 16
|| IDSIZE(PEDIR_EXCEPTION) // is this used on i386? || IDSIZE(PEDIR_EXCEPTION) // is this used on i386?
// || IDSIZE(PEDIR_COPYRIGHT) // || IDSIZE(PEDIR_COPYRIGHT)
|| IDSIZE(PEDIR_LOADCONF)
|| IDSIZE(PEDIR_COMRT)
)) ))
throwCantPack("unexpected value in PE header (try --force)"); throwCantPack("unexpected value in PE header (try --force)");
if (IDSIZE(PEDIR_SEC)) if (IDSIZE(PEDIR_SEC))
throwCantPack("compressing certificate info is not supported"); throwCantPack("compressing certificate info is not supported");
//if (IDSIZE(PEDIR_DELAYIMP)) if (IDSIZE(PEDIR_COMRT))
// throwCantPack("delay load imports are not supported"); throwCantPack(".NET files (win32/net) are not yet supported");
// Structured Exception Handling
if (!opt->win32_pe.strip_loadconf && IDSIZE(PEDIR_LOADCONF))
throwCantPack("Structured Exception Handling present (try --strip-loadconf)");
if (isdll) if (isdll)
opt->win32_pe.strip_relocs = false; opt->win32_pe.strip_relocs = false;
else if (opt->win32_pe.strip_relocs < 0) else if (opt->win32_pe.strip_relocs < 0)
@@ -1892,6 +1911,12 @@ void PackW32Pe::pack(OutputFile *fo)
ODADDR(PEDIR_BOUNDIM) = 0; ODADDR(PEDIR_BOUNDIM) = 0;
ODSIZE(PEDIR_BOUNDIM) = 0; ODSIZE(PEDIR_BOUNDIM) = 0;
if (opt->win32_pe.strip_loadconf)
{
ODADDR(PEDIR_LOADCONF) = 0;
ODSIZE(PEDIR_LOADCONF) = 0;
}
// tls is put into section 1 // tls is put into section 1
ic = s1addr + s1size - sotls; ic = s1addr + s1size - sotls;
+6 -6
View File
@@ -166,7 +166,7 @@ void PackWcle::encodeEntryTable()
//if (Opt_debug) printf("%d entries encoded.\n",n); //if (Opt_debug) printf("%d entries encoded.\n",n);
UNUSED(n); UNUSED(n);
soentries = p - ientries + 1; soentries = ptr_diff(p, ientries) + 1;
oentries = ientries; oentries = ientries;
ientries = NULL; ientries = NULL;
} }
@@ -402,7 +402,7 @@ void PackWcle::preprocessFixups()
set_le32(fix,0xFFFFFFFFUL); set_le32(fix,0xFFFFFFFFUL);
fix += 4; fix += 4;
sofixups = fix - ifixups; sofixups = ptr_diff(fix, ifixups);
} }
@@ -590,7 +590,7 @@ void PackWcle::decodeFixups()
while (*selfrel_fixups != 0xC3) while (*selfrel_fixups != 0xC3)
selfrel_fixups += 9; selfrel_fixups += 9;
selfrel_fixups++; selfrel_fixups++;
unsigned selectlen = (selfrel_fixups - selector_fixups)/9; unsigned selectlen = ptr_diff(selfrel_fixups, selector_fixups)/9;
ofixups = new upx_byte[fixupn*9+1000+selectlen*5]; ofixups = new upx_byte[fixupn*9+1000+selectlen*5];
upx_bytep fp = ofixups; upx_bytep fp = ofixups;
@@ -656,11 +656,11 @@ void PackWcle::decodeFixups()
fp += fp[1] ? 9 : 7; fp += fp[1] ? 9 : 7;
jc += 2; jc += 2;
} }
set_le32(ofpage_table+ic,fp-ofixups); set_le32(ofpage_table+ic,ptr_diff(fp,ofixups));
} }
for (ic=0; ic < FIXUP_EXTRA; ic++) for (ic=0; ic < FIXUP_EXTRA; ic++)
*fp++ = 0; *fp++ = 0;
sofixups = fp-ofixups; sofixups = ptr_diff(fp, ofixups);
} }
@@ -748,7 +748,7 @@ void PackWcle::decodeEntryTable()
//if (Opt_debug) printf("\n%d entries decoded.\n",n); //if (Opt_debug) printf("\n%d entries decoded.\n",n);
soentries = p - ientries + 1; soentries = ptr_diff(p, ientries) + 1;
oentries = ientries; oentries = ientries;
ientries = NULL; ientries = NULL;
} }
+5 -5
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2004 Laszlo Molnar Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -977,12 +977,12 @@ char const *Packer::getIdentstr(unsigned *size, int small)
"\n\0" "\n\0"
"$Id: UPX " "$Id: UPX "
UPX_VERSION_STRING4 UPX_VERSION_STRING4
" Copyright (C) 1996-2004 the UPX Team. All Rights Reserved. $" " Copyright (C) 1996-2005 the UPX Team. All Rights Reserved. $"
"\n"; "\n";
static const char identsmall[] = static const char identsmall[] =
"\n" "\n"
"$Id: UPX " "$Id: UPX "
"(C) 1996-2004 the UPX Team. All Rights Reserved. http://upx.sf.net $" "(C) 1996-2005 the UPX Team. All Rights Reserved. http://upx.sf.net $"
"\n"; "\n";
static const char identtiny[] = UPX_VERSION_STRING4; static const char identtiny[] = UPX_VERSION_STRING4;
@@ -1030,8 +1030,8 @@ void __acc_cdecl_va Packer::addLoader(const char *s, ...)
const char *p; const char *p;
va_list ap; va_list ap;
linker->addSection(s);
va_start(ap, s); va_start(ap, s);
linker->addSection(s);
while((p = va_arg(ap, const char *)) != NULL) while((p = va_arg(ap, const char *)) != NULL)
linker->addSection(p); linker->addSection(p);
va_end(ap); va_end(ap);
+1
View File
@@ -373,6 +373,7 @@ bool Packer::patchFilter32(void *loader, int lsize, const Filter *ft)
if (ft->id < 0x80) { if (ft->id < 0x80) {
if (0x40 <= ft->id && ft->id < 0x50 if (0x40 <= ft->id && ft->id < 0x50
&& ( UPX_F_LINUX_i386 ==ph.format && ( UPX_F_LINUX_i386 ==ph.format
|| UPX_F_VMLINUX_i386 ==ph.format
|| UPX_F_VMLINUZ_i386 ==ph.format || UPX_F_VMLINUZ_i386 ==ph.format
|| UPX_F_BVMLINUZ_i386==ph.format ) ) { || UPX_F_BVMLINUZ_i386==ph.format ) ) {
// "push byte '?'" // "push byte '?'"
+4
View File
@@ -49,6 +49,7 @@
#include "p_w16ne.h" #include "p_w16ne.h"
#include "p_w32pe.h" #include "p_w32pe.h"
#include "p_vmlinz.h" #include "p_vmlinz.h"
#include "p_vmlinx.h"
#include "p_ps1.h" #include "p_ps1.h"
@@ -182,6 +183,8 @@ static Packer* try_packers(InputFile *f, try_function func)
// //
// linux kernel // linux kernel
// //
if ((p = func(new PackVmlinuxI386(f),f)) != NULL)
return p;
if ((p = func(new PackVmlinuzI386(f),f)) != NULL) if ((p = func(new PackVmlinuzI386(f),f)) != NULL)
return p; return p;
if ((p = func(new PackBvmlinuzI386(f),f)) != NULL) if ((p = func(new PackBvmlinuzI386(f),f)) != NULL)
@@ -224,6 +227,7 @@ static Packer* try_packers(InputFile *f, try_function func)
return p; return p;
if ((p = func(new PackCom(f),f)) != NULL) if ((p = func(new PackCom(f),f)) != NULL)
return p; return p;
return NULL; return NULL;
} }
-2
View File
@@ -31,8 +31,6 @@
#ifdef __cplusplus #ifdef __cplusplus
#include "acc/acc_cxx.h"
#define NOTHROW ACC_CXX_NOTHROW #define NOTHROW ACC_CXX_NOTHROW
#define DISABLE_NEW_DELETE ACC_CXX_DISABLE_NEW_DELETE #define DISABLE_NEW_DELETE ACC_CXX_DISABLE_NEW_DELETE
+1
View File
@@ -24,6 +24,7 @@ l_t_n2ds.h
l_t_n2e.h l_t_n2e.h
l_t_n2es.h l_t_n2es.h
l_tmt.h l_tmt.h
l_vmlinx.h
l_vmlinz.h l_vmlinz.h
l_w32pe.h l_w32pe.h
l_wcle.h l_wcle.h
+31 -15
View File
@@ -7,7 +7,7 @@
ifeq ($(strip $(UCLDIR)),) ifeq ($(strip $(UCLDIR)),)
# change this to reflect where the UCL library is # change this to reflect where the UCL library is
UCLDIR = $(HOME)/local/src/ucl-1.02 UCLDIR = $(HOME)/local/src/ucl-1.03
endif endif
@@ -35,7 +35,7 @@ STUBS = \
l_lx_exec86.h fold_exec86.h \ l_lx_exec86.h fold_exec86.h \
l_lx_elf86.h fold_elf86.h \ l_lx_elf86.h fold_elf86.h \
l_lx_sh86.h fold_sh86.h \ l_lx_sh86.h fold_sh86.h \
l_vmlinz.h l_vmlinz.h l_vmlinx.h
# experimental: # experimental:
ifneq ($(strip $(wildcard $(srcdir)/l_ext2.asm)),) ifneq ($(strip $(wildcard $(srcdir)/l_ext2.asm)),)
@@ -73,6 +73,7 @@ NASM += -I$(srcdir)/
APP_I386 = perl -w $(srcdir)/scripts/app_i386.pl APP_I386 = perl -w $(srcdir)/scripts/app_i386.pl
BIN2H = perl -w $(srcdir)/scripts/bin2h.pl BIN2H = perl -w $(srcdir)/scripts/bin2h.pl
##BIN2H = python $(srcdir)/scripts/bin2h.py
BRANDELF = perl -w $(srcdir)/scripts/brandelf.pl BRANDELF = perl -w $(srcdir)/scripts/brandelf.pl
O2BIN = perl -w $(srcdir)/scripts/o2bin.pl O2BIN = perl -w $(srcdir)/scripts/o2bin.pl
##STRIPELF = perl -w $(srcdir)/scripts/stripelf.pl ##STRIPELF = perl -w $(srcdir)/scripts/stripelf.pl
@@ -87,27 +88,29 @@ LD_LINUX_I386 = ld-2.13.2
LD_LINUX_I386 = ld LD_LINUX_I386 = ld
OBJCOPY_LINUX_I386 = objcopy OBJCOPY_LINUX_I386 = objcopy
# gcc 2.7.2.3 (fold_*.bin: 1718 / 1011 / 1340) # gcc 2.7.2.3 (fold_*.bin: 1839 / 1011 / 1390)
CC_LINUX_I386_GCC272 = gcc-2.72 -m386 -O2 -MMD CC_LINUX_I386_GCC272 = gcc-2.72 -m386 -O2 -MMD
CC_LINUX_I386_GCC272 += -malign-functions=0 -malign-jumps=0 -malign-loops=0 CC_LINUX_I386_GCC272 += -malign-functions=0 -malign-jumps=0 -malign-loops=0
# gcc 2.95.3 (fold_*.bin: 1618 / 995 / 1305) # gcc 2.95.3 (fold_*.bin: 1721 / 995 / 1321)
CC_LINUX_I386_GCC295 = gcc-2.95 -march=i386 -mcpu=k6 -fno-exceptions -MMD CC_LINUX_I386_GCC295 = gcc-2.95.3 -march=i386 -mcpu=k6 -fno-exceptions -MMD
CC_LINUX_I386_GCC295 += -Os -fno-omit-frame-pointer CC_LINUX_I386_GCC295 += -Os -fno-omit-frame-pointer
CC_LINUX_I386_GCC295 += -malign-functions=0 -malign-jumps=0 -malign-loops=0 CC_LINUX_I386_GCC295 += -malign-functions=0 -malign-jumps=0 -malign-loops=0
CC_LINUX_I386_GCC295 += -Werror CC_LINUX_I386_GCC295 += -Werror
# gcc 3.4.0 (fold_*.bin: 1482 / 931 / 1173) # gcc 3.4.3 (fold_*.bin: 1624 / 931 / 1207)
CC_LINUX_I386_GCC340 = gcc-3.4 -march=i386 -mtune=k6 -fno-exceptions -MMD CC_LINUX_I386_GCC34 = gcc-3.4.3
CC_LINUX_I386_GCC340 += -Os -fno-omit-frame-pointer CC_LINUX_I386_GCC34 += -m32 -march=i386 -mtune=k6 -fno-exceptions -MMD
CC_LINUX_I386_GCC340 += -momit-leaf-frame-pointer CC_LINUX_I386_GCC34 += -Os -fno-omit-frame-pointer
CC_LINUX_I386_GCC340 += -fno-align-functions -fno-align-jumps -fno-align-labels -fno-align-loops CC_LINUX_I386_GCC34 += -momit-leaf-frame-pointer
##CC_LINUX_I386_GCC340 += -fweb CC_LINUX_I386_GCC34 += -fno-align-functions -fno-align-jumps -fno-align-labels -fno-align-loops
CC_LINUX_I386_GCC340 += -Werror CC_LINUX_I386_GCC34 += -mpreferred-stack-boundary=2
CC_LINUX_I386_GCC34 += -fweb
CC_LINUX_I386_GCC34 += -Werror
CC_LINUX_I386 = $(CC_LINUX_I386_GCC272) CC_LINUX_I386 = $(CC_LINUX_I386_GCC272)
CC_LINUX_I386 = $(CC_LINUX_I386_GCC295) CC_LINUX_I386 = $(CC_LINUX_I386_GCC295)
CC_LINUX_I386 = $(CC_LINUX_I386_GCC340) CC_LINUX_I386 = $(CC_LINUX_I386_GCC34)
CC_LINUX_I386 += -nostdinc CC_LINUX_I386 += -nostdinc
CC_LINUX_I386 += -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings CC_LINUX_I386 += -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings
CC_LINUX_I386 += -funsigned-char CC_LINUX_I386 += -funsigned-char
@@ -117,7 +120,7 @@ CC_LINUX_I386 += -funsigned-char
### MIPS R3000 ### MIPS R3000
### ###
CPP_MR3K = gcc-2.72 -nostdinc -I$(UCL_UPX) -I$(srcdir) -E -x assembler-with-cpp -Wall -Wp,-P,-C,-traditional CPP_MR3K = gcc-2.95.3 -nostdinc -I$(UCL_UPX) -I$(srcdir) -E -x assembler-with-cpp -Wall -Wp,-P,-C,-traditional
APP_MR3K = perl -w $(srcdir)/scripts/app_mr3k.pl APP_MR3K = perl -w $(srcdir)/scripts/app_mr3k.pl
ASM_MR3K = asm5900 --nologo -q ASM_MR3K = asm5900 --nologo -q
@@ -126,7 +129,7 @@ ASM_MR3K = asm5900 --nologo -q
### Motorola 68000 ### Motorola 68000
### ###
CPP_M68K = gcc-2.72 -nostdinc -I$(UCL_UPX) -I$(srcdir) -E -x assembler-with-cpp -Wall -Wp,-P,-C,-traditional CPP_M68K = $(CPP_MR3K)
APP_M68K = perl -w $(srcdir)/scripts/app_m68k.pl APP_M68K = perl -w $(srcdir)/scripts/app_m68k.pl
ifeq (1,1) ifeq (1,1)
# a68k 68000-assembler # a68k 68000-assembler
@@ -221,6 +224,10 @@ l_vmlinz.h: l_vmlinz.asx
$(NASM) -f bin -o $T.bin $< $(NASM) -f bin -o $T.bin $<
$(BIN2H) $T.bin nrv_loader $@ $(BIN2H) $T.bin nrv_loader $@
l_vmlinx.h: l_vmlinx.asx
$(NASM) -f bin -o $T.bin $<
$(BIN2H) $T.bin nrv_loader $@
l_vxd.h: l_vxd.asx l_vxd.h: l_vxd.asx
$(NASM) -f bin -o $T.bin $< $(NASM) -f bin -o $T.bin $<
$(BIN2H) $T.bin nrv_loader $@ $(BIN2H) $T.bin nrv_loader $@
@@ -298,6 +305,7 @@ l_ps1c.h: l_ps1.asm
upx_itoa.o: upx_itoa.asm upx_itoa.o: upx_itoa.asm
$(NASM) -f elf -o $@ $< $(NASM) -f elf -o $@ $<
$(OBJCOPY_LINUX_I386) -R .comment -R .note $@
l_lx_elf86.h: l_lx_elf86.asx l_lx_elf86.h: l_lx_elf86.asx
$(NASM) -f bin -o $T.bin $< $(NASM) -f bin -o $T.bin $<
@@ -313,18 +321,23 @@ l_lx_sh86.h: l_lx_sh86.asx
l_lx_elf.o: l_lx_elf.c linux.hh l_lx_elf.o: l_lx_elf.c linux.hh
$(CC_LINUX_I386) -c $< $(CC_LINUX_I386) -c $<
$(OBJCOPY_LINUX_I386) -R .comment -R .note $@
l_lx_exec.o: l_lx_exec.c linux.hh l_lx_exec.o: l_lx_exec.c linux.hh
$(CC_LINUX_I386) -c $< $(CC_LINUX_I386) -c $<
$(OBJCOPY_LINUX_I386) -R .comment -R .note $@
l_lx_sep.o: l_lx_sep.c linux.hh l_lx_sep.o: l_lx_sep.c linux.hh
$(CC_LINUX_I386) -c $< $(CC_LINUX_I386) -c $<
$(OBJCOPY_LINUX_I386) -R .comment -R .note $@
l_lx_sh.o: l_lx_sh.c linux.hh l_lx_sh.o: l_lx_sh.c linux.hh
$(CC_LINUX_I386) -c $< $(CC_LINUX_I386) -c $<
$(OBJCOPY_LINUX_I386) -R .comment -R .note $@
fold_elf86.o: fold_elf86.asm fold_elf86.o: fold_elf86.asm
$(NASM) -f elf -o $@ $< $(NASM) -f elf -o $@ $<
$(OBJCOPY_LINUX_I386) -R .comment -R .note $@
fold_elf86.h: l_lx_elf.o fold_elf86.o l_lx_elf86.lds fold_elf86.h: l_lx_elf.o fold_elf86.o l_lx_elf86.lds
$(LD_LINUX_I386) -T $(srcdir)/l_lx_elf86.lds -Map $T.map -o $T.bin $T.o l_lx_elf.o $(LD_LINUX_I386) -T $(srcdir)/l_lx_elf86.lds -Map $T.map -o $T.bin $T.o l_lx_elf.o
@@ -336,6 +349,7 @@ fold_elf86.h: l_lx_elf.o fold_elf86.o l_lx_elf86.lds
fold_exec86.o: fold_exec86.asm fold_exec86.o: fold_exec86.asm
$(NASM) -f elf -o $@ $< $(NASM) -f elf -o $@ $<
$(OBJCOPY_LINUX_I386) -R .comment -R .note $@
fold_exec86.h: l_lx_exec.o upx_itoa.o fold_exec86.o l_lx_exec86.lds fold_exec86.h: l_lx_exec.o upx_itoa.o fold_exec86.o l_lx_exec86.lds
$(LD_LINUX_I386) -T $(srcdir)/l_lx_exec86.lds -Map $T.map -o $T.bin $T.o l_lx_exec.o upx_itoa.o $(LD_LINUX_I386) -T $(srcdir)/l_lx_exec86.lds -Map $T.map -o $T.bin $T.o l_lx_exec.o upx_itoa.o
@@ -347,6 +361,7 @@ fold_exec86.h: l_lx_exec.o upx_itoa.o fold_exec86.o l_lx_exec86.lds
fold_sh86.o: fold_sh86.asm fold_sh86.o: fold_sh86.asm
$(NASM) -f elf -o $@ $< $(NASM) -f elf -o $@ $<
$(OBJCOPY_LINUX_I386) -R .comment -R .note $@
fold_sh86.h: l_lx_sh.o fold_sh86.o l_lx_sh86.lds fold_sh86.h: l_lx_sh.o fold_sh86.o l_lx_sh86.lds
$(LD_LINUX_I386) -T $(srcdir)/l_lx_sh86.lds -Map $T.map -o $T.bin $T.o l_lx_sh.o $(LD_LINUX_I386) -T $(srcdir)/l_lx_sh86.lds -Map $T.map -o $T.bin $T.o l_lx_sh.o
@@ -398,6 +413,7 @@ l_t_n2e.h: n2e_d.ash bits.ash $(DEPS1) ../version.h
l_t_n2es.h: n2e_d.ash bits.ash $(DEPS1) ../version.h l_t_n2es.h: n2e_d.ash bits.ash $(DEPS1) ../version.h
l_tmt.h: $(DEPS2) $(DEPS3) l_tmt.h: $(DEPS2) $(DEPS3)
l_vmlinz.h: $(DEPS2) $(DEPS3) l_vmlinz.h: $(DEPS2) $(DEPS3)
l_vmlinx.h: $(DEPS2) $(DEPS3)
l_vxd.h: $(DEPS2) $(DEPS3) l_vxd.h: $(DEPS2) $(DEPS3)
l_wcle.h: $(DEPS2) $(DEPS3) l_wcle.h: $(DEPS2) $(DEPS3)
l_w32pe.h: $(DEPS2) $(DEPS3) l_w32pe.h: $(DEPS2) $(DEPS3)
+253
View File
@@ -0,0 +1,253 @@
; cl1_d32.ash -- cl1_decompress_le32 in 32-bit assembly
; schema from ucl/nrv2b_d32.ash
;
; Copyright (C) 2004 John Reiser
; Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
; All Rights Reserved.
;
; This file is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License as
; published by the Free Software Foundation; either version 2 of
; the License, or (at your option) any later version.
;
; This file is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with the UCL library; see the file COPYING.
; If not, write to the Free Software Foundation, Inc.,
; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;
; Markus F.X.J. Oberhumer John Reiser
; <markus@oberhumer.com> <jreiser@BitWagon.com>
;
; ------------- DECOMPRESSION -------------
; Input:
; esi - source
; edi - dest
; ebp - -1
; cld
; Output:
; eax - 0
; ecx - 0
%ifndef jmps
%define jmps jmp short
%endif
%ifndef jmpn
%define jmpn jmp near
%endif
;; One of these two is instantiated many times by buildLoader
%ifdef __CL1SMA1B__
call edx
%else; __CL1FAS1B__
add ebx, ebx
db 0x75,2 ;jnz cl1_no_reload
call edx
;cl1_no_reload:
%endif; __CL1GET1B__
; __CL1ENTER__
nop ; 'int3' for debugging
call start_cl1 ; pic push address of next instr
; __CL1SMA10__
getbit_cl1: ; appears only in small version
add ebx, ebx
jz reload_cl1
ret
; __CL1RLOAD__
reload_cl1: ; for both small and fast version
mov ebx, [esi]
sub esi, byte -4
adc ebx, ebx
ret
; __CL1WID01__
widelit_cl1:
sub ecx,ecx ; back to 0
; getbit
; __CL1WID02__
adc ecx,ecx
; getbit
; __CL1WID03__
jc lit89_cl1
; getbit
; __CL1WID04__
adc ecx,ecx
; getbit
; __CL1WID05__
jc lit10_12_cl1
; getbit
; __CL1WID06__
adc ecx,ecx ; 0..7; -1+ (width/2) of length
litwidth_cl1: ; ss22 algorithm, counted width<=8 pairs; returns eax= 2..0x15555
; getbit
; __CL1WID07__
adc eax,eax
dec eax
; getbit
; __CL1WID08__
adc eax,eax
sub ecx, byte 1
jnc litwidth_cl1
lea ecx,[17 -2 + eax] ; 17: predecessors; ss22 returns 2..
cmp eax,0xffff-(17 -2)
jb litgo_cl1 ; not maximal range of search
lea eax,[esi + ecx] ; esi after copy
push eax ; "parameter" to maxlit_cl1
jmpn maxlit_cl1 ; can have another literal afterwards
lit13_16_cl1:
; getbit
; __CL1WID09__
adc ecx,ecx
; getbit
; __CL1WID10__
adc ecx,ecx
add ecx, byte 13
jmps litmov_cl1
lit10_12_cl1:
test ecx,ecx
jz lit13_16_cl1
inc ecx ; 2,3,4
lit89_cl1:
add ecx, byte 8
litgo_cl1:
jmps litmov_cl1
; __CL1START__
start_cl1:
sub ecx,ecx ; 0
pop edx ; edx= getbit_cl1 or reload_cl1
sub ebx, ebx ; cause reload on first bit
; __CL1TOP00__
top_cl1: ; In: 0==ecx
lea eax,[1+ ecx] ; 1: the msb of offset or large width
; getbit
; __CL1TOP01__
jnc match_cl1
; getbit
; __CL1TOP02__
jc lit1_cl1
; getbit
; __CL1TOP03__
jc lit2_cl1
; getbit
; __CL1TOP04__
jc lit3_cl1
add ecx, byte 2
; getbit
; __CL1TOP05__
jc lit45_cl1
inc ecx
; getbit
; __CL1TOP06__
jc lit67_cl1
jmpn widelit_cl1
lit67_cl1:
lit45_cl1:
; getbit
; __CL1TOP07__
adc ecx,ecx
litmov_cl1:
db 0xD1,((3<<6)|(5<<3)|1) ;shr ecx,1
jnc litmovb_cl1
movsb
litmovb_cl1:
db 0xD1,((3<<6)|(5<<3)|1) ;shr ecx,1
jnc litmovw_cl1
movsw
litmovw_cl1:
rep
movsd
lea eax,[1+ ecx] ; 1: the msb
jmps litdone_cl1
lit3_cl1:
movsb
lit2_cl1:
movsb
lit1_cl1:
movsb
litdone_cl1:
match_cl1: ; In: 0==ecx; 1==eax
offset_cl1: ; ss11 algorithm
; getbit
; __CL1OFF01__
adc eax,eax
; getbit
; __CL1OFF02__
jnc offset_cl1
sub eax, byte 3 ; 2.. ==> -1[prev], (0,,<<8)|byte
jc prev_off_cl1
shl eax,8
lodsb
xor eax, byte ~0
jz done_cl1 ; EOF
mov ebp,eax ; -offset
prev_off_cl1: ; 1st 2 bits encode (5<=len),2,3,4
; getbit
; __CL1OFF03__
adc ecx,ecx
; getbit
; __CL1OFF04__
adc ecx,ecx
jnz wrinkle_cl1
; __CL1LEN00__
inc ecx ; 1: the msb
mlen_cl1:
; getbit
; __CL1LEN01__
adc ecx,ecx
; getbit
; __CL1LEN02__
jnc mlen_cl1
add ecx, byte 2 ; 2.. ==> 4..
; __CL1COPY0__
wrinkle_cl1:
cmp ebp,-0xd00
adc ecx, byte 1
copy_cl1:
push esi
lea esi,[edi + ebp]
cmp ebp, byte -4
ja ripple_cl1
maxlit_cl1: ; literal copy cannot overlap; omit test for ripple
db 0xD1,((3<<6)|(5<<3)|1) ;shr ecx,1
jnc maxlitb_cl1
movsb
maxlitb_cl1:
db 0xD1,((3<<6)|(5<<3)|1) ;shr ecx,1
jnc maxlitw_cl1
movsw
maxlitw_cl1:
rep
movsd
popbot_cl1:
pop esi
bottom_cl1:
jmpn top_cl1
ripple_cl1:
cmp ebp, byte -1
jne ripmov_cl1
lodsb
rep
stosb
jmps popbot_cl1
ripmov_cl1:
rep
movsb
jmps popbot_cl1
done_cl1:
; __CL1END__
; vi:ts=8:et
+135
View File
@@ -0,0 +1,135 @@
/* fold_elf86.h -- created from fold_elf86.bin, 1624 (0x658) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define LINUX_I386ELF_FOLD_ADLER32 0x9b9ac310
#define LINUX_I386ELF_FOLD_CRC32 0xc9a476f9
unsigned char linux_i386elf_fold[1624] = {
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
2, 0, 3, 0, 1, 0, 0, 0,128, 16, 0, 1, 52, 0, 0, 0, /* 0x 10 */
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, /* 0x 30 */
0, 16, 0, 1, 88, 6, 0, 0, 88, 6, 0, 0, 5, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 1, 0, 0, 0, 88, 6, 0, 0, 88, 22, 0, 1, /* 0x 50 */
88, 22, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, /* 0x 60 */
0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */
88, 88, 41,201,186,120, 2, 0, 0,137,230,137,231,232, 94, 0, /* 0x 80 */
0, 0,137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117, /* 0x 90 */
243,137,231,232, 72, 0, 0, 0, 83,129,236, 0, 10, 0, 0,141, /* 0x a0 */
131,140, 0, 0, 0,139,115, 24, 41,198,139, 24,137,226,139, 72, /* 0x b0 */
4,131,193, 12, 96, 71,232,149, 4, 0, 0,129,196, 32, 10, 0, /* 0x c0 */
0, 91, 80, 79, 41,192, 60,175,175,117,252, 80, 80, 80, 80, 80, /* 0x d0 */
80, 80, 80, 80, 89,176, 91,181, 16, 3, 75, 72,183, 0,255, 39, /* 0x e0 */
173,171,133,192,117,250,173,171,133,192,117,250, 87,173,171,131, /* 0x f0 */
248, 32,115, 3, 15,179,194,133,192,173,171,117,240,131,239, 8, /* 0x 100 */
1,201, 64,243,171, 72,171,171, 95,195, 0, 0, 85, 87,137,207, /* 0x 110 */
86,137,198, 83, 57, 8,139,104, 4,115, 8,106,127, 91,106, 1, /* 0x 120 */
88,205,128,133,255,116, 11,137,249,138, 69, 0, 69,136, 2, 66, /* 0x 130 */
226,247, 91, 1,126, 4, 41, 62, 94, 95, 93,195, 83,141, 92, 36, /* 0x 140 */
8,106, 90, 88,205,128, 91,195, 85,137,229, 87, 86,137,199, 83, /* 0x 150 */
137,214,131,236, 24,139, 69, 8,131, 58, 0,137, 69,220, 15,132, /* 0x 160 */
189, 0, 0, 0,141, 85,228,137,248,185, 12, 0, 0, 0,232,153, /* 0x 170 */
255,255,255,131,125,228, 0,139, 69,232,117, 18, 61, 85, 80, 88, /* 0x 180 */
33,117, 15,131, 63, 0, 15,132,149, 0, 0, 0,235, 4,133,192, /* 0x 190 */
117, 8,106,127, 91,106, 1, 88,205,128,139, 77,232,139, 69,228, /* 0x 1a0 */
57,193,119,238, 59, 6,119,234, 57,193,115, 88, 15,182, 69,236, /* 0x 1b0 */
80,141, 69,224, 80,255,118, 4, 81,255,119, 4,255, 85,220,131, /* 0x 1c0 */
196, 20,133,192,117,204,139, 85,224, 59, 85,228,117,196,138, 69, /* 0x 1d0 */
237,132,192,116, 37,131,125, 12, 0,116, 31,129,250, 0, 2, 0, /* 0x 1e0 */
0,119, 4, 57, 22,117, 19, 15,182,192, 80, 15,182, 69,238, 80, /* 0x 1f0 */
82,255,118, 4,255, 85, 12,131,196, 16,139, 69,232, 1, 71, 4, /* 0x 200 */
41, 7,235, 10,139, 86, 4,137,248,232,254,254,255,255,139, 85, /* 0x 210 */
228,139, 6, 1, 86, 4, 41,208,133,192,137, 6,233, 61,255,255, /* 0x 220 */
255,141,101,244, 91, 94, 95,201,195,133,210,137,209,116, 6,198, /* 0x 230 */
0, 0, 64,226,250,195,133,192, 83,137,211,116, 29,168, 1,117, /* 0x 240 */
25,139, 16, 57,218,116, 7, 74,117, 11,133,219,116, 7,137, 24, /* 0x 250 */
137, 72, 4,235, 5,131,192, 8,235,231, 91,195, 85,137,229, 87, /* 0x 260 */
86, 83,131,236, 72,137, 85,224,139, 77,224,137, 69,228,139, 93, /* 0x 270 */
224,199, 69,208, 0, 0, 0, 0, 3, 73, 28,139, 69, 8,139, 85, /* 0x 280 */
12,137, 69,220, 49,192,102,131,123, 16, 3,137, 85,216,137, 77, /* 0x 290 */
212,137,202, 15,183, 75, 44, 15,149,192,131,206,255,193,224, 4, /* 0x 2a0 */
137,207,131,192, 34, 49,219, 79,137, 69,188,120, 34,131, 58, 1, /* 0x 2b0 */
117, 24,139, 66, 8, 57,240,115, 8,139,122, 16,137,198,137,125, /* 0x 2c0 */
208, 3, 66, 20, 57,195,115, 2,137,195,131,194, 32,226,222,137, /* 0x 2d0 */
247,106, 0,129,231, 0,240,255,255,106, 0, 41,251,255,117,188, /* 0x 2e0 */
129,195,255, 15, 0, 0,106, 7,129,227, 0,240,255,255,139, 85, /* 0x 2f0 */
208, 83,137,240, 37,255, 15, 0, 0, 87,141,180, 2,255, 15, 0, /* 0x 300 */
0,232, 54,254,255,255,137,194,131,196, 24, 1,218,129,230, 0, /* 0x 310 */
240,255,255,137, 85,240,137,194, 41,243, 1,242,137,217,137, 69, /* 0x 320 */
176,137,211,106, 91, 88,205,128,139,117,176,139, 69,224, 41,254, /* 0x 330 */
49,255,102,131,120, 44, 0, 15,132,218, 1, 0, 0,139, 85,212, /* 0x 340 */
139, 2,131,248, 6,117, 23,139, 74, 8,186, 3, 0, 0, 0,139, /* 0x 350 */
69,216, 1,241,232,221,254,255,255,233,165, 1, 0, 0, 72, 15, /* 0x 360 */
133,158, 1, 0, 0,139, 93,212,199, 69,200, 64, 98, 81,115,139, /* 0x 370 */
75, 24,139, 67, 8,131,225, 7,139, 83, 16,193,225, 2,137, 69, /* 0x 380 */
236,211,109,200,137,193, 3, 75, 20,137,195,129,227,255, 15, 0, /* 0x 390 */
0,137, 85,232, 1,218, 41,216,137, 85,196,139, 85,212, 1,240, /* 0x 3a0 */
1,241,137, 69,184,139, 66, 4,131,101,200, 7, 41,216,131,125, /* 0x 3b0 */
220, 1, 80,255,117,228, 25,192,137, 93,192,131,224,224,137, 77, /* 0x 3c0 */
180,131,192, 50,131,125,220, 0, 80,139, 69,196,106, 3,116, 3, /* 0x 3d0 */
131,192, 3, 80,255,117,184,232, 96,253,255,255,131,196, 24, 57, /* 0x 3e0 */
69,184, 15,133,193, 0, 0, 0,131,125,220, 0,116, 34,139, 77, /* 0x 3f0 */
212, 49,192,246, 65, 24, 1,116, 6,139, 69,228,131,192, 2, 80, /* 0x 400 */
139, 69,220,255,117,228,141, 85,232,232, 58,253,255,255, 88, 90, /* 0x 410 */
139, 85,192,139, 69,184,232, 14,254,255,255,139, 93,196,139, 69, /* 0x 420 */
184,247,219, 3, 69,196,129,227,255, 15, 0, 0,137,218,137, 93, /* 0x 430 */
192,232,243,253,255,255,131,125,220, 0,116, 91,139, 69,212,131, /* 0x 440 */
56, 1,117, 83,246, 64, 24, 1,116, 77,139, 93,212,137,194,139, /* 0x 450 */
64, 20, 59, 67, 16,139, 82, 8,141, 12, 16,117, 14,137,200,247, /* 0x 460 */
216, 37,255, 15, 0, 0,131,248, 3,119, 12,139, 69,212,141, 74, /* 0x 470 */
12,131,120, 4, 0,117, 15,139, 1, 61,205,128, 97,195,116, 6, /* 0x 480 */
199, 1,205,128, 97,195,133,201,116, 13,139, 69,216, 49,210,131, /* 0x 490 */
224,254,232,159,253,255,255,139, 93,184,139, 77,196,139, 85,200, /* 0x 4a0 */
106,125, 88,205,128,133,192,116, 8,106,127, 91,106, 1, 88,205, /* 0x 4b0 */
128,139, 69,196, 3, 69,192, 1, 69,184,139, 69,180, 57, 69,184, /* 0x 4c0 */
115, 31,106, 0, 43, 69,184,106, 0,106, 50,255,117,200, 80,255, /* 0x 4d0 */
117,184,232,101,252,255,255,131,196, 24, 57, 69,184,116, 36,235, /* 0x 4e0 */
200,131,125,220, 0,116, 28,131, 69,196, 3,129,101,196,255, 15, /* 0x 4f0 */
0, 0,131,125,196, 3,119, 11,139, 93,184,139, 77,196,106, 91, /* 0x 500 */
88,205,128,139, 85,224, 71,131, 69,212, 32, 15,183, 66, 44, 57, /* 0x 510 */
199, 15,140, 38,254,255,255,131,125,220, 0,117, 17,139, 93,228, /* 0x 520 */
106, 6, 88,205,128,133,192,116, 23,233,123,255,255,255,139,125, /* 0x 530 */
224,102,131,127, 16, 3,116, 8,139, 93,240,106, 45, 88,205,128, /* 0x 540 */
139, 69,224, 3,112, 24,141,101,244, 91,137,240, 94, 95,201,195, /* 0x 550 */
85,137,229, 87, 86, 83, 87, 87,139,125, 20,106, 0,139, 69, 16, /* 0x 560 */
141, 87, 52,139, 93, 8, 80,139,117, 32,137, 69,240,137, 85,236, /* 0x 570 */
141, 69, 32,141, 85, 24,232,205,251,255,255,139, 69, 12,186, 3, /* 0x 580 */
0, 0, 0, 41,117, 36,137, 69, 32,139, 69,236,139, 72, 8,137, /* 0x 590 */
216,131,193, 52,232,157,252,255,255, 15,183, 79, 42,137,216,186, /* 0x 5a0 */
4, 0, 0, 0,232,141,252,255,255, 15,183, 79, 44,137,216,186, /* 0x 5b0 */
5, 0, 0, 0,232,125,252,255,255,139, 79, 24,137,216,186, 9, /* 0x 5c0 */
0, 0, 0,232,110,252,255,255,141, 69, 32, 83,137,250, 80,139, /* 0x 5d0 */
69,240,232,133,252,255,255,102,139, 79, 44,131,196, 16, 49,210, /* 0x 5e0 */
102,133,201,137,195,116, 87,139, 69,236,131, 56, 3,117, 67, 49, /* 0x 5f0 */
201,139, 88, 8,137,202,106, 5, 88,205,128,133,192,137,198,120, /* 0x 600 */
20,102,186, 0, 2,137,195,137,249,106, 3, 88,205,128, 61, 0, /* 0x 610 */
2, 0, 0,116, 10,106,127, 91,106, 1, 88,205,128,235,246,106, /* 0x 620 */
0,137,240,106, 0,137,250,232, 48,252,255,255, 89, 94,137,195, /* 0x 630 */
235, 12, 66, 15,183,193,131, 69,236, 32, 57,194,124,169,141,101, /* 0x 640 */
244,137,216, 91, 94, 95,201,195 /* 0x 650 */
};
+92
View File
@@ -0,0 +1,92 @@
/* fold_exec86.h -- created from fold_exec86.bin, 931 (0x3a3) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define LINUX_I386EXEC_FOLD_ADLER32 0x598e8b17
#define LINUX_I386EXEC_FOLD_CRC32 0xe031336e
unsigned char linux_i386exec_fold[931] = {
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
2, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, /* 0x 10 */
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 1, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16, 64, 0, /* 0x 30 */
0, 16, 64, 0,163, 3, 0, 0,164, 3, 0, 0, 7, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 50 */
88, 88, 88,137,225,141, 84,132, 4,139,115, 24,131,195, 96, 41, /* 0x 60 */
222,141,125, 2, 96,232,197, 0, 0, 0,244, 0, 83,137,195,139, /* 0x 70 */
76, 36, 8,136,208,131,224, 31, 60, 25,118, 3,131,232, 43,131, /* 0x 80 */
192, 65, 75,136, 3,137,208,193,232, 5,137,194,226,229, 91,195, /* 0x 90 */
83,141, 92, 36, 8,106, 90, 88,205,128, 91,195, 85, 49,201,137, /* 0x a0 */
229, 87, 86,137,202, 83,131,236, 32,139, 93, 8,106, 5, 88,205, /* 0x b0 */
128,133,192,137,199,120,108,199, 69,212, 47,112,114,111,199, 69, /* 0x c0 */
216, 99, 47, 0, 0,106, 20, 88,205,128,141, 85,218,141,117,212, /* 0x d0 */
232,155, 2, 0, 0,141, 80, 4,137,243,199, 0, 47,102,100, 47, /* 0x e0 */
137,248,232,137, 2, 0, 0,186, 1, 0, 0, 0,106, 33, 88,106, /* 0x f0 */
5, 89,205,128, 61, 85, 80, 88, 50,117, 33,139, 93, 8,106, 10, /* 0x 100 */
88,205,128,185, 2, 0, 0, 0,137,251,106, 55, 88,205,128,137, /* 0x 110 */
243,139, 77, 12,139, 85, 16,106, 11, 88,205,128,137,251,106, 6, /* 0x 120 */
88,205,128,131,196, 32,137,248, 91, 94, 95,201,194, 12, 0, 85, /* 0x 130 */
137,229, 87, 86, 83,131,236,112,141,125,228,139, 77, 24,139, 69, /* 0x 140 */
16,139, 85, 12,137,203,129,227, 0,240,255,255,137, 69,156,137, /* 0x 150 */
85,148,137,206,137, 77,152,137, 93,144,165,165,165,131,109,148, /* 0x 160 */
12,129,125,228, 85, 80, 88, 51,137,117,152, 15,133, 95, 1, 0, /* 0x 170 */
0,199, 69,196, 47,116,109,112,199, 69,200, 47,117,112,120,141, /* 0x 180 */
77,215,106, 20, 88,205,128,137,194,106, 4,137,200,141,117,211, /* 0x 190 */
232,215,254,255,255,141, 93,172,137,199,198, 69,215, 0, 51,125, /* 0x 1a0 */
228, 49,201,106, 78, 88,205,128, 51,125,172,139, 85,176,137,240, /* 0x 1b0 */
199, 4, 36, 7, 0, 0, 0,193,226, 12,141, 93,196, 49,250,232, /* 0x 1c0 */
168,254,255,255, 88,106, 10, 88,205,128,131,248,254,116, 8,133, /* 0x 1d0 */
192, 15,133,249, 0, 0, 0,185,194, 0, 0, 0,186,192, 1, 0, /* 0x 1e0 */
0,141, 93,196,106, 5, 88,205,128,137, 69,136,139, 77,232,137, /* 0x 1f0 */
195,106, 93, 88,205,128,133,192, 15,133,202, 0, 0, 0,106, 0, /* 0x 200 */
83,106, 1,106, 3, 81,106, 0,232,131,254,255,255,131,196, 24, /* 0x 210 */
61, 0,240,255,255,137, 69,132, 15,135,170, 0, 0, 0,139, 69, /* 0x 220 */
232,106, 0,106, 0, 5,255, 15, 0, 0,106, 50, 37, 0,240,255, /* 0x 230 */
255,106, 3, 3, 69,132,104, 0, 16, 0, 0, 80,232, 79,254,255, /* 0x 240 */
255,131,196, 24,141,125,180,139,117,152,165,165,165,139, 77,180, /* 0x 250 */
131,109,148, 12,133,201,137,117,152,139, 85,184,117, 20,129,250, /* 0x 260 */
85, 80, 88, 33,117, 98,131,125,232, 0, 15,132,136, 0, 0, 0, /* 0x 270 */
235, 86, 57,202,119, 82, 59, 85,236,119, 77, 57,202,115, 31,141, /* 0x 280 */
69,168, 80,255,117,132, 82,255,117,152,255, 85,156,131,196, 16, /* 0x 290 */
133,192,117, 52,139, 69,180, 57, 69,168,117, 44,235, 8,139,125, /* 0x 2a0 */
132,139,117,152,243,164,139, 77,180,139, 93,132,106, 91, 88,205, /* 0x 2b0 */
128,139, 69,184, 1,203, 41, 69,148, 41, 77,232, 1, 69,152,131, /* 0x 2c0 */
125,148, 0,137, 93,132,121, 18,141, 93,196,106, 10, 88,205,128, /* 0x 2d0 */
106,127, 91,106, 1, 88,205,128,235,246,139, 77,152,139, 93,144, /* 0x 2e0 */
129,225, 0,240,255,255, 43, 77,144,106, 91, 88,205,128, 1,203, /* 0x 2f0 */
137, 93,144,233, 76,255,255,255,139, 93,136,106, 6, 88,205,128, /* 0x 300 */
133,192,117,196,255,117, 28,255,117, 32,141,117,196, 86,232,137, /* 0x 310 */
253,255,255,133,192,120,177,106, 2, 88,205,128,133,192,117, 49, /* 0x 320 */
106, 2, 88,205,128,133,192,137,193,117, 31,199, 69,160, 85, 80, /* 0x 330 */
88, 52,184,162, 0, 0, 0,141, 93,160,199, 69,164, 0, 0, 0, /* 0x 340 */
0,205,128,137,243,106, 10, 88,205,128, 49,219,106, 1, 88,205, /* 0x 350 */
128, 49,201,131,203,255,137,202,106, 7, 88,205,128,141, 93,196, /* 0x 360 */
139, 77, 32,139, 85, 28,106, 11, 88,205,128,233, 88,255,255,255, /* 0x 370 */
87,137,215,106, 10,252, 89,232, 5, 0, 0, 0,136, 39,151, 95, /* 0x 380 */
195,153,247,241, 82,133,192,116, 5,232,243,255,255,255, 88, 4, /* 0x 390 */
48,170,195 /* 0x 3a0 */
};
+109
View File
@@ -0,0 +1,109 @@
/* fold_sh86.h -- created from fold_sh86.bin, 1207 (0x4b7) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define LINUX_I386SH_FOLD_ADLER32 0x3bb5f6de
#define LINUX_I386SH_FOLD_CRC32 0x513b2cd1
unsigned char linux_i386sh_fold[1207] = {
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
2, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, /* 0x 10 */
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 1, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 1, /* 0x 30 */
0, 0, 64, 1,183, 4, 0, 0,184, 4, 0, 0, 7, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 50 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 60 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */
88, 88,137,230,129,236,224, 0, 0, 0,137,231,173,171,133,192, /* 0x 80 */
117,250,173,171,133,192,117,250, 87, 64,106, 54, 89,243,171, 72, /* 0x 90 */
171,171, 95,173,133,192,145,173,116, 10,137, 76,207,248,137, 68, /* 0x a0 */
207,252,235,239,129,236, 0, 10, 0, 0,147,141, 82, 24,139, 10, /* 0x b0 */
139, 90, 4,137,198, 96,232,120, 2, 0, 0, 89, 80, 97,129,196, /* 0x c0 */
0, 10, 0, 0, 89, 90, 82, 65, 86,131,238, 3,102,199, 6, 45, /* 0x d0 */
99, 65, 86, 65, 82, 81, 87,141,188, 36, 0,245,255,255, 96,137, /* 0x e0 */
227,137,252,185,192, 2, 0, 0, 49,192,243,171,137,220, 97,195, /* 0x f0 */
85, 87, 86,137,198, 83,139,108, 36, 20, 57, 40,139,120, 4,115, /* 0x 100 */
8,106,127, 91,106, 1, 88,205,128,133,237,116, 10,137,233,138, /* 0x 110 */
7, 71,136, 2, 66,226,248, 91, 1,110, 4, 41, 46, 94, 95, 93, /* 0x 120 */
195, 83,141, 92, 36, 8,106, 90, 88,205,128, 91,195,133,210,137, /* 0x 130 */
209,116, 6,198, 0, 0, 64,226,250,195, 85, 49,201,137,229, 87, /* 0x 140 */
86, 83,137,195,131,236, 44,137, 85,240,139, 69, 8,137,202,137, /* 0x 150 */
69,236,106, 5, 88,205,128,133,192,137, 69,232,121, 8,106,127, /* 0x 160 */
91,106, 1, 88,205,128,186, 0, 2, 0, 0,139, 93,232,139, 77, /* 0x 170 */
240,106, 3, 88,205,128, 61, 0, 2, 0, 0,117,225,139, 69,240, /* 0x 180 */
199, 69,224,255,255,255,255, 3, 73, 28,102,131,120, 16, 3,139, /* 0x 190 */
93,240,137, 77,228,137,202, 15,149,192, 15,183, 75, 44, 15,182, /* 0x 1a0 */
192, 49,246,193,224, 4,131,192, 34,137, 69,204,137,200, 72,120, /* 0x 1b0 */
32,131, 58, 1,117, 22,139, 66, 8, 59, 69,224,115, 3,137, 69, /* 0x 1c0 */
224,139, 90, 20, 1,195, 57,222,115, 2,137,222,131,194, 32,226, /* 0x 1d0 */
224,246, 69,204, 16,116, 7,137,243,106, 45, 88,205,128,139, 93, /* 0x 1e0 */
224,106, 0,106, 0,129,227, 0,240,255,255,255,117,204, 41,222, /* 0x 1f0 */
106, 7,141,134,255, 15, 0, 0, 37, 0,240,255,255, 80, 83,232, /* 0x 200 */
29,255,255,255,131,196, 24,137,198,139, 69,240, 41,222,199, 69, /* 0x 210 */
220, 0, 0, 0, 0,102,131,120, 44, 0, 15,132,247, 0, 0, 0, /* 0x 220 */
139, 85,228,139, 2,131,248, 6,117, 14,139, 66, 8,139, 77,236, /* 0x 230 */
137, 65, 20,233,200, 0, 0, 0, 72, 15,133,193, 0, 0, 0,139, /* 0x 240 */
93,228,199, 69,216, 64, 98, 81,115,139, 75, 24,139, 67, 8,131, /* 0x 250 */
225, 7,193,225, 2,137,194,211,109,216,137,193,129,225,255, 15, /* 0x 260 */
0, 0, 3, 83, 20,137, 77,208, 3, 75, 16, 43, 69,208, 1,242, /* 0x 270 */
131,101,216, 7,137, 77,212,141, 60, 48,139, 67, 4, 43, 69,208, /* 0x 280 */
137, 85,200, 80,255,117,232,106, 18,106, 3, 81, 87,232,143,254, /* 0x 290 */
255,255,131,196, 24, 57,199,117, 54,139, 85,208,137,248,232,138, /* 0x 2a0 */
254,255,255,139, 93,212,139, 85,212,247,219,129,227,255, 15, 0, /* 0x 2b0 */
0,141, 4, 23,137,218,137, 93,208,232,111,254,255,255,137,251, /* 0x 2c0 */
139, 77,212,139, 85,216,106,125, 88,205,128,133,192,116, 8,106, /* 0x 2d0 */
127, 91,106, 1, 88,205,128,139, 69,212, 3, 69,208, 1,199, 59, /* 0x 2e0 */
125,200,115, 28,106, 0,139, 69,200,106, 0,106, 50, 41,248,255, /* 0x 2f0 */
117,216, 80, 87,232, 40,254,255,255,131,196, 24, 57,199,117,207, /* 0x 300 */
139, 85,240,255, 69,220, 15,183, 66, 44,131, 69,228, 32, 57, 69, /* 0x 310 */
220, 15,140, 9,255,255,255,139, 93,232,106, 6, 88,205,128,133, /* 0x 320 */
192,117,172,139, 69,240, 3,112, 24,141,101,244, 91,137,240, 94, /* 0x 330 */
95,201,195, 85,137,229, 87, 86, 83,131,236, 40,141,125, 32,139, /* 0x 340 */
69, 8,141,117, 24,139, 85, 16,137, 69,212,139, 69, 20,137, 85, /* 0x 350 */
208,137, 69,204,139, 69, 36, 5, 85, 80, 88, 50,137, 69,240,139, /* 0x 360 */
69,240, 5, 85, 80, 88, 51,131,125, 32, 0,137, 69,236, 15,132, /* 0x 370 */
136, 0, 0, 0,141, 85,220,137,240,106, 12,232,112,253,255,255, /* 0x 380 */
131,125,220, 0, 88,139, 69,224,117, 14, 61, 85, 80, 88, 33,117, /* 0x 390 */
11,131, 62, 0,116,102,235, 4,133,192,117, 8,106,127, 91,106, /* 0x 3a0 */
1, 88,205,128,139, 77,224,139, 69,220, 57,193,119,238, 59, 7, /* 0x 3b0 */
119,234, 57,193,115, 39,141, 69,216, 80,255,119, 4, 81,255,118, /* 0x 3c0 */
4,255, 85,208,131,196, 16,133,192,117,209,139, 69,220, 57, 69, /* 0x 3d0 */
216,117,201,139, 69,224, 1, 70, 4, 41, 6,235, 12,139, 87, 4, /* 0x 3e0 */
137,240, 81,232, 8,253,255,255, 91,139, 85,220,139, 7, 1, 87, /* 0x 3f0 */
4, 41,208,133,192,137, 7,233,114,255,255,255,139, 69,236,139, /* 0x 400 */
85,204,138, 24,139, 69,236,198, 0, 0,255,117,212,139, 69,240, /* 0x 410 */
232, 37,253,255,255,139, 85,212,137,198,139, 69,236,136, 24,199, /* 0x 420 */
66, 16, 3, 0, 0, 0,199, 66, 24, 4, 0, 0, 0,139, 85,204, /* 0x 430 */
15,183, 66, 42,139, 85,212,137, 66, 28,199, 66, 32, 5, 0, 0, /* 0x 440 */
0,139, 85,204, 15,183, 66, 44,139, 85,212,137, 66, 36,139, 69, /* 0x 450 */
204,199, 66, 44, 0, 16, 0, 0,137,114, 68,199, 66, 40, 6, 0, /* 0x 460 */
0, 0,102,139, 88, 44,199, 66, 64, 9, 0, 0, 0,139, 85,204, /* 0x 470 */
89, 49,201,131,194, 52,102,133,219,116, 34,131, 58, 3,117, 18, /* 0x 480 */
139, 66, 8,106, 0,139, 85,204,232,173,252,255,255,137,198, 88, /* 0x 490 */
235, 11, 65, 15,183,195,131,194, 32, 57,193,124,222,141,101,244, /* 0x 4a0 */
137,240, 91, 94, 95,201,195 /* 0x 4b0 */
};
+2 -2
View File
@@ -2,8 +2,8 @@
; ;
; This file is part of the UPX executable compressor. ; This file is part of the UPX executable compressor.
; ;
; Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
; Copyright (C) 1996-2004 Laszlo Molnar ; Copyright (C) 1996-2005 Laszlo Molnar
; All Rights Reserved. ; All Rights Reserved.
; ;
; UPX and the UCL library are free software; you can redistribute them ; UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,8 +2,8 @@
; ;
; This file is part of the UPX executable compressor. ; This file is part of the UPX executable compressor.
; ;
; Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
; Copyright (C) 1996-2004 Laszlo Molnar ; Copyright (C) 1996-2005 Laszlo Molnar
; All Rights Reserved. ; All Rights Reserved.
; ;
; UPX and the UCL library are free software; you can redistribute them ; UPX and the UCL library are free software; you can redistribute them
@@ -33,6 +33,6 @@
db 10,0 db 10,0
db '$Id: UPX ' db '$Id: UPX '
db 'UPXV' db 'UPXV'
db ' Copyright (C) 1996-2004 the UPX Team. All Rights Reserved. $' db ' Copyright (C) 1996-2005 the UPX Team. All Rights Reserved. $'
db 10,0 db 10,0
+3 -3
View File
@@ -2,8 +2,8 @@
; ;
; This file is part of the UPX executable compressor. ; This file is part of the UPX executable compressor.
; ;
; Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
; Copyright (C) 1996-2004 Laszlo Molnar ; Copyright (C) 1996-2005 Laszlo Molnar
; All Rights Reserved. ; All Rights Reserved.
; ;
; UPX and the UCL library are free software; you can redistribute them ; UPX and the UCL library are free software; you can redistribute them
@@ -29,6 +29,6 @@
; ------------- COPYRIGHT ------------- ; ------------- COPYRIGHT -------------
db 10 db 10
db '$Id: UPX (C) 1996-2004 the UPX Team. All Rights Reserved. http://upx.sf.net $' db '$Id: UPX (C) 1996-2005 the UPX Team. All Rights Reserved. http://upx.sf.net $'
db 10,0 db 10,0
+86
View File
@@ -0,0 +1,86 @@
/* l_com.h -- created from l_com.bin, 846 (0x34e) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV2B_LOADER_ADLER32 0x1dc7d148
#define NRV2B_LOADER_CRC32 0x7d717411
unsigned char nrv2b_loader[846] = {
129,252, 83, 80,119, 2,205, 32,185, 67, 88,190, 83, 73,191, 68, /* 0x 0 */
73,187, 0,128,253,243,164,252,135,247,131,238,198, 25,237, 87, /* 0x 10 */
87,233, 74, 77, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 45,164,232, 0, 0,114,250, /* 0x 30 */
65,232, 0, 0,227, 0,227, 0,115, 0,131,233, 3,114, 6,136, /* 0x 40 */
204,172,247,208,149, 49,201,232, 0, 0, 17,201,117, 8, 65,232, /* 0x 50 */
0, 0,115,251, 65, 65, 65,129,253, 0,243,131,209, 1,141, 3, /* 0x 60 */
150,243,164,150,235, 0,232, 2, 0, 17,201, 1,219,117, 4,173, /* 0x 70 */
17,192,147,195, 94,185, 67, 84,172, 44,232, 60, 1,119,249,193, /* 0x 80 */
4, 8, 41, 52,139, 28,134,223, 41,243,137, 28,173,226, 0,176, /* 0x 90 */
232,176,233, 95,185, 67, 84,242,174,117, 0,117, 0,193, 5, 8, /* 0x a0 */
41, 61,139, 29,134,223, 41,251,137, 29,175,235, 0,195, 0, 0, /* 0x b0 */
67, 79, 77, 77, 65, 73, 78, 49, 0, 0, 0, 0, 67, 79, 77, 83, /* 0x c0 */
85, 66, 83, 73, 29, 0, 0, 0, 67, 79, 77, 83, 66, 66, 66, 80, /* 0x d0 */
29, 0, 0, 0, 67, 79, 77, 80, 83, 72, 68, 73, 31, 0, 0, 0, /* 0x e0 */
67, 79, 77, 67, 65, 76, 76, 84, 32, 0, 0, 0, 67, 79, 77, 77, /* 0x f0 */
65, 73, 78, 50, 33, 0, 0, 0, 85, 80, 88, 49, 72, 69, 65, 68, /* 0x 100 */
36, 0, 0, 0, 67, 79, 77, 67, 85, 84, 80, 79, 58, 0, 0, 0, /* 0x 110 */
78, 82, 86, 50, 66, 49, 54, 48, 58, 0, 0, 0, 0, 0, 0, 0, /* 0x 120 */
62, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, 13, 0, 0, 0, /* 0x 130 */
0, 0, 0, 0, 68, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, /* 0x 140 */
8, 0, 0, 0, 78, 82, 86, 68, 68, 79, 78, 69, 68, 0, 0, 0, /* 0x 150 */
0, 0, 0, 0, 70, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, /* 0x 160 */
22, 0, 0, 0, 78, 82, 86, 68, 82, 69, 84, 85, 70, 0, 0, 0, /* 0x 170 */
0, 0, 0, 0, 72, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, /* 0x 180 */
21, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 49, 72, 0, 0, 0, /* 0x 190 */
0, 0, 0, 0, 74, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 48, /* 0x 1a0 */
7, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 78, 82, 86, 68, /* 0x 1b0 */
69, 67, 79, 50, 8, 0, 0, 0, 0, 0, 0, 0, 98, 0, 0, 0, /* 0x 1c0 */
78, 82, 86, 68, 69, 67, 79, 50, 8, 0, 0, 0, 78, 82, 86, 76, /* 0x 1d0 */
69, 68, 48, 48,102, 0, 0, 0, 78, 82, 86, 71, 84, 68, 48, 48, /* 0x 1e0 */
103, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50,110, 0, 0, 0, /* 0x 1f0 */
0, 0, 0, 0,118, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 48, /* 0x 200 */
1, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 57,132, 0, 0, 0, /* 0x 210 */
67, 65, 76, 76, 84, 82, 49, 54,132, 0, 0, 0, 67, 84, 49, 54, /* 0x 220 */
73, 50, 56, 54,143, 0, 0, 0, 67, 84, 49, 54, 83, 85, 66, 48, /* 0x 230 */
146, 0, 0, 0, 67, 84, 49, 54, 73, 48, 56, 54,148, 0, 0, 0, /* 0x 240 */
67, 65, 76, 76, 84, 82, 73, 50,156, 0, 0, 0, 0, 0, 0, 0, /* 0x 250 */
159, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 54, 4, 0, 0, 0, /* 0x 260 */
67, 84, 49, 54, 68, 85, 77, 49,159, 0, 0, 0, 67, 84, 49, 54, /* 0x 270 */
69, 56, 48, 48,159, 0, 0, 0, 67, 84, 49, 54, 69, 57, 48, 48, /* 0x 280 */
161, 0, 0, 0, 67, 65, 76, 76, 84, 82, 73, 53,163, 0, 0, 0, /* 0x 290 */
67, 84, 49, 54, 74, 69, 78, 68,169, 0, 0, 0, 0, 0, 0, 0, /* 0x 2a0 */
171, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, 21, 0, 0, 0, /* 0x 2b0 */
67, 84, 49, 54, 74, 85, 76, 50,171, 0, 0, 0, 0, 0, 0, 0, /* 0x 2c0 */
173, 0, 0, 0, 67, 65, 76, 76, 84, 82, 73, 54, 3, 0, 0, 0, /* 0x 2d0 */
67, 84, 49, 54, 68, 85, 77, 50,173, 0, 0, 0, 67, 84, 49, 54, /* 0x 2e0 */
73, 50, 56, 55,173, 0, 0, 0, 67, 84, 49, 54, 83, 85, 66, 49, /* 0x 2f0 */
176, 0, 0, 0, 67, 84, 49, 54, 73, 48, 56, 55,178, 0, 0, 0, /* 0x 300 */
67, 65, 76, 76, 84, 82, 73, 54,186, 0, 0, 0, 0, 0, 0, 0, /* 0x 310 */
189, 0, 0, 0, 67, 65, 76, 76, 84, 82, 73, 53, 4, 0, 0, 0, /* 0x 320 */
67, 79, 82, 69, 84, 85, 82, 78,189, 0, 0, 0, 67, 79, 77, 84, /* 0x 330 */
72, 69, 78, 68,190, 0, 0, 0,255,255,255,255,190, 0 /* 0x 340 */
};
+228
View File
@@ -0,0 +1,228 @@
/* l_djgpp2.h -- created from l_djgpp2.bin, 3118 (0xc2e) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV_LOADER_ADLER32 0x7848ee39
#define NRV_LOADER_CRC32 0x3820573b
unsigned char nrv_loader[3118] = {
30, 7,190, 73, 78, 80, 80,191, 79, 85, 84, 80, 87,131,205,255, /* 0x 0 */
235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219,117, 7,139, /* 0x 10 */
30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7,114, 0,184, /* 0x 20 */
1, 0, 0, 0, 1,219,117, 7,139, 30,131,238,252, 17,219, 17, /* 0x 30 */
192, 1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, 1,219, /* 0x 40 */
115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, 49,201,131, /* 0x 50 */
232, 3,114, 13,193,224, 8,138, 6, 70,131,240,255,116, 0,137, /* 0x 60 */
197, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201, 1,219, /* 0x 70 */
117, 7,139, 30,131,238,252, 17,219, 17,201,117, 0, 65, 1,219, /* 0x 80 */
117, 7,139, 30,131,238,252, 17,219, 17,201, 1,219,117, 7,139, /* 0x 90 */
30,131,238,252, 17,219,115, 0, 1,219,115, 0,117, 9,139, 30, /* 0x a0 */
131,238,252, 17,219,115, 0, 65, 65,131,193, 2,129,253, 0,243, /* 0x b0 */
255,255,131,209, 1, 86,141, 52, 47,243,164, 94,233, 0, 0, 0, /* 0x c0 */
0,141, 20, 47,131,253,252,138, 4, 15,118, 0,138, 2, 66,136, /* 0x d0 */
7, 71, 73,117,247,233, 0, 0, 0, 0,139, 2,131,194, 4,137, /* 0x e0 */
7,131,199, 4,131,233, 4,119,241, 1,207,233, 0, 0, 0, 0, /* 0x f0 */
235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219,117, 7,139, /* 0x 100 */
30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7,114, 0,184, /* 0x 110 */
1, 0, 0, 0, 1,219,117, 7,139, 30,131,238,252, 17,219, 17, /* 0x 120 */
192, 1,219,117, 7,139, 30,131,238,252, 17,219,114, 0, 1,219, /* 0x 130 */
115, 11,117, 0,139, 30,131,238,252, 17,219,114, 0, 72, 1,219, /* 0x 140 */
117, 7,139, 30,131,238,252, 17,219, 17,192,235, 0, 49,201,131, /* 0x 150 */
232, 3,114, 17,193,224, 8,138, 6, 70,131,240,255,116, 0,209, /* 0x 160 */
248,137,197,235, 11, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 170 */
17,201, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201,117, /* 0x 180 */
0, 65, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201, 1, /* 0x 190 */
219,117, 7,139, 30,131,238,252, 17,219,115, 0, 1,219,115, 0, /* 0x 1a0 */
117, 9,139, 30,131,238,252, 17,219,115, 0, 65, 65,131,193, 2, /* 0x 1b0 */
129,253, 0,251,255,255,131,209, 1, 86,141, 52, 47,243,164, 94, /* 0x 1c0 */
233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, 4, 15,118, 0, /* 0x 1d0 */
138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, 0, 0,139, 2, /* 0x 1e0 */
131,194, 4,137, 7,131,199, 4,131,233, 4,119,241, 1,207,233, /* 0x 1f0 */
0, 0, 0, 0,235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1, /* 0x 200 */
219,117, 7,139, 30,131,238,252, 17,219,114, 0, 49,192, 64,138, /* 0x 210 */
7,114, 0,184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131,238, /* 0x 220 */
252, 17,219, 17,192, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 230 */
114, 0, 1,219,115, 11,117, 0,139, 30,131,238,252, 17,219,114, /* 0x 240 */
0, 72, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,192,235, /* 0x 250 */
0, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201,235, 0, /* 0x 260 */
49,201,131,232, 3,114, 17,193,224, 8,138, 6, 70,131,240,255, /* 0x 270 */
116, 0,209,248,137,197,235, 11, 1,219,117, 7,139, 30,131,238, /* 0x 280 */
252, 17,219,114,204, 65, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 290 */
219,114,190, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201, /* 0x 2a0 */
1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, 1,219,115, /* 0x 2b0 */
0,117, 9,139, 30,131,238,252, 17,219,115, 0, 65, 65,131,193, /* 0x 2c0 */
2,129,253, 0,251,255,255,131,209, 2, 86,141, 52, 47,243,164, /* 0x 2d0 */
94,233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, 4, 15,118, /* 0x 2e0 */
0,138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, 0, 0,139, /* 0x 2f0 */
2,131,194, 4,137, 7,131,199, 4,131,233, 4,119,241, 1,207, /* 0x 300 */
233, 0, 0, 0, 0,185, 66, 83, 83, 76,243,171, 95,185, 84, 69, /* 0x 310 */
88, 76,138, 7, 71, 44,232, 60, 1,119,247,128, 63, 63,117, 0, /* 0x 320 */
139, 7,138, 95, 4,102,193,232, 8,134,196,193,192, 16,134,196, /* 0x 330 */
41,248,128,235,232,137, 7,131,199, 5,136,216,226, 0,185, 84, /* 0x 340 */
69, 88, 76,176,232,176,233,242,174,117, 0,128, 63, 63,117, 0, /* 0x 350 */
139, 7,102,193,232, 8,134,196,193,192, 16,134,196, 41,248,171, /* 0x 360 */
235, 0,104, 69, 78, 84, 82,195, 85, 80, 88, 33,161,216,208,213, /* 0x 370 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 380 */
0, 0, 0, 0, 0, 0, 0, 45, 68, 74, 50, 77, 65, 73, 78, 49, /* 0x 390 */
0, 0, 0, 0, 68, 74, 67, 65, 76, 76, 84, 49, 12, 0, 0, 0, /* 0x 3a0 */
68, 74, 50, 77, 65, 73, 78, 50, 13, 0, 0, 0, 78, 50, 66, 83, /* 0x 3b0 */
77, 65, 49, 48, 16, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, /* 0x 3c0 */
78, 50, 66, 68, 69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 66, 70, /* 0x 3d0 */
65, 83, 49, 48, 19, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, /* 0x 3e0 */
78, 50, 66, 68, 69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 66, 70, /* 0x 3f0 */
65, 83, 49, 49, 21, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, /* 0x 400 */
27, 0, 0, 0, 78, 50, 66, 83, 77, 65, 50, 48, 38, 0, 0, 0, /* 0x 410 */
0, 0, 0, 0, 40, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, /* 0x 420 */
2, 0, 0, 0, 78, 50, 66, 70, 65, 83, 50, 48, 43, 0, 0, 0, /* 0x 430 */
0, 0, 0, 0, 47, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 49, /* 0x 440 */
0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 52, 0, 0, 0, /* 0x 450 */
78, 50, 66, 83, 77, 65, 51, 48, 65, 0, 0, 0, 0, 0, 0, 0, /* 0x 460 */
78, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, /* 0x 470 */
78, 50, 66, 70, 65, 83, 51, 48, 78, 0, 0, 0, 0, 0, 0, 0, /* 0x 480 */
82, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, /* 0x 490 */
0, 0, 0, 0, 93, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, /* 0x 4a0 */
0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 93, 0, 0, 0, /* 0x 4b0 */
0, 0, 0, 0,111, 0, 0, 0, 78, 50, 66, 68, 69, 67, 54, 48, /* 0x 4c0 */
0, 0, 0, 0, 0, 0, 0, 0,141, 0, 0, 0, 78, 50, 66, 68, /* 0x 4d0 */
69, 67, 53, 48, 0, 0, 0, 0, 78, 50, 66, 83, 77, 65, 52, 48, /* 0x 4e0 */
155, 0, 0, 0, 0, 0, 0, 0,168, 0, 0, 0, 78, 50, 66, 68, /* 0x 4f0 */
69, 67, 51, 48, 49, 0, 0, 0, 78, 50, 66, 70, 65, 83, 52, 48, /* 0x 500 */
168, 0, 0, 0, 0, 0, 0, 0,172, 0, 0, 0, 78, 50, 66, 68, /* 0x 510 */
69, 67, 51, 48, 49, 0, 0, 0, 0, 0, 0, 0,183, 0, 0, 0, /* 0x 520 */
78, 50, 66, 68, 69, 67, 51, 48, 49, 0, 0, 0, 78, 50, 66, 68, /* 0x 530 */
85, 77, 77, 49,183, 0, 0, 0, 78, 50, 66, 83, 77, 65, 53, 48, /* 0x 540 */
183, 0, 0, 0, 78, 50, 66, 70, 65, 83, 53, 48,185, 0, 0, 0, /* 0x 550 */
78, 50, 66, 68, 69, 67, 53, 48,188, 0, 0, 0, 78, 50, 66, 83, /* 0x 560 */
77, 65, 54, 48,197, 0, 0, 0, 0, 0, 0, 0,209, 0, 0, 0, /* 0x 570 */
78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 66, 70, /* 0x 580 */
65, 83, 54, 48,209, 0, 0, 0, 0, 0, 0, 0,220, 0, 0, 0, /* 0x 590 */
78, 50, 66, 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 5a0 */
234, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x 5b0 */
78, 50, 66, 70, 65, 83, 54, 49,234, 0, 0, 0, 0, 0, 0, 0, /* 0x 5c0 */
0, 1, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x 5d0 */
78, 50, 66, 68, 69, 67, 54, 48, 0, 1, 0, 0, 78, 82, 86, 50, /* 0x 5e0 */
66, 69, 78, 68, 0, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, 48, /* 0x 5f0 */
0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 78, 50, 68, 68, /* 0x 600 */
69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 68, 70, 65, 83, 49, 48, /* 0x 610 */
3, 1, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 78, 50, 68, 68, /* 0x 620 */
69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 68, 70, 65, 83, 49, 49, /* 0x 630 */
5, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 11, 1, 0, 0, /* 0x 640 */
78, 50, 68, 83, 77, 65, 50, 48, 22, 1, 0, 0, 0, 0, 0, 0, /* 0x 650 */
24, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, 48, 2, 0, 0, 0, /* 0x 660 */
78, 50, 68, 70, 65, 83, 50, 48, 27, 1, 0, 0, 0, 0, 0, 0, /* 0x 670 */
31, 1, 0, 0, 78, 50, 68, 70, 65, 83, 49, 49, 0, 0, 0, 0, /* 0x 680 */
78, 50, 68, 68, 69, 67, 50, 48, 36, 1, 0, 0, 78, 50, 68, 83, /* 0x 690 */
77, 65, 51, 48, 49, 1, 0, 0, 0, 0, 0, 0, 62, 1, 0, 0, /* 0x 6a0 */
78, 50, 68, 68, 69, 67, 51, 48, 16, 0, 0, 0, 78, 50, 68, 70, /* 0x 6b0 */
65, 83, 51, 48, 62, 1, 0, 0, 0, 0, 0, 0, 68, 1, 0, 0, /* 0x 6c0 */
78, 50, 68, 68, 69, 67, 51, 48, 16, 0, 0, 0, 0, 0, 0, 0, /* 0x 6d0 */
77, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 16, 0, 0, 0, /* 0x 6e0 */
78, 50, 68, 68, 69, 67, 51, 48, 77, 1, 0, 0, 0, 0, 0, 0, /* 0x 6f0 */
93, 1, 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, 0, 0, 0, 0, /* 0x 700 */
0, 0, 0, 0,111, 1, 0, 0, 78, 50, 68, 68, 69, 67, 54, 48, /* 0x 710 */
0, 0, 0, 0, 0, 0, 0, 0,145, 1, 0, 0, 78, 50, 68, 68, /* 0x 720 */
69, 67, 53, 48, 0, 0, 0, 0, 78, 50, 68, 83, 77, 65, 52, 48, /* 0x 730 */
159, 1, 0, 0, 0, 0, 0, 0,172, 1, 0, 0, 78, 50, 68, 68, /* 0x 740 */
69, 67, 51, 48, 69, 0, 0, 0, 78, 50, 68, 70, 65, 83, 52, 48, /* 0x 750 */
172, 1, 0, 0, 0, 0, 0, 0,176, 1, 0, 0, 78, 50, 68, 68, /* 0x 760 */
69, 67, 51, 48, 69, 0, 0, 0, 0, 0, 0, 0,187, 1, 0, 0, /* 0x 770 */
78, 50, 68, 68, 69, 67, 51, 48, 69, 0, 0, 0, 78, 50, 68, 68, /* 0x 780 */
85, 77, 77, 49,187, 1, 0, 0, 78, 50, 68, 83, 77, 65, 53, 48, /* 0x 790 */
187, 1, 0, 0, 78, 50, 68, 70, 65, 83, 53, 48,189, 1, 0, 0, /* 0x 7a0 */
78, 50, 68, 68, 69, 67, 53, 48,192, 1, 0, 0, 78, 50, 68, 83, /* 0x 7b0 */
77, 65, 54, 48,201, 1, 0, 0, 0, 0, 0, 0,213, 1, 0, 0, /* 0x 7c0 */
78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 68, 70, /* 0x 7d0 */
65, 83, 54, 48,213, 1, 0, 0, 0, 0, 0, 0,224, 1, 0, 0, /* 0x 7e0 */
78, 50, 68, 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7f0 */
238, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x 800 */
78, 50, 68, 70, 65, 83, 54, 49,238, 1, 0, 0, 0, 0, 0, 0, /* 0x 810 */
4, 2, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x 820 */
78, 50, 68, 68, 69, 67, 54, 48, 4, 2, 0, 0, 78, 82, 86, 50, /* 0x 830 */
68, 69, 78, 68, 4, 2, 0, 0, 78, 50, 69, 83, 77, 65, 49, 48, /* 0x 840 */
4, 2, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 78, 50, 69, 68, /* 0x 850 */
69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 69, 70, 65, 83, 49, 48, /* 0x 860 */
7, 2, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, 78, 50, 69, 68, /* 0x 870 */
69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, /* 0x 880 */
9, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 15, 2, 0, 0, /* 0x 890 */
78, 50, 69, 83, 77, 65, 50, 48, 26, 2, 0, 0, 0, 0, 0, 0, /* 0x 8a0 */
28, 2, 0, 0, 78, 50, 69, 83, 77, 65, 49, 48, 2, 0, 0, 0, /* 0x 8b0 */
78, 50, 69, 70, 65, 83, 50, 48, 31, 2, 0, 0, 0, 0, 0, 0, /* 0x 8c0 */
35, 2, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, 0, 0, 0, 0, /* 0x 8d0 */
78, 50, 69, 68, 69, 67, 50, 48, 40, 2, 0, 0, 78, 50, 69, 83, /* 0x 8e0 */
77, 65, 51, 48, 53, 2, 0, 0, 0, 0, 0, 0, 66, 2, 0, 0, /* 0x 8f0 */
78, 50, 69, 68, 69, 67, 51, 48, 31, 0, 0, 0, 78, 50, 69, 70, /* 0x 900 */
65, 83, 51, 48, 66, 2, 0, 0, 0, 0, 0, 0, 72, 2, 0, 0, /* 0x 910 */
78, 50, 69, 68, 69, 67, 51, 48, 31, 0, 0, 0, 0, 0, 0, 0, /* 0x 920 */
81, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 31, 0, 0, 0, /* 0x 930 */
78, 50, 69, 68, 69, 67, 51, 48, 81, 2, 0, 0, 0, 0, 0, 0, /* 0x 940 */
97, 2, 0, 0, 78, 50, 69, 68, 69, 67, 50, 48, 0, 0, 0, 0, /* 0x 950 */
0, 0, 0, 0,112, 2, 0, 0, 78, 50, 69, 68, 69, 67, 53, 48, /* 0x 960 */
0, 0, 0, 0, 0, 0, 0, 0,130, 2, 0, 0, 78, 50, 69, 68, /* 0x 970 */
69, 67, 54, 48, 0, 0, 0, 0, 78, 50, 69, 83, 77, 65, 52, 48, /* 0x 980 */
176, 2, 0, 0, 0, 0, 0, 0,189, 2, 0, 0, 78, 50, 69, 68, /* 0x 990 */
69, 67, 51, 48, 82, 0, 0, 0, 78, 50, 69, 70, 65, 83, 52, 48, /* 0x 9a0 */
189, 2, 0, 0, 0, 0, 0, 0,193, 2, 0, 0, 78, 50, 69, 68, /* 0x 9b0 */
69, 67, 51, 48, 82, 0, 0, 0, 0, 0, 0, 0,204, 2, 0, 0, /* 0x 9c0 */
78, 50, 69, 68, 69, 67, 51, 48, 82, 0, 0, 0, 78, 50, 69, 68, /* 0x 9d0 */
85, 77, 77, 49,204, 2, 0, 0, 78, 50, 69, 83, 77, 65, 53, 48, /* 0x 9e0 */
204, 2, 0, 0, 78, 50, 69, 70, 65, 83, 53, 48,206, 2, 0, 0, /* 0x 9f0 */
78, 50, 69, 68, 69, 67, 53, 48,209, 2, 0, 0, 78, 50, 69, 83, /* 0x a00 */
77, 65, 54, 48,218, 2, 0, 0, 0, 0, 0, 0,230, 2, 0, 0, /* 0x a10 */
78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 69, 70, /* 0x a20 */
65, 83, 54, 48,230, 2, 0, 0, 0, 0, 0, 0,241, 2, 0, 0, /* 0x a30 */
78, 50, 69, 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x a40 */
255, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x a50 */
78, 50, 69, 70, 65, 83, 54, 49,255, 2, 0, 0, 0, 0, 0, 0, /* 0x a60 */
21, 3, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x a70 */
78, 50, 69, 68, 69, 67, 54, 48, 21, 3, 0, 0, 78, 82, 86, 50, /* 0x a80 */
69, 69, 78, 68, 21, 3, 0, 0, 68, 74, 50, 66, 83, 83, 48, 48, /* 0x a90 */
21, 3, 0, 0, 68, 74, 67, 65, 76, 76, 84, 50, 28, 3, 0, 0, /* 0x aa0 */
67, 65, 76, 76, 84, 82, 48, 48, 29, 3, 0, 0, 67, 84, 67, 76, /* 0x ab0 */
69, 86, 69, 49, 43, 3, 0, 0, 0, 0, 0, 0, 48, 3, 0, 0, /* 0x ac0 */
67, 65, 76, 76, 84, 82, 48, 48, 5, 0, 0, 0, 67, 65, 76, 76, /* 0x ad0 */
84, 82, 48, 49, 48, 3, 0, 0, 67, 84, 68, 85, 77, 77, 89, 49, /* 0x ae0 */
53, 3, 0, 0, 67, 84, 66, 83, 72, 82, 48, 49, 53, 3, 0, 0, /* 0x af0 */
67, 84, 66, 82, 79, 82, 48, 49, 57, 3, 0, 0, 67, 84, 66, 83, /* 0x b00 */
87, 65, 48, 49, 59, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 50, /* 0x b10 */
64, 3, 0, 0, 0, 0, 0, 0, 78, 3, 0, 0, 67, 65, 76, 76, /* 0x b20 */
84, 82, 48, 48, 10, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, /* 0x b30 */
78, 3, 0, 0, 67, 65, 76, 76, 84, 82, 69, 56, 83, 3, 0, 0, /* 0x b40 */
67, 65, 76, 76, 84, 82, 69, 57, 85, 3, 0, 0, 67, 65, 76, 76, /* 0x b50 */
84, 82, 49, 49, 87, 3, 0, 0, 0, 0, 0, 0, 91, 3, 0, 0, /* 0x b60 */
67, 65, 76, 76, 84, 82, 49, 51, 5, 0, 0, 0, 67, 84, 67, 76, /* 0x b70 */
69, 86, 69, 50, 91, 3, 0, 0, 0, 0, 0, 0, 96, 3, 0, 0, /* 0x b80 */
67, 65, 76, 76, 84, 82, 49, 49, 0, 0, 0, 0, 67, 65, 76, 76, /* 0x b90 */
84, 82, 49, 50, 96, 3, 0, 0, 67, 84, 68, 85, 77, 77, 89, 50, /* 0x ba0 */
98, 3, 0, 0, 67, 84, 66, 83, 72, 82, 49, 49, 98, 3, 0, 0, /* 0x bb0 */
67, 84, 66, 82, 79, 82, 49, 49,102, 3, 0, 0, 67, 84, 66, 83, /* 0x bc0 */
87, 65, 49, 49,104, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, /* 0x bd0 */
109, 3, 0, 0, 0, 0, 0, 0,114, 3, 0, 0, 67, 65, 76, 76, /* 0x be0 */
84, 82, 49, 48, 5, 0, 0, 0, 67, 84, 84, 72, 69, 69, 78, 68, /* 0x bf0 */
114, 3, 0, 0, 68, 74, 82, 69, 84, 85, 82, 78,114, 3, 0, 0, /* 0x c00 */
85, 80, 88, 49, 72, 69, 65, 68,120, 3, 0, 0, 68, 74, 84, 72, /* 0x c10 */
69, 69, 78, 68,152, 3, 0, 0,255,255,255,255,152, 3 /* 0x c20 */
};
+166
View File
@@ -0,0 +1,166 @@
/* l_exe.h -- created from l_exe.bin, 2118 (0x846) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV_LOADER_ADLER32 0xebe238fc
#define NRV_LOADER_CRC32 0x3d10173a
unsigned char nrv_loader[2118] = {
185, 67, 88,190, 83, 73,137,247, 30,169,181,128,140,200, 5, 68, /* 0x 0 */
83,142,216, 5, 69, 83,142,192,253,243,165,252, 46,128,108, 18, /* 0x 10 */
16,115,231,146,175,173, 14, 14, 14, 6, 31, 7, 22,189, 66, 80, /* 0x 20 */
187, 66, 88, 85,203, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, /* 0x 30 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, /* 0x 40 */
164, 0,255,117, 3,232, 0, 0,114,246, 65,140,192, 1,255,115, /* 0x 50 */
5,128,196, 8,142,192,209,239,232, 0, 0,227, 0,115,249, 73, /* 0x 60 */
73,116, 0, 1,201, 1,201, 1,201, 1,201,193,225, 4,137,205, /* 0x 70 */
138, 28, 70,246,211, 49,201,232, 0, 0, 17,201,117, 8, 65,232, /* 0x 80 */
0, 0,115,251, 65, 65,129,253,209, 0,131,217,254, 41,232,114, /* 0x 90 */
14,142,216,141, 1, 40,252,150,243,164,150,142,218,235, 0,209, /* 0x a0 */
224,209,224,209,224,209,224, 80, 49,192,142,216, 88,193,224, 4, /* 0x b0 */
106, 0, 31, 1,216, 1,248,235, 0, 0,255,117, 3,232, 6, 0, /* 0x c0 */
17,201, 0,255,117, 0,138, 60, 17,246,115, 5,128,198, 8,142, /* 0x d0 */
218,209,238, 70, 16,255,195,164, 0,255,117, 3,232, 0, 0,114, /* 0x e0 */
246, 65,140,192, 1,255,115, 5,128,196, 8,142,192,209,239,232, /* 0x f0 */
0, 0,114, 10, 73,232, 0, 0, 17,201,121,243,235, 0, 73, 73, /* 0x 100 */
116, 0, 1,201, 1,201, 1,201,193,225, 3,137,205,138, 28, 70, /* 0x 110 */
246,211, 49,201,208,235,235, 3,232, 0, 0, 17,201,232, 0, 0, /* 0x 120 */
17,201,117, 8, 65,232, 0, 0,115,251, 65, 65,131,253, 81,131, /* 0x 130 */
217,254, 41,232,114, 14,142,216,141, 1, 40,252,150,243,164,150, /* 0x 140 */
142,218,235, 0,209,224,209,224,209,224,209,224, 80, 49,192,142, /* 0x 150 */
216, 88,193,224, 4,106, 0, 31, 1,216, 1,248,235, 0, 0,255, /* 0x 160 */
117, 3,232, 6, 0, 17,201, 0,255,117, 0,138, 60, 17,246,115, /* 0x 170 */
5,128,198, 8,142,218,209,238, 70, 16,255,195,164, 0,255,117, /* 0x 180 */
3,232, 0, 0,114,246, 65,140,192, 1,255,115, 5,128,196, 8, /* 0x 190 */
142,192,209,239,232, 0, 0,114, 10, 73,232, 0, 0, 17,201,121, /* 0x 1a0 */
243,235, 0, 73, 73,116, 0, 1,201, 1,201, 1,201,193,225, 3, /* 0x 1b0 */
137,205,138, 28, 70,246,211, 49,201,208,235,115, 12,232, 0, 0, /* 0x 1c0 */
17,201,235, 18,232, 0, 0,114,244, 65,232, 0, 0,114,238,232, /* 0x 1d0 */
0, 0,115,251, 65, 65,131,253, 81,131,217,253, 41,232,114, 14, /* 0x 1e0 */
142,216,141, 1, 40,252,150,243,164,150,142,218,235, 0,209,224, /* 0x 1f0 */
209,224,209,224,209,224, 80, 49,192,142,216, 88,193,224, 4,106, /* 0x 200 */
0, 31, 1,216, 1,248,235, 0, 0,255,117, 3,232, 6, 0, 17, /* 0x 210 */
201, 0,255,117, 0,138, 60, 17,246,115, 5,128,198, 8,142,218, /* 0x 220 */
209,238, 70, 16,255,195, 93,140,192,128,236, 6,142,216, 6, 31, /* 0x 230 */
141,181, 82, 83,173, 91,145,173,146,173,151,173, 1,195,142,195, /* 0x 240 */
49,192, 1,199, 38, 1, 45,172, 72,116, 0, 64,117,244, 71, 71, /* 0x 250 */
38,128, 61,154,117,249, 38, 57, 85, 3,119,243,176, 3,235, 0, /* 0x 260 */
129,199,254, 0,114, 0,226, 0, 7, 6, 31,141,134, 83, 83,142, /* 0x 270 */
208,188, 83, 80,234, 73, 80, 67, 83,129,197, 67, 83, 85,184, 73, /* 0x 280 */
80, 80,203, 0, 69, 88, 69, 69, 78, 84, 82, 89, 0, 0, 0, 0, /* 0x 290 */
69, 88, 69, 82, 69, 76, 80, 85, 38, 0, 0, 0, 69, 88, 69, 77, /* 0x 2a0 */
65, 73, 78, 52, 39, 0, 0, 0, 85, 80, 88, 49, 72, 69, 65, 68, /* 0x 2b0 */
53, 0, 0, 0, 69, 88, 69, 67, 85, 84, 80, 79, 80, 0, 0, 0, /* 0x 2c0 */
78, 82, 86, 50, 66, 49, 54, 83, 80, 0, 0, 0, 0, 0, 0, 0, /* 0x 2d0 */
88, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, 19, 0, 0, 0, /* 0x 2e0 */
78, 50, 66, 54, 52, 75, 48, 49, 93, 0, 0, 0, 78, 82, 86, 50, /* 0x 2f0 */
66, 69, 88, 49,104, 0, 0, 0, 0, 0, 0, 0,107, 0, 0, 0, /* 0x 300 */
78, 82, 86, 50, 66, 69, 88, 51, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 310 */
109, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 57, 4, 0, 0, 0, /* 0x 320 */
0, 0, 0, 0,115, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 50, /* 0x 330 */
9, 0, 0, 0, 78, 50, 66, 88, 56, 54, 48, 49,115, 0, 0, 0, /* 0x 340 */
78, 50, 66, 50, 56, 54, 48, 49,123, 0, 0, 0, 78, 82, 86, 50, /* 0x 350 */
66, 69, 88, 50,126, 0, 0, 0, 0, 0, 0, 0,138, 0, 0, 0, /* 0x 360 */
78, 82, 86, 50, 66, 69, 88, 51, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 370 */
146, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, 6, 0, 0, 0, /* 0x 380 */
0, 0, 0, 0,175, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 83, /* 0x 390 */
1, 0, 0, 0, 78, 50, 66, 88, 56, 54, 48, 50,175, 0, 0, 0, /* 0x 3a0 */
78, 50, 66, 50, 56, 54, 48, 50,189, 0, 0, 0, 78, 82, 86, 50, /* 0x 3b0 */
66, 69, 88, 51,195, 0, 0, 0, 0, 0, 0, 0,201, 0, 0, 0, /* 0x 3c0 */
78, 82, 86, 50, 66, 69, 88, 50, 39, 0, 0, 0, 0, 0, 0, 0, /* 0x 3d0 */
214, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 57, 3, 0, 0, 0, /* 0x 3e0 */
78, 50, 66, 54, 52, 75, 48, 50,216, 0, 0, 0, 78, 82, 86, 50, /* 0x 3f0 */
66, 69, 88, 57,227, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 69, /* 0x 400 */
231, 0, 0, 0, 78, 82, 86, 50, 68, 49, 54, 83,231, 0, 0, 0, /* 0x 410 */
0, 0, 0, 0,239, 0, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, /* 0x 420 */
19, 0, 0, 0, 78, 50, 68, 54, 52, 75, 48, 49,244, 0, 0, 0, /* 0x 430 */
78, 82, 86, 50, 68, 69, 88, 49,255, 0, 0, 0, 0, 0, 0, 0, /* 0x 440 */
2, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 6, 0, 0, 0, /* 0x 450 */
0, 0, 0, 0, 8, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, /* 0x 460 */
15, 0, 0, 0, 0, 0, 0, 0, 14, 1, 0, 0, 78, 82, 86, 50, /* 0x 470 */
68, 69, 88, 57, 4, 0, 0, 0, 0, 0, 0, 0, 18, 1, 0, 0, /* 0x 480 */
78, 82, 86, 50, 68, 69, 88, 50, 13, 0, 0, 0, 78, 50, 68, 88, /* 0x 490 */
56, 54, 48, 49, 18, 1, 0, 0, 78, 50, 68, 50, 56, 54, 48, 49, /* 0x 4a0 */
24, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 50, 27, 1, 0, 0, /* 0x 4b0 */
0, 0, 0, 0, 43, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, /* 0x 4c0 */
15, 0, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 78, 82, 86, 50, /* 0x 4d0 */
68, 69, 88, 51, 15, 0, 0, 0, 0, 0, 0, 0, 56, 1, 0, 0, /* 0x 4e0 */
78, 82, 86, 50, 68, 69, 88, 51, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 4f0 */
84, 1, 0, 0, 78, 82, 86, 50, 68, 49, 54, 83, 1, 0, 0, 0, /* 0x 500 */
78, 50, 68, 88, 56, 54, 48, 50, 84, 1, 0, 0, 78, 50, 68, 50, /* 0x 510 */
56, 54, 48, 50, 98, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, /* 0x 520 */
104, 1, 0, 0, 0, 0, 0, 0,110, 1, 0, 0, 78, 82, 86, 50, /* 0x 530 */
68, 69, 88, 50, 47, 0, 0, 0, 0, 0, 0, 0,123, 1, 0, 0, /* 0x 540 */
78, 82, 86, 50, 68, 69, 88, 57, 3, 0, 0, 0, 78, 50, 68, 54, /* 0x 550 */
52, 75, 48, 50,125, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 57, /* 0x 560 */
136, 1, 0, 0, 78, 82, 86, 50, 68, 49, 54, 69,140, 1, 0, 0, /* 0x 570 */
78, 82, 86, 50, 69, 49, 54, 83,140, 1, 0, 0, 0, 0, 0, 0, /* 0x 580 */
148, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 19, 0, 0, 0, /* 0x 590 */
78, 50, 69, 54, 52, 75, 48, 49,153, 1, 0, 0, 78, 82, 86, 50, /* 0x 5a0 */
69, 69, 88, 49,164, 1, 0, 0, 0, 0, 0, 0,167, 1, 0, 0, /* 0x 5b0 */
78, 82, 86, 50, 69, 69, 88, 51, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 5c0 */
173, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 15, 0, 0, 0, /* 0x 5d0 */
0, 0, 0, 0,179, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 57, /* 0x 5e0 */
4, 0, 0, 0, 0, 0, 0, 0,183, 1, 0, 0, 78, 82, 86, 50, /* 0x 5f0 */
69, 69, 88, 50, 20, 0, 0, 0, 78, 50, 69, 88, 56, 54, 48, 49, /* 0x 600 */
183, 1, 0, 0, 78, 50, 69, 50, 56, 54, 48, 49,189, 1, 0, 0, /* 0x 610 */
78, 82, 86, 50, 69, 69, 88, 50,192, 1, 0, 0, 0, 0, 0, 0, /* 0x 620 */
208, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 15, 0, 0, 0, /* 0x 630 */
0, 0, 0, 0,215, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, /* 0x 640 */
15, 0, 0, 0, 0, 0, 0, 0,221, 1, 0, 0, 78, 82, 86, 50, /* 0x 650 */
69, 69, 88, 51, 15, 0, 0, 0, 0, 0, 0, 0,226, 1, 0, 0, /* 0x 660 */
78, 82, 86, 50, 69, 69, 88, 51, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 670 */
254, 1, 0, 0, 78, 82, 86, 50, 69, 49, 54, 83, 1, 0, 0, 0, /* 0x 680 */
78, 50, 69, 88, 56, 54, 48, 50,254, 1, 0, 0, 78, 50, 69, 50, /* 0x 690 */
56, 54, 48, 50, 12, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, /* 0x 6a0 */
18, 2, 0, 0, 0, 0, 0, 0, 24, 2, 0, 0, 78, 82, 86, 50, /* 0x 6b0 */
69, 69, 88, 50, 52, 0, 0, 0, 0, 0, 0, 0, 37, 2, 0, 0, /* 0x 6c0 */
78, 82, 86, 50, 69, 69, 88, 57, 3, 0, 0, 0, 78, 50, 69, 54, /* 0x 6d0 */
52, 75, 48, 50, 39, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 57, /* 0x 6e0 */
50, 2, 0, 0, 78, 82, 86, 50, 69, 49, 54, 69, 54, 2, 0, 0, /* 0x 6f0 */
69, 88, 69, 77, 65, 73, 78, 53, 54, 2, 0, 0, 69, 88, 69, 82, /* 0x 700 */
69, 76, 79, 67, 55, 2, 0, 0, 69, 88, 69, 65, 68, 74, 85, 83, /* 0x 710 */
55, 2, 0, 0, 69, 88, 69, 78, 79, 65, 68, 74, 62, 2, 0, 0, /* 0x 720 */
69, 88, 69, 82, 69, 76, 79, 49, 64, 2, 0, 0, 0, 0, 0, 0, /* 0x 730 */
91, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 50, 0, 0, 0, 0, /* 0x 740 */
69, 88, 69, 82, 69, 76, 57, 65, 94, 2, 0, 0, 0, 0, 0, 0, /* 0x 750 */
112, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 18, 0, 0, 0, /* 0x 760 */
69, 88, 69, 82, 69, 76, 79, 50,112, 2, 0, 0, 69, 88, 69, 82, /* 0x 770 */
69, 66, 73, 71,116, 2, 0, 0, 0, 0, 0, 0,118, 2, 0, 0, /* 0x 780 */
69, 88, 69, 82, 69, 76, 79, 49, 9, 0, 0, 0, 69, 88, 69, 82, /* 0x 790 */
69, 76, 79, 51,118, 2, 0, 0, 0, 0, 0, 0,120, 2, 0, 0, /* 0x 7a0 */
69, 88, 69, 82, 69, 76, 79, 49, 23, 0, 0, 0, 69, 88, 69, 77, /* 0x 7b0 */
65, 73, 78, 56,120, 2, 0, 0, 69, 88, 69, 83, 84, 65, 67, 75, /* 0x 7c0 */
123, 2, 0, 0, 69, 88, 69, 68, 85, 77, 77, 83,129, 2, 0, 0, /* 0x 7d0 */
69, 88, 69, 83, 84, 65, 83, 80,129, 2, 0, 0, 69, 88, 69, 68, /* 0x 7e0 */
85, 77, 77, 80,132, 2, 0, 0, 69, 88, 69, 74, 85, 77, 80, 70, /* 0x 7f0 */
132, 2, 0, 0, 69, 88, 69, 82, 69, 84, 85, 82,137, 2, 0, 0, /* 0x 800 */
69, 88, 69, 82, 67, 83, 80, 79,137, 2, 0, 0, 69, 88, 69, 82, /* 0x 810 */
69, 84, 73, 80,141, 2, 0, 0, 69, 88, 69, 68, 85, 77, 77, 90, /* 0x 820 */
147, 2, 0, 0, 69, 88, 69, 84, 72, 69, 78, 68,147, 2, 0, 0, /* 0x 830 */
255,255,255,255,147, 2 /* 0x 840 */
};
+7 -12
View File
@@ -241,17 +241,12 @@ auxv_up(Elf32_auxv_t *av, int const type, unsigned const value)
((x)|((x)<<4)|((x)<<8)|((x)<<12)|((x)<<16)|((x)<<20)|((x)<<24)|((x)<<28)) ((x)|((x)<<4)|((x)<<8)|((x)<<12)|((x)<<16)|((x)<<20)|((x)<<24)|((x)<<28))
#define EXP8(y) \ #define EXP8(y) \
((1&(y)) ? 0xf0f0f0f0 : (2&(y)) ? 0xff00ff00 : (4&(y)) ? 0xffff0000 : 0) ((1&(y)) ? 0xf0f0f0f0 : (2&(y)) ? 0xff00ff00 : (4&(y)) ? 0xffff0000 : 0)
#define PF_TO_PROT(pf) \
static inline unsigned ((PROT_READ|PROT_WRITE|PROT_EXEC) & ( \
__attribute__((regparm(1), stdcall)) ( (REP8(PROT_EXEC ) & EXP8(PF_X)) \
pf_to_prot(unsigned const pf) |(REP8(PROT_READ ) & EXP8(PF_R)) \
{ |(REP8(PROT_WRITE) & EXP8(PF_W)) \
return (PROT_READ|PROT_WRITE|PROT_EXEC) & ( ) >> ((pf & (PF_R|PF_W|PF_X))<<2) ))
( (REP8(PROT_EXEC ) & EXP8(PF_X))
|(REP8(PROT_READ ) & EXP8(PF_R))
|(REP8(PROT_WRITE) & EXP8(PF_W))
) >> ((pf & (PF_R|PF_W|PF_X))<<2) );
}
// Find convex hull of PT_LOAD (the minimal interval which covers all PT_LOAD), // Find convex hull of PT_LOAD (the minimal interval which covers all PT_LOAD),
@@ -300,7 +295,7 @@ do_xmap(int const fdi, Elf32_Ehdr const *const ehdr, struct Extent *const xi,
auxv_up(av, AT_PHDR, phdr->p_vaddr + reloc); auxv_up(av, AT_PHDR, phdr->p_vaddr + reloc);
} }
else if (PT_LOAD==phdr->p_type) { else if (PT_LOAD==phdr->p_type) {
unsigned const prot = pf_to_prot(phdr->p_flags); unsigned const prot = PF_TO_PROT(phdr->p_flags);
struct Extent xo; struct Extent xo;
size_t mlen = xo.size = phdr->p_filesz; size_t mlen = xo.size = phdr->p_filesz;
char *addr = xo.buf = (char *)phdr->p_vaddr; char *addr = xo.buf = (char *)phdr->p_vaddr;
+348
View File
@@ -0,0 +1,348 @@
/* l_lx_elf86.h -- created from l_lx_elf86.bin, 5030 (0x13a6) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define LINUX_I386ELF_LOADER_ADLER32 0x24b5b666
#define LINUX_I386ELF_LOADER_CRC32 0x3db5af12
unsigned char linux_i386elf_loader[5030] = {
232, 0, 0, 0, 0, 96,106, 63,139,116, 36, 40,139,124, 36, 48, /* 0x 0 */
131,205,255,235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219, /* 0x 10 */
117, 7,139, 30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7, /* 0x 20 */
114, 0,184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131,238,252, /* 0x 30 */
17,219, 17,192, 1,219,117, 7,139, 30,131,238,252, 17,219,115, /* 0x 40 */
0, 1,219,115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, /* 0x 50 */
49,201,131,232, 3,114, 13,193,224, 8,138, 6, 70,131,240,255, /* 0x 60 */
116, 0,137,197, 1,219,117, 7,139, 30,131,238,252, 17,219, 17, /* 0x 70 */
201, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201,117, 0, /* 0x 80 */
65, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201, 1,219, /* 0x 90 */
117, 7,139, 30,131,238,252, 17,219,115, 0, 1,219,115, 0,117, /* 0x a0 */
9,139, 30,131,238,252, 17,219,115, 0, 65, 65,131,193, 2,129, /* 0x b0 */
253, 0,243,255,255,131,209, 1, 86,141, 52, 47,243,164, 94,233, /* 0x c0 */
0, 0, 0, 0,141, 20, 47,131,253,252,138, 4, 15,118, 0,138, /* 0x d0 */
2, 66,136, 7, 71, 73,117,247,233, 0, 0, 0, 0,139, 2,131, /* 0x e0 */
194, 4,137, 7,131,199, 4,131,233, 4,119,241, 1,207,233, 0, /* 0x f0 */
0, 0, 0,235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219, /* 0x 100 */
117, 7,139, 30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7, /* 0x 110 */
114, 0,184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131,238,252, /* 0x 120 */
17,219, 17,192, 1,219,117, 7,139, 30,131,238,252, 17,219,114, /* 0x 130 */
0, 1,219,115, 11,117, 0,139, 30,131,238,252, 17,219,114, 0, /* 0x 140 */
72, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,192,235, 0, /* 0x 150 */
49,201,131,232, 3,114, 17,193,224, 8,138, 6, 70,131,240,255, /* 0x 160 */
116, 0,209,248,137,197,235, 11, 1,219,117, 7,139, 30,131,238, /* 0x 170 */
252, 17,219, 17,201, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 180 */
17,201,117, 0, 65, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 190 */
17,201, 1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, 1, /* 0x 1a0 */
219,115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, 65, 65, /* 0x 1b0 */
131,193, 2,129,253, 0,251,255,255,131,209, 1, 86,141, 52, 47, /* 0x 1c0 */
243,164, 94,233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, 4, /* 0x 1d0 */
15,118, 0,138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, 0, /* 0x 1e0 */
0,139, 2,131,194, 4,137, 7,131,199, 4,131,233, 4,119,241, /* 0x 1f0 */
1,207,233, 0, 0, 0, 0,235, 0,164,235, 0,138, 6, 70,136, /* 0x 200 */
7, 71, 1,219,117, 7,139, 30,131,238,252, 17,219,114, 0, 49, /* 0x 210 */
192, 64,138, 7,114, 0,184, 1, 0, 0, 0, 1,219,117, 7,139, /* 0x 220 */
30,131,238,252, 17,219, 17,192, 1,219,117, 7,139, 30,131,238, /* 0x 230 */
252, 17,219,114, 0, 1,219,115, 11,117, 0,139, 30,131,238,252, /* 0x 240 */
17,219,114, 0, 72, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 250 */
17,192,235, 0, 1,219,117, 7,139, 30,131,238,252, 17,219, 17, /* 0x 260 */
201,235, 0, 49,201,131,232, 3,114, 17,193,224, 8,138, 6, 70, /* 0x 270 */
131,240,255,116, 0,209,248,137,197,235, 11, 1,219,117, 7,139, /* 0x 280 */
30,131,238,252, 17,219,114,204, 65, 1,219,117, 7,139, 30,131, /* 0x 290 */
238,252, 17,219,114,190, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 2a0 */
219, 17,201, 1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, /* 0x 2b0 */
1,219,115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, 65, /* 0x 2c0 */
65,131,193, 2,129,253, 0,251,255,255,131,209, 2, 86,141, 52, /* 0x 2d0 */
47,243,164, 94,233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, /* 0x 2e0 */
4, 15,118, 0,138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, /* 0x 2f0 */
0, 0,139, 2,131,194, 4,137, 7,131,199, 4,131,233, 4,119, /* 0x 300 */
241, 1,207,233, 0, 0, 0, 0,185, 84, 69, 88, 76,138, 7, 71, /* 0x 310 */
44,232, 60, 1,119,247,128, 63, 63,117, 0,139, 7,138, 95, 4, /* 0x 320 */
102,193,232, 8,134,196,193,192, 16,134,196, 41,248,128,235,232, /* 0x 330 */
137, 7,131,199, 5,136,216,226, 0,185, 84, 69, 88, 76,176,232, /* 0x 340 */
176,233,242,174,117, 0,128, 63, 63,117, 0,139, 7,102,193,232, /* 0x 350 */
8,134,196,193,192, 16,134,196, 41,248,171,235, 0,139, 84, 36, /* 0x 360 */
40, 3, 84, 36, 44, 57,214,116, 1, 72, 43,124, 36, 48,139, 84, /* 0x 370 */
36, 52,137, 58, 90,137, 68, 36, 28, 97,195,235, 0, 90, 88, 89, /* 0x 380 */
151, 96, 49,219,187, 78, 77, 82, 85,106, 15, 88,138,100, 36, 32, /* 0x 390 */
106, 15, 91,138,124, 36, 32,138, 84, 36, 32,233, 0, 0, 0, 0, /* 0x 3a0 */
15,183, 47, 43,110, 12, 41,221,117, 0,131,237, 1,115, 0,136, /* 0x 3b0 */
95,255, 73,136, 7, 71,139, 7,156,102,193,232, 8,193,192, 16, /* 0x 3c0 */
134,196,157,115, 0,176, 0, 15,200,115, 0,209,232,115, 0,254, /* 0x 3d0 */
203, 75, 35, 30,125, 2, 3, 30,137, 4,156,235, 0,141, 20, 24, /* 0x 3e0 */
15,182,210, 35, 22, 59, 22,114, 2, 43, 22,139, 4,148,254,203, /* 0x 3f0 */
75, 35, 30,125, 2, 3, 30,139, 44,156,133,237,117, 0, 80,139, /* 0x 400 */
70, 4,254,200, 72, 35, 6,125, 2, 3, 6, 49,237,137, 70, 4, /* 0x 410 */
135,108,132, 4, 88,137, 44,148,137, 4,156, 41,248,131,233, 4, /* 0x 420 */
3, 70, 16, 1,240,137, 7,131,199, 4,235, 0,235, 0, 80,176, /* 0x 430 */
233,176,232, 80,106, 0, 83,137,230, 94,137,218,178,233,178,232, /* 0x 440 */
67,106, 0,254,203, 75,117, 0, 15,183, 7,131,199, 1, 60,128, /* 0x 450 */
114, 4, 60,143,118, 0, 41,208, 43, 70, 8,131,232, 2,116, 0, /* 0x 460 */
131,232, 1,114, 0,115, 0,122, 0,123, 0,248,235, 0,131,233, /* 0x 470 */
1,127, 0,137,231,185, 4, 1, 0, 0,139, 14,131,193, 5,139, /* 0x 480 */
14,131,193, 4, 49,192,243,171,137,252, 86, 97,151, 81, 80, 82, /* 0x 490 */
195,137,254,235, 0,138, 7,131,199, 1, 60,128,114, 10, 60,143, /* 0x 4a0 */
119, 6,128,127,254, 15,116, 0, 44,232, 60, 1,119, 0, 56, 23, /* 0x 4b0 */
117, 0,139, 7,102,193,232, 8,193,192, 16,134,196, 41,248, 1, /* 0x 4c0 */
240,137, 7,131,199, 4,131,233, 4,138, 7,131,199, 1,226, 0, /* 0x 4d0 */
131,233, 1,127, 0, 97,195, 94,252,173, 80, 84,184, 0, 0, 0, /* 0x 4e0 */
1, 80, 49,201, 81, 81,181, 16,106, 50,106, 7, 81, 80,137,227, /* 0x 4f0 */
106, 90, 88,205,128,147,183, 16,131,196, 24,173, 80,173, 86,255, /* 0x 500 */
213, 88, 88,195, 93,232,205,255,255,255, 0, 0, 76, 69, 88, 69, /* 0x 510 */
67, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, /* 0x 520 */
76, 69, 88, 69, 67, 48, 50, 48, 45, 0, 0, 0, 76, 69, 88, 69, /* 0x 530 */
67, 48, 48, 57, 5, 0, 0, 0, 76, 69, 88, 69, 67, 48, 49, 48, /* 0x 540 */
5, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, 19, 0, 0, 0, /* 0x 550 */
0, 0, 0, 0, 21, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, /* 0x 560 */
4, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 48, 22, 0, 0, 0, /* 0x 570 */
0, 0, 0, 0, 24, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, /* 0x 580 */
4, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 49, 24, 0, 0, 0, /* 0x 590 */
78, 50, 66, 68, 69, 67, 49, 48, 30, 0, 0, 0, 78, 50, 66, 83, /* 0x 5a0 */
77, 65, 50, 48, 41, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, /* 0x 5b0 */
78, 50, 66, 83, 77, 65, 49, 48, 2, 0, 0, 0, 78, 50, 66, 70, /* 0x 5c0 */
65, 83, 50, 48, 46, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, /* 0x 5d0 */
78, 50, 66, 70, 65, 83, 49, 49, 0, 0, 0, 0, 78, 50, 66, 68, /* 0x 5e0 */
69, 67, 50, 48, 55, 0, 0, 0, 78, 50, 66, 83, 77, 65, 51, 48, /* 0x 5f0 */
68, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 78, 50, 66, 68, /* 0x 600 */
69, 67, 50, 48, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 51, 48, /* 0x 610 */
81, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 78, 50, 66, 68, /* 0x 620 */
69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, /* 0x 630 */
78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 78, 50, 66, 68, /* 0x 640 */
69, 67, 51, 48, 96, 0, 0, 0, 0, 0, 0, 0,114, 0, 0, 0, /* 0x 650 */
78, 50, 66, 68, 69, 67, 54, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 660 */
144, 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, 0, 0, 0, 0, /* 0x 670 */
78, 50, 66, 83, 77, 65, 52, 48,158, 0, 0, 0, 0, 0, 0, 0, /* 0x 680 */
171, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 49, 0, 0, 0, /* 0x 690 */
78, 50, 66, 70, 65, 83, 52, 48,171, 0, 0, 0, 0, 0, 0, 0, /* 0x 6a0 */
175, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 49, 0, 0, 0, /* 0x 6b0 */
0, 0, 0, 0,186, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, /* 0x 6c0 */
49, 0, 0, 0, 78, 50, 66, 68, 85, 77, 77, 49,186, 0, 0, 0, /* 0x 6d0 */
78, 50, 66, 83, 77, 65, 53, 48,186, 0, 0, 0, 78, 50, 66, 70, /* 0x 6e0 */
65, 83, 53, 48,188, 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, /* 0x 6f0 */
191, 0, 0, 0, 78, 50, 66, 83, 77, 65, 54, 48,200, 0, 0, 0, /* 0x 700 */
0, 0, 0, 0,212, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, /* 0x 710 */
0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 48,212, 0, 0, 0, /* 0x 720 */
0, 0, 0, 0,223, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 49, /* 0x 730 */
0, 0, 0, 0, 0, 0, 0, 0,237, 0, 0, 0, 78, 50, 66, 68, /* 0x 740 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 49, /* 0x 750 */
237, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 78, 50, 66, 68, /* 0x 760 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 54, 48, /* 0x 770 */
3, 1, 0, 0, 78, 82, 86, 50, 66, 69, 78, 68, 3, 1, 0, 0, /* 0x 780 */
78, 50, 68, 83, 77, 65, 49, 48, 3, 1, 0, 0, 0, 0, 0, 0, /* 0x 790 */
5, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 4, 0, 0, 0, /* 0x 7a0 */
78, 50, 68, 70, 65, 83, 49, 48, 6, 1, 0, 0, 0, 0, 0, 0, /* 0x 7b0 */
8, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 4, 0, 0, 0, /* 0x 7c0 */
78, 50, 68, 70, 65, 83, 49, 49, 8, 1, 0, 0, 78, 50, 68, 68, /* 0x 7d0 */
69, 67, 49, 48, 14, 1, 0, 0, 78, 50, 68, 83, 77, 65, 50, 48, /* 0x 7e0 */
25, 1, 0, 0, 0, 0, 0, 0, 27, 1, 0, 0, 78, 50, 68, 83, /* 0x 7f0 */
77, 65, 49, 48, 2, 0, 0, 0, 78, 50, 68, 70, 65, 83, 50, 48, /* 0x 800 */
30, 1, 0, 0, 0, 0, 0, 0, 34, 1, 0, 0, 78, 50, 68, 70, /* 0x 810 */
65, 83, 49, 49, 0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, /* 0x 820 */
39, 1, 0, 0, 78, 50, 68, 83, 77, 65, 51, 48, 52, 1, 0, 0, /* 0x 830 */
0, 0, 0, 0, 65, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 840 */
16, 0, 0, 0, 78, 50, 68, 70, 65, 83, 51, 48, 65, 1, 0, 0, /* 0x 850 */
0, 0, 0, 0, 71, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 860 */
16, 0, 0, 0, 0, 0, 0, 0, 80, 1, 0, 0, 78, 50, 68, 68, /* 0x 870 */
69, 67, 51, 48, 16, 0, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 880 */
80, 1, 0, 0, 0, 0, 0, 0, 96, 1, 0, 0, 78, 50, 68, 68, /* 0x 890 */
69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0,114, 1, 0, 0, /* 0x 8a0 */
78, 50, 68, 68, 69, 67, 54, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 8b0 */
148, 1, 0, 0, 78, 50, 68, 68, 69, 67, 53, 48, 0, 0, 0, 0, /* 0x 8c0 */
78, 50, 68, 83, 77, 65, 52, 48,162, 1, 0, 0, 0, 0, 0, 0, /* 0x 8d0 */
175, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 69, 0, 0, 0, /* 0x 8e0 */
78, 50, 68, 70, 65, 83, 52, 48,175, 1, 0, 0, 0, 0, 0, 0, /* 0x 8f0 */
179, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 69, 0, 0, 0, /* 0x 900 */
0, 0, 0, 0,190, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 910 */
69, 0, 0, 0, 78, 50, 68, 68, 85, 77, 77, 49,190, 1, 0, 0, /* 0x 920 */
78, 50, 68, 83, 77, 65, 53, 48,190, 1, 0, 0, 78, 50, 68, 70, /* 0x 930 */
65, 83, 53, 48,192, 1, 0, 0, 78, 50, 68, 68, 69, 67, 53, 48, /* 0x 940 */
195, 1, 0, 0, 78, 50, 68, 83, 77, 65, 54, 48,204, 1, 0, 0, /* 0x 950 */
0, 0, 0, 0,216, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, /* 0x 960 */
0, 0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 48,216, 1, 0, 0, /* 0x 970 */
0, 0, 0, 0,227, 1, 0, 0, 78, 50, 68, 70, 65, 83, 54, 49, /* 0x 980 */
0, 0, 0, 0, 0, 0, 0, 0,241, 1, 0, 0, 78, 50, 68, 68, /* 0x 990 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 49, /* 0x 9a0 */
241, 1, 0, 0, 0, 0, 0, 0, 7, 2, 0, 0, 78, 50, 68, 68, /* 0x 9b0 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 54, 48, /* 0x 9c0 */
7, 2, 0, 0, 78, 82, 86, 50, 68, 69, 78, 68, 7, 2, 0, 0, /* 0x 9d0 */
78, 50, 69, 83, 77, 65, 49, 48, 7, 2, 0, 0, 0, 0, 0, 0, /* 0x 9e0 */
9, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 4, 0, 0, 0, /* 0x 9f0 */
78, 50, 69, 70, 65, 83, 49, 48, 10, 2, 0, 0, 0, 0, 0, 0, /* 0x a00 */
12, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 4, 0, 0, 0, /* 0x a10 */
78, 50, 69, 70, 65, 83, 49, 49, 12, 2, 0, 0, 78, 50, 69, 68, /* 0x a20 */
69, 67, 49, 48, 18, 2, 0, 0, 78, 50, 69, 83, 77, 65, 50, 48, /* 0x a30 */
29, 2, 0, 0, 0, 0, 0, 0, 31, 2, 0, 0, 78, 50, 69, 83, /* 0x a40 */
77, 65, 49, 48, 2, 0, 0, 0, 78, 50, 69, 70, 65, 83, 50, 48, /* 0x a50 */
34, 2, 0, 0, 0, 0, 0, 0, 38, 2, 0, 0, 78, 50, 69, 70, /* 0x a60 */
65, 83, 49, 49, 0, 0, 0, 0, 78, 50, 69, 68, 69, 67, 50, 48, /* 0x a70 */
43, 2, 0, 0, 78, 50, 69, 83, 77, 65, 51, 48, 56, 2, 0, 0, /* 0x a80 */
0, 0, 0, 0, 69, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x a90 */
31, 0, 0, 0, 78, 50, 69, 70, 65, 83, 51, 48, 69, 2, 0, 0, /* 0x aa0 */
0, 0, 0, 0, 75, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x ab0 */
31, 0, 0, 0, 0, 0, 0, 0, 84, 2, 0, 0, 78, 50, 69, 68, /* 0x ac0 */
69, 67, 51, 48, 31, 0, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x ad0 */
84, 2, 0, 0, 0, 0, 0, 0,100, 2, 0, 0, 78, 50, 69, 68, /* 0x ae0 */
69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0,115, 2, 0, 0, /* 0x af0 */
78, 50, 69, 68, 69, 67, 53, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x b00 */
133, 2, 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, 0, 0, 0, 0, /* 0x b10 */
78, 50, 69, 83, 77, 65, 52, 48,179, 2, 0, 0, 0, 0, 0, 0, /* 0x b20 */
192, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 82, 0, 0, 0, /* 0x b30 */
78, 50, 69, 70, 65, 83, 52, 48,192, 2, 0, 0, 0, 0, 0, 0, /* 0x b40 */
196, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 82, 0, 0, 0, /* 0x b50 */
0, 0, 0, 0,207, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x b60 */
82, 0, 0, 0, 78, 50, 69, 68, 85, 77, 77, 49,207, 2, 0, 0, /* 0x b70 */
78, 50, 69, 83, 77, 65, 53, 48,207, 2, 0, 0, 78, 50, 69, 70, /* 0x b80 */
65, 83, 53, 48,209, 2, 0, 0, 78, 50, 69, 68, 69, 67, 53, 48, /* 0x b90 */
212, 2, 0, 0, 78, 50, 69, 83, 77, 65, 54, 48,221, 2, 0, 0, /* 0x ba0 */
0, 0, 0, 0,233, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x bb0 */
0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, 48,233, 2, 0, 0, /* 0x bc0 */
0, 0, 0, 0,244, 2, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, /* 0x bd0 */
0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 78, 50, 69, 68, /* 0x be0 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, /* 0x bf0 */
2, 3, 0, 0, 0, 0, 0, 0, 24, 3, 0, 0, 78, 50, 69, 68, /* 0x c00 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, /* 0x c10 */
24, 3, 0, 0, 78, 82, 86, 50, 69, 69, 78, 68, 24, 3, 0, 0, /* 0x c20 */
67, 65, 76, 76, 84, 82, 48, 48, 24, 3, 0, 0, 67, 84, 67, 76, /* 0x c30 */
69, 86, 69, 49, 38, 3, 0, 0, 0, 0, 0, 0, 43, 3, 0, 0, /* 0x c40 */
67, 65, 76, 76, 84, 82, 48, 48, 5, 0, 0, 0, 67, 65, 76, 76, /* 0x c50 */
84, 82, 48, 49, 43, 3, 0, 0, 67, 84, 68, 85, 77, 77, 89, 49, /* 0x c60 */
48, 3, 0, 0, 67, 84, 66, 83, 72, 82, 48, 49, 48, 3, 0, 0, /* 0x c70 */
67, 84, 66, 82, 79, 82, 48, 49, 52, 3, 0, 0, 67, 84, 66, 83, /* 0x c80 */
87, 65, 48, 49, 54, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 50, /* 0x c90 */
59, 3, 0, 0, 0, 0, 0, 0, 73, 3, 0, 0, 67, 65, 76, 76, /* 0x ca0 */
84, 82, 48, 48, 10, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, /* 0x cb0 */
73, 3, 0, 0, 67, 65, 76, 76, 84, 82, 69, 56, 78, 3, 0, 0, /* 0x cc0 */
67, 65, 76, 76, 84, 82, 69, 57, 80, 3, 0, 0, 67, 65, 76, 76, /* 0x cd0 */
84, 82, 49, 49, 82, 3, 0, 0, 0, 0, 0, 0, 86, 3, 0, 0, /* 0x ce0 */
67, 65, 76, 76, 84, 82, 49, 51, 5, 0, 0, 0, 67, 84, 67, 76, /* 0x cf0 */
69, 86, 69, 50, 86, 3, 0, 0, 0, 0, 0, 0, 91, 3, 0, 0, /* 0x d00 */
67, 65, 76, 76, 84, 82, 49, 49, 0, 0, 0, 0, 67, 65, 76, 76, /* 0x d10 */
84, 82, 49, 50, 91, 3, 0, 0, 67, 84, 68, 85, 77, 77, 89, 50, /* 0x d20 */
93, 3, 0, 0, 67, 84, 66, 83, 72, 82, 49, 49, 93, 3, 0, 0, /* 0x d30 */
67, 84, 66, 82, 79, 82, 49, 49, 97, 3, 0, 0, 67, 84, 66, 83, /* 0x d40 */
87, 65, 49, 49, 99, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, /* 0x d50 */
104, 3, 0, 0, 0, 0, 0, 0,109, 3, 0, 0, 67, 65, 76, 76, /* 0x d60 */
84, 82, 49, 48, 5, 0, 0, 0, 67, 84, 84, 72, 69, 69, 78, 68, /* 0x d70 */
109, 3, 0, 0, 76, 69, 88, 69, 67, 48, 49, 53,109, 3, 0, 0, /* 0x d80 */
76, 88, 85, 78, 70, 48, 48, 48,139, 3, 0, 0, 0, 0, 0, 0, /* 0x d90 */
141, 3, 0, 0, 76, 88, 85, 78, 70, 48, 49, 48, 5, 0, 0, 0, /* 0x da0 */
76, 88, 85, 78, 70, 48, 48, 50,141, 3, 0, 0, 77, 82, 85, 66, /* 0x db0 */
89, 84, 69, 48,146, 3, 0, 0, 76, 88, 77, 82, 85, 48, 48, 53, /* 0x dc0 */
148, 3, 0, 0, 76, 88, 77, 82, 85, 48, 48, 54,153, 3, 0, 0, /* 0x dd0 */
76, 88, 77, 82, 85, 48, 48, 55,160, 3, 0, 0, 76, 88, 85, 78, /* 0x de0 */
70, 48, 48, 56,167, 3, 0, 0, 76, 88, 85, 78, 70, 48, 49, 48, /* 0x df0 */
171, 3, 0, 0, 0, 0, 0, 0,176, 3, 0, 0, 76, 88, 85, 78, /* 0x e00 */
70, 48, 52, 50, 0, 0, 0, 0, 76, 88, 74, 67, 67, 48, 49, 48, /* 0x e10 */
176, 3, 0, 0, 76, 88, 77, 82, 85, 48, 52, 53,179, 3, 0, 0, /* 0x e20 */
76, 88, 77, 82, 85, 48, 52, 54,182, 3, 0, 0, 76, 88, 74, 67, /* 0x e30 */
67, 48, 50, 48,184, 3, 0, 0, 0, 0, 0, 0,186, 3, 0, 0, /* 0x e40 */
76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 76, 88, 74, 67, /* 0x e50 */
67, 48, 50, 49,186, 3, 0, 0, 0, 0, 0, 0,191, 3, 0, 0, /* 0x e60 */
76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 76, 88, 74, 67, /* 0x e70 */
67, 48, 50, 51,191, 3, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, /* 0x e80 */
198, 3, 0, 0, 76, 88, 85, 78, 70, 51, 56, 54,200, 3, 0, 0, /* 0x e90 */
76, 88, 85, 78, 70, 51, 56, 55,201, 3, 0, 0, 76, 88, 85, 78, /* 0x ea0 */
70, 51, 56, 56,210, 3, 0, 0, 0, 0, 0, 0,213, 3, 0, 0, /* 0x eb0 */
76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, 76, 88, 85, 78, /* 0x ec0 */
70, 52, 56, 54,213, 3, 0, 0, 76, 88, 85, 78, 70, 52, 56, 55, /* 0x ed0 */
217, 3, 0, 0, 0, 0, 0, 0,219, 3, 0, 0, 76, 88, 85, 78, /* 0x ee0 */
70, 48, 52, 48, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 54, 53, /* 0x ef0 */
219, 3, 0, 0, 0, 0, 0, 0,223, 3, 0, 0, 76, 88, 77, 82, /* 0x f00 */
85, 48, 55, 48, 5, 0, 0, 0, 77, 82, 85, 66, 89, 84, 69, 51, /* 0x f10 */
223, 3, 0, 0, 77, 82, 85, 65, 82, 66, 51, 48,225, 3, 0, 0, /* 0x f20 */
77, 82, 85, 66, 73, 84, 83, 51,226, 3, 0, 0, 77, 82, 85, 65, /* 0x f30 */
82, 66, 52, 48,228, 3, 0, 0, 76, 88, 77, 82, 85, 48, 55, 48, /* 0x f40 */
232, 3, 0, 0, 0, 0, 0, 0,237, 3, 0, 0, 76, 88, 85, 78, /* 0x f50 */
70, 48, 52, 48, 0, 0, 0, 0, 77, 82, 85, 66, 89, 84, 69, 52, /* 0x f60 */
240, 3, 0, 0, 77, 82, 85, 66, 73, 84, 83, 52,243, 3, 0, 0, /* 0x f70 */
77, 82, 85, 65, 82, 66, 53, 48,245, 3, 0, 0, 76, 88, 77, 82, /* 0x f80 */
85, 48, 56, 48,251, 3, 0, 0, 77, 82, 85, 66, 89, 84, 69, 53, /* 0x f90 */
254, 3, 0, 0, 77, 82, 85, 65, 82, 66, 54, 48, 0, 4, 0, 0, /* 0x fa0 */
77, 82, 85, 66, 73, 84, 83, 53, 1, 4, 0, 0, 77, 82, 85, 65, /* 0x fb0 */
82, 66, 55, 48, 3, 4, 0, 0, 76, 88, 77, 82, 85, 48, 57, 48, /* 0x fc0 */
7, 4, 0, 0, 0, 0, 0, 0, 14, 4, 0, 0, 76, 88, 77, 82, /* 0x fd0 */
85, 49, 48, 48, 10, 0, 0, 0, 77, 82, 85, 66, 89, 84, 69, 54, /* 0x fe0 */
18, 4, 0, 0, 77, 82, 85, 65, 82, 66, 56, 48, 20, 4, 0, 0, /* 0x ff0 */
77, 82, 85, 66, 73, 84, 83, 54, 21, 4, 0, 0, 77, 82, 85, 65, /* 0x1000 */
82, 66, 57, 48, 23, 4, 0, 0, 76, 88, 77, 82, 85, 49, 48, 48, /* 0x1010 */
27, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, 43, 4, 0, 0, /* 0x1020 */
76, 88, 77, 82, 85, 49, 49, 48, 48, 4, 0, 0, 76, 88, 77, 82, /* 0x1030 */
85, 49, 49, 49, 51, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 49, /* 0x1040 */
53, 4, 0, 0, 0, 0, 0, 0, 60, 4, 0, 0, 76, 88, 85, 78, /* 0x1050 */
70, 48, 51, 52, 0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, /* 0x1060 */
60, 4, 0, 0, 76, 69, 88, 69, 67, 48, 49, 54, 60, 4, 0, 0, /* 0x1070 */
0, 0, 0, 0, 62, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, /* 0x1080 */
0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 49, 48, 62, 4, 0, 0, /* 0x1090 */
76, 88, 74, 77, 80, 65, 48, 48, 63, 4, 0, 0, 76, 88, 67, 65, /* 0x10a0 */
76, 76, 66, 48, 65, 4, 0, 0, 76, 88, 85, 78, 70, 48, 50, 49, /* 0x10b0 */
67, 4, 0, 0, 76, 88, 77, 82, 85, 48, 50, 50, 73, 4, 0, 0, /* 0x10c0 */
76, 88, 74, 77, 80, 65, 48, 49, 76, 4, 0, 0, 76, 88, 67, 65, /* 0x10d0 */
76, 76, 66, 49, 78, 4, 0, 0, 77, 82, 85, 66, 73, 84, 83, 49, /* 0x10e0 */
80, 4, 0, 0, 76, 88, 77, 82, 85, 48, 51, 48, 81, 4, 0, 0, /* 0x10f0 */
77, 82, 85, 66, 89, 84, 69, 49, 83, 4, 0, 0, 77, 82, 85, 65, /* 0x1100 */
82, 66, 49, 48, 85, 4, 0, 0, 76, 88, 77, 82, 85, 48, 52, 48, /* 0x1110 */
86, 4, 0, 0, 0, 0, 0, 0, 88, 4, 0, 0, 76, 88, 77, 82, /* 0x1120 */
85, 48, 51, 48, 0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 51, 48, /* 0x1130 */
88, 4, 0, 0, 76, 88, 74, 67, 67, 48, 48, 48, 94, 4, 0, 0, /* 0x1140 */
0, 0, 0, 0,102, 4, 0, 0, 76, 88, 74, 67, 67, 48, 49, 48, /* 0x1150 */
0, 0, 0, 0, 76, 88, 67, 74, 48, 77, 82, 85,102, 4, 0, 0, /* 0x1160 */
76, 88, 67, 74, 49, 77, 82, 85,104, 4, 0, 0, 76, 88, 67, 65, /* 0x1170 */
76, 74, 77, 80,107, 4, 0, 0, 76, 88, 67, 65, 76, 76, 48, 48, /* 0x1180 */
110, 4, 0, 0, 0, 0, 0, 0,112, 4, 0, 0, 76, 88, 85, 78, /* 0x1190 */
70, 48, 51, 55, 0, 0, 0, 0, 76, 88, 67, 65, 76, 76, 48, 49, /* 0x11a0 */
112, 4, 0, 0, 76, 88, 67, 74, 50, 77, 82, 85,115, 4, 0, 0, /* 0x11b0 */
0, 0, 0, 0,117, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, /* 0x11c0 */
0, 0, 0, 0, 76, 88, 67, 74, 52, 77, 82, 85,117, 4, 0, 0, /* 0x11d0 */
0, 0, 0, 0,119, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, /* 0x11e0 */
0, 0, 0, 0, 76, 88, 67, 74, 54, 77, 82, 85,119, 4, 0, 0, /* 0x11f0 */
0, 0, 0, 0,121, 4, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, /* 0x1200 */
1, 0, 0, 0, 76, 88, 67, 74, 55, 77, 82, 85,121, 4, 0, 0, /* 0x1210 */
0, 0, 0, 0,123, 4, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, /* 0x1220 */
1, 0, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85,123, 4, 0, 0, /* 0x1230 */
0, 0, 0, 0,126, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, /* 0x1240 */
0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52,126, 4, 0, 0, /* 0x1250 */
0, 0, 0, 0,131, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 48, /* 0x1260 */
0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 53, 53,131, 4, 0, 0, /* 0x1270 */
77, 82, 85, 66, 89, 84, 69, 50,133, 4, 0, 0, 77, 82, 85, 66, /* 0x1280 */
73, 84, 83, 50,138, 4, 0, 0, 77, 82, 85, 65, 82, 66, 50, 48, /* 0x1290 */
143, 4, 0, 0, 76, 88, 77, 82, 85, 48, 53, 55,148, 4, 0, 0, /* 0x12a0 */
76, 88, 77, 82, 85, 48, 53, 56,154, 4, 0, 0, 76, 88, 85, 78, /* 0x12b0 */
70, 48, 51, 53,155, 4, 0, 0, 67, 75, 76, 76, 84, 82, 48, 48, /* 0x12c0 */
161, 4, 0, 0, 0, 0, 0, 0,165, 4, 0, 0, 67, 75, 76, 76, /* 0x12d0 */
84, 82, 50, 48, 30, 0, 0, 0, 67, 75, 76, 76, 84, 82, 49, 48, /* 0x12e0 */
170, 4, 0, 0, 0, 0, 0, 0,184, 4, 0, 0, 67, 75, 76, 76, /* 0x12f0 */
84, 82, 50, 48, 6, 0, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, /* 0x1300 */
184, 4, 0, 0, 0, 0, 0, 0,190, 4, 0, 0, 67, 75, 76, 76, /* 0x1310 */
84, 82, 52, 48, 0, 0, 0, 0, 0, 0, 0, 0,194, 4, 0, 0, /* 0x1320 */
67, 75, 76, 76, 84, 82, 52, 48, 0, 0, 0, 0, 67, 75, 76, 76, /* 0x1330 */
84, 82, 51, 48,217, 4, 0, 0, 0, 0, 0, 0,224, 4, 0, 0, /* 0x1340 */
67, 75, 76, 76, 84, 82, 49, 48, 14, 0, 0, 0, 67, 75, 76, 76, /* 0x1350 */
84, 82, 52, 48,224, 4, 0, 0, 0, 0, 0, 0,229, 4, 0, 0, /* 0x1360 */
67, 75, 76, 76, 84, 82, 48, 48, 4, 0, 0, 0, 76, 69, 88, 69, /* 0x1370 */
67, 48, 49, 55,229, 4, 0, 0, 76, 69, 88, 69, 67, 48, 50, 48, /* 0x1380 */
231, 4, 0, 0, 88, 84, 72, 69, 69, 78, 68, 88, 26, 5, 0, 0, /* 0x1390 */
255,255,255,255, 26, 5 /* 0x13a0 */
};
+350
View File
@@ -0,0 +1,350 @@
/* l_lx_exec86.h -- created from l_lx_exec86.bin, 5066 (0x13ca) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define LINUX_I386EXEC_LOADER_ADLER32 0xa3c2c7ad
#define LINUX_I386EXEC_LOADER_CRC32 0x17ee05c7
unsigned char linux_i386exec_loader[5066] = {
232, 0, 0, 0, 0,184, 78, 77, 82, 85, 96,106, 63,139,116, 36, /* 0x 0 */
40,139,124, 36, 48,131,205,255,235, 0,164,235, 0,138, 6, 70, /* 0x 10 */
136, 7, 71, 1,219,117, 7,139, 30,131,238,252, 17,219,114, 0, /* 0x 20 */
49,192, 64,138, 7,114, 0,184, 1, 0, 0, 0, 1,219,117, 7, /* 0x 30 */
139, 30,131,238,252, 17,219, 17,192, 1,219,117, 7,139, 30,131, /* 0x 40 */
238,252, 17,219,115, 0, 1,219,115, 0,117, 9,139, 30,131,238, /* 0x 50 */
252, 17,219,115, 0, 49,201,131,232, 3,114, 13,193,224, 8,138, /* 0x 60 */
6, 70,131,240,255,116, 0,137,197, 1,219,117, 7,139, 30,131, /* 0x 70 */
238,252, 17,219, 17,201, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 80 */
219, 17,201,117, 0, 65, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 90 */
219, 17,201, 1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, /* 0x a0 */
1,219,115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, 65, /* 0x b0 */
65,131,193, 2,129,253, 0,243,255,255,131,209, 1, 86,141, 52, /* 0x c0 */
47,243,164, 94,233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, /* 0x d0 */
4, 15,118, 0,138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, /* 0x e0 */
0, 0,139, 2,131,194, 4,137, 7,131,199, 4,131,233, 4,119, /* 0x f0 */
241, 1,207,233, 0, 0, 0, 0,235, 0,164,235, 0,138, 6, 70, /* 0x 100 */
136, 7, 71, 1,219,117, 7,139, 30,131,238,252, 17,219,114, 0, /* 0x 110 */
49,192, 64,138, 7,114, 0,184, 1, 0, 0, 0, 1,219,117, 7, /* 0x 120 */
139, 30,131,238,252, 17,219, 17,192, 1,219,117, 7,139, 30,131, /* 0x 130 */
238,252, 17,219,114, 0, 1,219,115, 11,117, 0,139, 30,131,238, /* 0x 140 */
252, 17,219,114, 0, 72, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 150 */
219, 17,192,235, 0, 49,201,131,232, 3,114, 17,193,224, 8,138, /* 0x 160 */
6, 70,131,240,255,116, 0,209,248,137,197,235, 11, 1,219,117, /* 0x 170 */
7,139, 30,131,238,252, 17,219, 17,201, 1,219,117, 7,139, 30, /* 0x 180 */
131,238,252, 17,219, 17,201,117, 0, 65, 1,219,117, 7,139, 30, /* 0x 190 */
131,238,252, 17,219, 17,201, 1,219,117, 7,139, 30,131,238,252, /* 0x 1a0 */
17,219,115, 0, 1,219,115, 0,117, 9,139, 30,131,238,252, 17, /* 0x 1b0 */
219,115, 0, 65, 65,131,193, 2,129,253, 0,251,255,255,131,209, /* 0x 1c0 */
1, 86,141, 52, 47,243,164, 94,233, 0, 0, 0, 0,141, 20, 47, /* 0x 1d0 */
131,253,252,138, 4, 15,118, 0,138, 2, 66,136, 7, 71, 73,117, /* 0x 1e0 */
247,233, 0, 0, 0, 0,139, 2,131,194, 4,137, 7,131,199, 4, /* 0x 1f0 */
131,233, 4,119,241, 1,207,233, 0, 0, 0, 0,235, 0,164,235, /* 0x 200 */
0,138, 6, 70,136, 7, 71, 1,219,117, 7,139, 30,131,238,252, /* 0x 210 */
17,219,114, 0, 49,192, 64,138, 7,114, 0,184, 1, 0, 0, 0, /* 0x 220 */
1,219,117, 7,139, 30,131,238,252, 17,219, 17,192, 1,219,117, /* 0x 230 */
7,139, 30,131,238,252, 17,219,114, 0, 1,219,115, 11,117, 0, /* 0x 240 */
139, 30,131,238,252, 17,219,114, 0, 72, 1,219,117, 7,139, 30, /* 0x 250 */
131,238,252, 17,219, 17,192,235, 0, 1,219,117, 7,139, 30,131, /* 0x 260 */
238,252, 17,219, 17,201,235, 0, 49,201,131,232, 3,114, 17,193, /* 0x 270 */
224, 8,138, 6, 70,131,240,255,116, 0,209,248,137,197,235, 11, /* 0x 280 */
1,219,117, 7,139, 30,131,238,252, 17,219,114,204, 65, 1,219, /* 0x 290 */
117, 7,139, 30,131,238,252, 17,219,114,190, 1,219,117, 7,139, /* 0x 2a0 */
30,131,238,252, 17,219, 17,201, 1,219,117, 7,139, 30,131,238, /* 0x 2b0 */
252, 17,219,115, 0, 1,219,115, 0,117, 9,139, 30,131,238,252, /* 0x 2c0 */
17,219,115, 0, 65, 65,131,193, 2,129,253, 0,251,255,255,131, /* 0x 2d0 */
209, 2, 86,141, 52, 47,243,164, 94,233, 0, 0, 0, 0,141, 20, /* 0x 2e0 */
47,131,253,252,138, 4, 15,118, 0,138, 2, 66,136, 7, 71, 73, /* 0x 2f0 */
117,247,233, 0, 0, 0, 0,139, 2,131,194, 4,137, 7,131,199, /* 0x 300 */
4,131,233, 4,119,241, 1,207,233, 0, 0, 0, 0,185, 84, 69, /* 0x 310 */
88, 76,138, 7, 71, 44,232, 60, 1,119,247,128, 63, 63,117, 0, /* 0x 320 */
139, 7,138, 95, 4,102,193,232, 8,134,196,193,192, 16,134,196, /* 0x 330 */
41,248,128,235,232,137, 7,131,199, 5,136,216,226, 0,185, 84, /* 0x 340 */
69, 88, 76,176,232,176,233,242,174,117, 0,128, 63, 63,117, 0, /* 0x 350 */
139, 7,102,193,232, 8,134,196,193,192, 16,134,196, 41,248,171, /* 0x 360 */
235, 0,139, 84, 36, 40, 3, 84, 36, 44, 57,242,116, 1, 72,135, /* 0x 370 */
68, 36, 32,139, 84, 36, 52,137,249,139,124, 36, 48, 41,249,137, /* 0x 380 */
10, 90, 87,106, 15, 91,136,215,147,235, 0, 90, 88, 89,151, 96, /* 0x 390 */
49,219,187, 78, 77, 82, 85,106, 15, 88,138,100, 36, 32,106, 15, /* 0x 3a0 */
91,138,124, 36, 32,138, 84, 36, 32,233, 0, 0, 0, 0, 15,183, /* 0x 3b0 */
47, 43,110, 12, 41,221,117, 0,131,237, 1,115, 0,136, 95,255, /* 0x 3c0 */
73,136, 7, 71,139, 7,156,102,193,232, 8,193,192, 16,134,196, /* 0x 3d0 */
157,115, 0,176, 0, 15,200,115, 0,209,232,115, 0,254,203, 75, /* 0x 3e0 */
35, 30,125, 2, 3, 30,137, 4,156,235, 0,141, 20, 24, 15,182, /* 0x 3f0 */
210, 35, 22, 59, 22,114, 2, 43, 22,139, 4,148,254,203, 75, 35, /* 0x 400 */
30,125, 2, 3, 30,139, 44,156,133,237,117, 0, 80,139, 70, 4, /* 0x 410 */
254,200, 72, 35, 6,125, 2, 3, 6, 49,237,137, 70, 4,135,108, /* 0x 420 */
132, 4, 88,137, 44,148,137, 4,156, 41,248,131,233, 4, 3, 70, /* 0x 430 */
16, 1,240,137, 7,131,199, 4,235, 0,235, 0, 80,176,233,176, /* 0x 440 */
232, 80,106, 0, 83,137,230, 94,137,218,178,233,178,232, 67,106, /* 0x 450 */
0,254,203, 75,117, 0, 15,183, 7,131,199, 1, 60,128,114, 4, /* 0x 460 */
60,143,118, 0, 41,208, 43, 70, 8,131,232, 2,116, 0,131,232, /* 0x 470 */
1,114, 0,115, 0,122, 0,123, 0,248,235, 0,131,233, 1,127, /* 0x 480 */
0,137,231,185, 4, 1, 0, 0,139, 14,131,193, 5,139, 14,131, /* 0x 490 */
193, 4, 49,192,243,171,137,252, 86, 97,151, 81, 80, 82,195,137, /* 0x 4a0 */
254,235, 0,138, 7,131,199, 1, 60,128,114, 10, 60,143,119, 6, /* 0x 4b0 */
128,127,254, 15,116, 0, 44,232, 60, 1,119, 0, 56, 23,117, 0, /* 0x 4c0 */
139, 7,102,193,232, 8,193,192, 16,134,196, 41,248, 1,240,137, /* 0x 4d0 */
7,131,199, 4,131,233, 4,138, 7,131,199, 1,226, 0,131,233, /* 0x 4e0 */
1,127, 0, 97,195, 94,252,173, 80, 84,184, 0, 0, 64, 0, 80, /* 0x 4f0 */
49,201, 81, 81,181, 16,106, 50,106, 7, 81, 80,137,227,106, 90, /* 0x 500 */
88,205,128,147,183, 16,131,196, 24,173, 80,173, 86,255,213, 88, /* 0x 510 */
88,195, 93,232,205,255,255,255, 76, 69, 88, 69, 67, 48, 48, 48, /* 0x 520 */
0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 76, 69, 88, 69, /* 0x 530 */
67, 48, 50, 48, 45, 0, 0, 0, 76, 69, 88, 69, 67, 48, 48, 57, /* 0x 540 */
5, 0, 0, 0, 76, 69, 88, 69, 67, 48, 49, 48, 10, 0, 0, 0, /* 0x 550 */
78, 50, 66, 83, 77, 65, 49, 48, 24, 0, 0, 0, 0, 0, 0, 0, /* 0x 560 */
26, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 4, 0, 0, 0, /* 0x 570 */
78, 50, 66, 70, 65, 83, 49, 48, 27, 0, 0, 0, 0, 0, 0, 0, /* 0x 580 */
29, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 4, 0, 0, 0, /* 0x 590 */
78, 50, 66, 70, 65, 83, 49, 49, 29, 0, 0, 0, 78, 50, 66, 68, /* 0x 5a0 */
69, 67, 49, 48, 35, 0, 0, 0, 78, 50, 66, 83, 77, 65, 50, 48, /* 0x 5b0 */
46, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 78, 50, 66, 83, /* 0x 5c0 */
77, 65, 49, 48, 2, 0, 0, 0, 78, 50, 66, 70, 65, 83, 50, 48, /* 0x 5d0 */
51, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 78, 50, 66, 70, /* 0x 5e0 */
65, 83, 49, 49, 0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, /* 0x 5f0 */
60, 0, 0, 0, 78, 50, 66, 83, 77, 65, 51, 48, 73, 0, 0, 0, /* 0x 600 */
0, 0, 0, 0, 86, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, /* 0x 610 */
0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 51, 48, 86, 0, 0, 0, /* 0x 620 */
0, 0, 0, 0, 90, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, /* 0x 630 */
0, 0, 0, 0, 0, 0, 0, 0,101, 0, 0, 0, 78, 50, 66, 68, /* 0x 640 */
69, 67, 50, 48, 0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, /* 0x 650 */
101, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 78, 50, 66, 68, /* 0x 660 */
69, 67, 54, 48, 0, 0, 0, 0, 0, 0, 0, 0,149, 0, 0, 0, /* 0x 670 */
78, 50, 66, 68, 69, 67, 53, 48, 0, 0, 0, 0, 78, 50, 66, 83, /* 0x 680 */
77, 65, 52, 48,163, 0, 0, 0, 0, 0, 0, 0,176, 0, 0, 0, /* 0x 690 */
78, 50, 66, 68, 69, 67, 51, 48, 49, 0, 0, 0, 78, 50, 66, 70, /* 0x 6a0 */
65, 83, 52, 48,176, 0, 0, 0, 0, 0, 0, 0,180, 0, 0, 0, /* 0x 6b0 */
78, 50, 66, 68, 69, 67, 51, 48, 49, 0, 0, 0, 0, 0, 0, 0, /* 0x 6c0 */
191, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 49, 0, 0, 0, /* 0x 6d0 */
78, 50, 66, 68, 85, 77, 77, 49,191, 0, 0, 0, 78, 50, 66, 83, /* 0x 6e0 */
77, 65, 53, 48,191, 0, 0, 0, 78, 50, 66, 70, 65, 83, 53, 48, /* 0x 6f0 */
193, 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48,196, 0, 0, 0, /* 0x 700 */
78, 50, 66, 83, 77, 65, 54, 48,205, 0, 0, 0, 0, 0, 0, 0, /* 0x 710 */
217, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x 720 */
78, 50, 66, 70, 65, 83, 54, 48,217, 0, 0, 0, 0, 0, 0, 0, /* 0x 730 */
228, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 49, 0, 0, 0, 0, /* 0x 740 */
0, 0, 0, 0,242, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, /* 0x 750 */
0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 49,242, 0, 0, 0, /* 0x 760 */
0, 0, 0, 0, 8, 1, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, /* 0x 770 */
0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 54, 48, 8, 1, 0, 0, /* 0x 780 */
78, 82, 86, 50, 66, 69, 78, 68, 8, 1, 0, 0, 78, 50, 68, 83, /* 0x 790 */
77, 65, 49, 48, 8, 1, 0, 0, 0, 0, 0, 0, 10, 1, 0, 0, /* 0x 7a0 */
78, 50, 68, 68, 69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 68, 70, /* 0x 7b0 */
65, 83, 49, 48, 11, 1, 0, 0, 0, 0, 0, 0, 13, 1, 0, 0, /* 0x 7c0 */
78, 50, 68, 68, 69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 68, 70, /* 0x 7d0 */
65, 83, 49, 49, 13, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, /* 0x 7e0 */
19, 1, 0, 0, 78, 50, 68, 83, 77, 65, 50, 48, 30, 1, 0, 0, /* 0x 7f0 */
0, 0, 0, 0, 32, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, 48, /* 0x 800 */
2, 0, 0, 0, 78, 50, 68, 70, 65, 83, 50, 48, 35, 1, 0, 0, /* 0x 810 */
0, 0, 0, 0, 39, 1, 0, 0, 78, 50, 68, 70, 65, 83, 49, 49, /* 0x 820 */
0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, 44, 1, 0, 0, /* 0x 830 */
78, 50, 68, 83, 77, 65, 51, 48, 57, 1, 0, 0, 0, 0, 0, 0, /* 0x 840 */
70, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 16, 0, 0, 0, /* 0x 850 */
78, 50, 68, 70, 65, 83, 51, 48, 70, 1, 0, 0, 0, 0, 0, 0, /* 0x 860 */
76, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 16, 0, 0, 0, /* 0x 870 */
0, 0, 0, 0, 85, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 880 */
16, 0, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 85, 1, 0, 0, /* 0x 890 */
0, 0, 0, 0,101, 1, 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, /* 0x 8a0 */
0, 0, 0, 0, 0, 0, 0, 0,119, 1, 0, 0, 78, 50, 68, 68, /* 0x 8b0 */
69, 67, 54, 48, 0, 0, 0, 0, 0, 0, 0, 0,153, 1, 0, 0, /* 0x 8c0 */
78, 50, 68, 68, 69, 67, 53, 48, 0, 0, 0, 0, 78, 50, 68, 83, /* 0x 8d0 */
77, 65, 52, 48,167, 1, 0, 0, 0, 0, 0, 0,180, 1, 0, 0, /* 0x 8e0 */
78, 50, 68, 68, 69, 67, 51, 48, 69, 0, 0, 0, 78, 50, 68, 70, /* 0x 8f0 */
65, 83, 52, 48,180, 1, 0, 0, 0, 0, 0, 0,184, 1, 0, 0, /* 0x 900 */
78, 50, 68, 68, 69, 67, 51, 48, 69, 0, 0, 0, 0, 0, 0, 0, /* 0x 910 */
195, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 69, 0, 0, 0, /* 0x 920 */
78, 50, 68, 68, 85, 77, 77, 49,195, 1, 0, 0, 78, 50, 68, 83, /* 0x 930 */
77, 65, 53, 48,195, 1, 0, 0, 78, 50, 68, 70, 65, 83, 53, 48, /* 0x 940 */
197, 1, 0, 0, 78, 50, 68, 68, 69, 67, 53, 48,200, 1, 0, 0, /* 0x 950 */
78, 50, 68, 83, 77, 65, 54, 48,209, 1, 0, 0, 0, 0, 0, 0, /* 0x 960 */
221, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x 970 */
78, 50, 68, 70, 65, 83, 54, 48,221, 1, 0, 0, 0, 0, 0, 0, /* 0x 980 */
232, 1, 0, 0, 78, 50, 68, 70, 65, 83, 54, 49, 0, 0, 0, 0, /* 0x 990 */
0, 0, 0, 0,246, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, /* 0x 9a0 */
0, 0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 49,246, 1, 0, 0, /* 0x 9b0 */
0, 0, 0, 0, 12, 2, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, /* 0x 9c0 */
0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 54, 48, 12, 2, 0, 0, /* 0x 9d0 */
78, 82, 86, 50, 68, 69, 78, 68, 12, 2, 0, 0, 78, 50, 69, 83, /* 0x 9e0 */
77, 65, 49, 48, 12, 2, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, /* 0x 9f0 */
78, 50, 69, 68, 69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 69, 70, /* 0x a00 */
65, 83, 49, 48, 15, 2, 0, 0, 0, 0, 0, 0, 17, 2, 0, 0, /* 0x a10 */
78, 50, 69, 68, 69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 69, 70, /* 0x a20 */
65, 83, 49, 49, 17, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x a30 */
23, 2, 0, 0, 78, 50, 69, 83, 77, 65, 50, 48, 34, 2, 0, 0, /* 0x a40 */
0, 0, 0, 0, 36, 2, 0, 0, 78, 50, 69, 83, 77, 65, 49, 48, /* 0x a50 */
2, 0, 0, 0, 78, 50, 69, 70, 65, 83, 50, 48, 39, 2, 0, 0, /* 0x a60 */
0, 0, 0, 0, 43, 2, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, /* 0x a70 */
0, 0, 0, 0, 78, 50, 69, 68, 69, 67, 50, 48, 48, 2, 0, 0, /* 0x a80 */
78, 50, 69, 83, 77, 65, 51, 48, 61, 2, 0, 0, 0, 0, 0, 0, /* 0x a90 */
74, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 31, 0, 0, 0, /* 0x aa0 */
78, 50, 69, 70, 65, 83, 51, 48, 74, 2, 0, 0, 0, 0, 0, 0, /* 0x ab0 */
80, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 31, 0, 0, 0, /* 0x ac0 */
0, 0, 0, 0, 89, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x ad0 */
31, 0, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 89, 2, 0, 0, /* 0x ae0 */
0, 0, 0, 0,105, 2, 0, 0, 78, 50, 69, 68, 69, 67, 50, 48, /* 0x af0 */
0, 0, 0, 0, 0, 0, 0, 0,120, 2, 0, 0, 78, 50, 69, 68, /* 0x b00 */
69, 67, 53, 48, 0, 0, 0, 0, 0, 0, 0, 0,138, 2, 0, 0, /* 0x b10 */
78, 50, 69, 68, 69, 67, 54, 48, 0, 0, 0, 0, 78, 50, 69, 83, /* 0x b20 */
77, 65, 52, 48,184, 2, 0, 0, 0, 0, 0, 0,197, 2, 0, 0, /* 0x b30 */
78, 50, 69, 68, 69, 67, 51, 48, 82, 0, 0, 0, 78, 50, 69, 70, /* 0x b40 */
65, 83, 52, 48,197, 2, 0, 0, 0, 0, 0, 0,201, 2, 0, 0, /* 0x b50 */
78, 50, 69, 68, 69, 67, 51, 48, 82, 0, 0, 0, 0, 0, 0, 0, /* 0x b60 */
212, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 82, 0, 0, 0, /* 0x b70 */
78, 50, 69, 68, 85, 77, 77, 49,212, 2, 0, 0, 78, 50, 69, 83, /* 0x b80 */
77, 65, 53, 48,212, 2, 0, 0, 78, 50, 69, 70, 65, 83, 53, 48, /* 0x b90 */
214, 2, 0, 0, 78, 50, 69, 68, 69, 67, 53, 48,217, 2, 0, 0, /* 0x ba0 */
78, 50, 69, 83, 77, 65, 54, 48,226, 2, 0, 0, 0, 0, 0, 0, /* 0x bb0 */
238, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x bc0 */
78, 50, 69, 70, 65, 83, 54, 48,238, 2, 0, 0, 0, 0, 0, 0, /* 0x bd0 */
249, 2, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, 0, 0, 0, 0, /* 0x be0 */
0, 0, 0, 0, 7, 3, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x bf0 */
0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, 7, 3, 0, 0, /* 0x c00 */
0, 0, 0, 0, 29, 3, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x c10 */
0, 0, 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, 29, 3, 0, 0, /* 0x c20 */
78, 82, 86, 50, 69, 69, 78, 68, 29, 3, 0, 0, 67, 65, 76, 76, /* 0x c30 */
84, 82, 48, 48, 29, 3, 0, 0, 67, 84, 67, 76, 69, 86, 69, 49, /* 0x c40 */
43, 3, 0, 0, 0, 0, 0, 0, 48, 3, 0, 0, 67, 65, 76, 76, /* 0x c50 */
84, 82, 48, 48, 5, 0, 0, 0, 67, 65, 76, 76, 84, 82, 48, 49, /* 0x c60 */
48, 3, 0, 0, 67, 84, 68, 85, 77, 77, 89, 49, 53, 3, 0, 0, /* 0x c70 */
67, 84, 66, 83, 72, 82, 48, 49, 53, 3, 0, 0, 67, 84, 66, 82, /* 0x c80 */
79, 82, 48, 49, 57, 3, 0, 0, 67, 84, 66, 83, 87, 65, 48, 49, /* 0x c90 */
59, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 50, 64, 3, 0, 0, /* 0x ca0 */
0, 0, 0, 0, 78, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, /* 0x cb0 */
10, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, 78, 3, 0, 0, /* 0x cc0 */
67, 65, 76, 76, 84, 82, 69, 56, 83, 3, 0, 0, 67, 65, 76, 76, /* 0x cd0 */
84, 82, 69, 57, 85, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 49, /* 0x ce0 */
87, 3, 0, 0, 0, 0, 0, 0, 91, 3, 0, 0, 67, 65, 76, 76, /* 0x cf0 */
84, 82, 49, 51, 5, 0, 0, 0, 67, 84, 67, 76, 69, 86, 69, 50, /* 0x d00 */
91, 3, 0, 0, 0, 0, 0, 0, 96, 3, 0, 0, 67, 65, 76, 76, /* 0x d10 */
84, 82, 49, 49, 0, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 50, /* 0x d20 */
96, 3, 0, 0, 67, 84, 68, 85, 77, 77, 89, 50, 98, 3, 0, 0, /* 0x d30 */
67, 84, 66, 83, 72, 82, 49, 49, 98, 3, 0, 0, 67, 84, 66, 82, /* 0x d40 */
79, 82, 49, 49,102, 3, 0, 0, 67, 84, 66, 83, 87, 65, 49, 49, /* 0x d50 */
104, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51,109, 3, 0, 0, /* 0x d60 */
0, 0, 0, 0,114, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, /* 0x d70 */
5, 0, 0, 0, 67, 84, 84, 72, 69, 69, 78, 68,114, 3, 0, 0, /* 0x d80 */
76, 69, 88, 69, 67, 48, 49, 53,114, 3, 0, 0, 76, 69, 88, 69, /* 0x d90 */
67, 49, 49, 48,146, 3, 0, 0, 76, 69, 88, 69, 67, 49, 48, 48, /* 0x da0 */
152, 3, 0, 0, 76, 88, 85, 78, 70, 48, 48, 48,153, 3, 0, 0, /* 0x db0 */
0, 0, 0, 0,155, 3, 0, 0, 76, 88, 85, 78, 70, 48, 49, 48, /* 0x dc0 */
5, 0, 0, 0, 76, 88, 85, 78, 70, 48, 48, 50,155, 3, 0, 0, /* 0x dd0 */
77, 82, 85, 66, 89, 84, 69, 48,160, 3, 0, 0, 76, 88, 77, 82, /* 0x de0 */
85, 48, 48, 53,162, 3, 0, 0, 76, 88, 77, 82, 85, 48, 48, 54, /* 0x df0 */
167, 3, 0, 0, 76, 88, 77, 82, 85, 48, 48, 55,174, 3, 0, 0, /* 0x e00 */
76, 88, 85, 78, 70, 48, 48, 56,181, 3, 0, 0, 76, 88, 85, 78, /* 0x e10 */
70, 48, 49, 48,185, 3, 0, 0, 0, 0, 0, 0,190, 3, 0, 0, /* 0x e20 */
76, 88, 85, 78, 70, 48, 52, 50, 0, 0, 0, 0, 76, 88, 74, 67, /* 0x e30 */
67, 48, 49, 48,190, 3, 0, 0, 76, 88, 77, 82, 85, 48, 52, 53, /* 0x e40 */
193, 3, 0, 0, 76, 88, 77, 82, 85, 48, 52, 54,196, 3, 0, 0, /* 0x e50 */
76, 88, 74, 67, 67, 48, 50, 48,198, 3, 0, 0, 0, 0, 0, 0, /* 0x e60 */
200, 3, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, /* 0x e70 */
76, 88, 74, 67, 67, 48, 50, 49,200, 3, 0, 0, 0, 0, 0, 0, /* 0x e80 */
205, 3, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, /* 0x e90 */
76, 88, 74, 67, 67, 48, 50, 51,205, 3, 0, 0, 76, 88, 85, 78, /* 0x ea0 */
70, 48, 51, 55,212, 3, 0, 0, 76, 88, 85, 78, 70, 51, 56, 54, /* 0x eb0 */
214, 3, 0, 0, 76, 88, 85, 78, 70, 51, 56, 55,215, 3, 0, 0, /* 0x ec0 */
76, 88, 85, 78, 70, 51, 56, 56,224, 3, 0, 0, 0, 0, 0, 0, /* 0x ed0 */
227, 3, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, /* 0x ee0 */
76, 88, 85, 78, 70, 52, 56, 54,227, 3, 0, 0, 76, 88, 85, 78, /* 0x ef0 */
70, 52, 56, 55,231, 3, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, /* 0x f00 */
76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, 76, 88, 77, 82, /* 0x f10 */
85, 48, 54, 53,233, 3, 0, 0, 0, 0, 0, 0,237, 3, 0, 0, /* 0x f20 */
76, 88, 77, 82, 85, 48, 55, 48, 5, 0, 0, 0, 77, 82, 85, 66, /* 0x f30 */
89, 84, 69, 51,237, 3, 0, 0, 77, 82, 85, 65, 82, 66, 51, 48, /* 0x f40 */
239, 3, 0, 0, 77, 82, 85, 66, 73, 84, 83, 51,240, 3, 0, 0, /* 0x f50 */
77, 82, 85, 65, 82, 66, 52, 48,242, 3, 0, 0, 76, 88, 77, 82, /* 0x f60 */
85, 48, 55, 48,246, 3, 0, 0, 0, 0, 0, 0,251, 3, 0, 0, /* 0x f70 */
76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, 77, 82, 85, 66, /* 0x f80 */
89, 84, 69, 52,254, 3, 0, 0, 77, 82, 85, 66, 73, 84, 83, 52, /* 0x f90 */
1, 4, 0, 0, 77, 82, 85, 65, 82, 66, 53, 48, 3, 4, 0, 0, /* 0x fa0 */
76, 88, 77, 82, 85, 48, 56, 48, 9, 4, 0, 0, 77, 82, 85, 66, /* 0x fb0 */
89, 84, 69, 53, 12, 4, 0, 0, 77, 82, 85, 65, 82, 66, 54, 48, /* 0x fc0 */
14, 4, 0, 0, 77, 82, 85, 66, 73, 84, 83, 53, 15, 4, 0, 0, /* 0x fd0 */
77, 82, 85, 65, 82, 66, 55, 48, 17, 4, 0, 0, 76, 88, 77, 82, /* 0x fe0 */
85, 48, 57, 48, 21, 4, 0, 0, 0, 0, 0, 0, 28, 4, 0, 0, /* 0x ff0 */
76, 88, 77, 82, 85, 49, 48, 48, 10, 0, 0, 0, 77, 82, 85, 66, /* 0x1000 */
89, 84, 69, 54, 32, 4, 0, 0, 77, 82, 85, 65, 82, 66, 56, 48, /* 0x1010 */
34, 4, 0, 0, 77, 82, 85, 66, 73, 84, 83, 54, 35, 4, 0, 0, /* 0x1020 */
77, 82, 85, 65, 82, 66, 57, 48, 37, 4, 0, 0, 76, 88, 77, 82, /* 0x1030 */
85, 49, 48, 48, 41, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, /* 0x1040 */
57, 4, 0, 0, 76, 88, 77, 82, 85, 49, 49, 48, 62, 4, 0, 0, /* 0x1050 */
76, 88, 77, 82, 85, 49, 49, 49, 65, 4, 0, 0, 76, 88, 85, 78, /* 0x1060 */
70, 48, 52, 49, 67, 4, 0, 0, 0, 0, 0, 0, 74, 4, 0, 0, /* 0x1070 */
76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 76, 88, 85, 78, /* 0x1080 */
70, 48, 52, 50, 74, 4, 0, 0, 76, 69, 88, 69, 67, 48, 49, 54, /* 0x1090 */
74, 4, 0, 0, 0, 0, 0, 0, 76, 4, 0, 0, 76, 88, 85, 78, /* 0x10a0 */
70, 48, 52, 50, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 49, 48, /* 0x10b0 */
76, 4, 0, 0, 76, 88, 74, 77, 80, 65, 48, 48, 77, 4, 0, 0, /* 0x10c0 */
76, 88, 67, 65, 76, 76, 66, 48, 79, 4, 0, 0, 76, 88, 85, 78, /* 0x10d0 */
70, 48, 50, 49, 81, 4, 0, 0, 76, 88, 77, 82, 85, 48, 50, 50, /* 0x10e0 */
87, 4, 0, 0, 76, 88, 74, 77, 80, 65, 48, 49, 90, 4, 0, 0, /* 0x10f0 */
76, 88, 67, 65, 76, 76, 66, 49, 92, 4, 0, 0, 77, 82, 85, 66, /* 0x1100 */
73, 84, 83, 49, 94, 4, 0, 0, 76, 88, 77, 82, 85, 48, 51, 48, /* 0x1110 */
95, 4, 0, 0, 77, 82, 85, 66, 89, 84, 69, 49, 97, 4, 0, 0, /* 0x1120 */
77, 82, 85, 65, 82, 66, 49, 48, 99, 4, 0, 0, 76, 88, 77, 82, /* 0x1130 */
85, 48, 52, 48,100, 4, 0, 0, 0, 0, 0, 0,102, 4, 0, 0, /* 0x1140 */
76, 88, 77, 82, 85, 48, 51, 48, 0, 0, 0, 0, 76, 88, 85, 78, /* 0x1150 */
70, 48, 51, 48,102, 4, 0, 0, 76, 88, 74, 67, 67, 48, 48, 48, /* 0x1160 */
108, 4, 0, 0, 0, 0, 0, 0,116, 4, 0, 0, 76, 88, 74, 67, /* 0x1170 */
67, 48, 49, 48, 0, 0, 0, 0, 76, 88, 67, 74, 48, 77, 82, 85, /* 0x1180 */
116, 4, 0, 0, 76, 88, 67, 74, 49, 77, 82, 85,118, 4, 0, 0, /* 0x1190 */
76, 88, 67, 65, 76, 74, 77, 80,121, 4, 0, 0, 76, 88, 67, 65, /* 0x11a0 */
76, 76, 48, 48,124, 4, 0, 0, 0, 0, 0, 0,126, 4, 0, 0, /* 0x11b0 */
76, 88, 85, 78, 70, 48, 51, 55, 0, 0, 0, 0, 76, 88, 67, 65, /* 0x11c0 */
76, 76, 48, 49,126, 4, 0, 0, 76, 88, 67, 74, 50, 77, 82, 85, /* 0x11d0 */
129, 4, 0, 0, 0, 0, 0, 0,131, 4, 0, 0, 76, 88, 85, 78, /* 0x11e0 */
70, 48, 51, 55, 0, 0, 0, 0, 76, 88, 67, 74, 52, 77, 82, 85, /* 0x11f0 */
131, 4, 0, 0, 0, 0, 0, 0,133, 4, 0, 0, 76, 88, 85, 78, /* 0x1200 */
70, 48, 51, 52, 0, 0, 0, 0, 76, 88, 67, 74, 54, 77, 82, 85, /* 0x1210 */
133, 4, 0, 0, 0, 0, 0, 0,135, 4, 0, 0, 76, 88, 67, 74, /* 0x1220 */
56, 77, 82, 85, 1, 0, 0, 0, 76, 88, 67, 74, 55, 77, 82, 85, /* 0x1230 */
135, 4, 0, 0, 0, 0, 0, 0,137, 4, 0, 0, 76, 88, 67, 74, /* 0x1240 */
56, 77, 82, 85, 1, 0, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, /* 0x1250 */
137, 4, 0, 0, 0, 0, 0, 0,140, 4, 0, 0, 76, 88, 85, 78, /* 0x1260 */
70, 48, 51, 55, 0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, /* 0x1270 */
140, 4, 0, 0, 0, 0, 0, 0,145, 4, 0, 0, 76, 88, 85, 78, /* 0x1280 */
70, 48, 51, 48, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 53, 53, /* 0x1290 */
145, 4, 0, 0, 77, 82, 85, 66, 89, 84, 69, 50,147, 4, 0, 0, /* 0x12a0 */
77, 82, 85, 66, 73, 84, 83, 50,152, 4, 0, 0, 77, 82, 85, 65, /* 0x12b0 */
82, 66, 50, 48,157, 4, 0, 0, 76, 88, 77, 82, 85, 48, 53, 55, /* 0x12c0 */
162, 4, 0, 0, 76, 88, 77, 82, 85, 48, 53, 56,168, 4, 0, 0, /* 0x12d0 */
76, 88, 85, 78, 70, 48, 51, 53,169, 4, 0, 0, 67, 75, 76, 76, /* 0x12e0 */
84, 82, 48, 48,175, 4, 0, 0, 0, 0, 0, 0,179, 4, 0, 0, /* 0x12f0 */
67, 75, 76, 76, 84, 82, 50, 48, 30, 0, 0, 0, 67, 75, 76, 76, /* 0x1300 */
84, 82, 49, 48,184, 4, 0, 0, 0, 0, 0, 0,198, 4, 0, 0, /* 0x1310 */
67, 75, 76, 76, 84, 82, 50, 48, 6, 0, 0, 0, 67, 75, 76, 76, /* 0x1320 */
84, 82, 50, 48,198, 4, 0, 0, 0, 0, 0, 0,204, 4, 0, 0, /* 0x1330 */
67, 75, 76, 76, 84, 82, 52, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1340 */
208, 4, 0, 0, 67, 75, 76, 76, 84, 82, 52, 48, 0, 0, 0, 0, /* 0x1350 */
67, 75, 76, 76, 84, 82, 51, 48,231, 4, 0, 0, 0, 0, 0, 0, /* 0x1360 */
238, 4, 0, 0, 67, 75, 76, 76, 84, 82, 49, 48, 14, 0, 0, 0, /* 0x1370 */
67, 75, 76, 76, 84, 82, 52, 48,238, 4, 0, 0, 0, 0, 0, 0, /* 0x1380 */
243, 4, 0, 0, 67, 75, 76, 76, 84, 82, 48, 48, 4, 0, 0, 0, /* 0x1390 */
76, 69, 88, 69, 67, 48, 49, 55,243, 4, 0, 0, 76, 69, 88, 69, /* 0x13a0 */
67, 48, 50, 48,245, 4, 0, 0, 88, 84, 72, 69, 69, 78, 68, 88, /* 0x13b0 */
40, 5, 0, 0,255,255,255,255, 40, 5 /* 0x13c0 */
};
+6 -11
View File
@@ -172,16 +172,11 @@ bzero(char *p, size_t len)
((x)|((x)<<4)|((x)<<8)|((x)<<12)|((x)<<16)|((x)<<20)|((x)<<24)|((x)<<28)) ((x)|((x)<<4)|((x)<<8)|((x)<<12)|((x)<<16)|((x)<<20)|((x)<<24)|((x)<<28))
#define EXP8(y) \ #define EXP8(y) \
((1&(y)) ? 0xf0f0f0f0 : (2&(y)) ? 0xff00ff00 : (4&(y)) ? 0xffff0000 : 0) ((1&(y)) ? 0xf0f0f0f0 : (2&(y)) ? 0xff00ff00 : (4&(y)) ? 0xffff0000 : 0)
#define PF_TO_PROT(pf) \
static inline unsigned (7 & (( (REP8(PROT_EXEC ) & EXP8(PF_X)) \
__attribute__((regparm(1), stdcall)) |(REP8(PROT_READ ) & EXP8(PF_R)) \
pf_to_prot(unsigned const pf) |(REP8(PROT_WRITE) & EXP8(PF_W)) ) \
{ >> ((pf & (PF_R|PF_W|PF_X))<<2) ))
return 7 & (( (REP8(PROT_EXEC ) & EXP8(PF_X))
|(REP8(PROT_READ ) & EXP8(PF_R))
|(REP8(PROT_WRITE) & EXP8(PF_W)) )
>> ((pf & (PF_R|PF_W|PF_X))<<2) );
}
// Find convex hull of PT_LOAD (the minimal interval which covers all PT_LOAD), // Find convex hull of PT_LOAD (the minimal interval which covers all PT_LOAD),
@@ -249,7 +244,7 @@ do_xmap(int const fdi, Elf32_Ehdr const *const ehdr, Elf32_auxv_t *const av)
av[AT_PHDR -1].a_un.a_val = phdr->p_vaddr; av[AT_PHDR -1].a_un.a_val = phdr->p_vaddr;
} }
else if (PT_LOAD==phdr->p_type) { else if (PT_LOAD==phdr->p_type) {
unsigned const prot = pf_to_prot(phdr->p_flags); unsigned const prot = PF_TO_PROT(phdr->p_flags);
struct Extent xo; struct Extent xo;
size_t mlen = xo.size = phdr->p_filesz; size_t mlen = xo.size = phdr->p_filesz;
char *addr = xo.buf = (char *)phdr->p_vaddr; char *addr = xo.buf = (char *)phdr->p_vaddr;
+231
View File
@@ -0,0 +1,231 @@
/* l_lx_sh86.h -- created from l_lx_sh86.bin, 3154 (0xc52) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define LINUX_I386SH_LOADER_ADLER32 0x3d30019f
#define LINUX_I386SH_LOADER_CRC32 0xc8744d92
unsigned char linux_i386sh_loader[3154] = {
232, 0, 0, 0, 0, 96,139,116, 36, 36,139,124, 36, 44,131,205, /* 0x 0 */
255,235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219,117, 7, /* 0x 10 */
139, 30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7,114, 0, /* 0x 20 */
184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 30 */
17,192, 1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, 1, /* 0x 40 */
219,115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, 49,201, /* 0x 50 */
131,232, 3,114, 13,193,224, 8,138, 6, 70,131,240,255,116, 0, /* 0x 60 */
137,197, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201, 1, /* 0x 70 */
219,117, 7,139, 30,131,238,252, 17,219, 17,201,117, 0, 65, 1, /* 0x 80 */
219,117, 7,139, 30,131,238,252, 17,219, 17,201, 1,219,117, 7, /* 0x 90 */
139, 30,131,238,252, 17,219,115, 0, 1,219,115, 0,117, 9,139, /* 0x a0 */
30,131,238,252, 17,219,115, 0, 65, 65,131,193, 2,129,253, 0, /* 0x b0 */
243,255,255,131,209, 1, 86,141, 52, 47,243,164, 94,233, 0, 0, /* 0x c0 */
0, 0,141, 20, 47,131,253,252,138, 4, 15,118, 0,138, 2, 66, /* 0x d0 */
136, 7, 71, 73,117,247,233, 0, 0, 0, 0,139, 2,131,194, 4, /* 0x e0 */
137, 7,131,199, 4,131,233, 4,119,241, 1,207,233, 0, 0, 0, /* 0x f0 */
0,235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219,117, 7, /* 0x 100 */
139, 30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7,114, 0, /* 0x 110 */
184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 120 */
17,192, 1,219,117, 7,139, 30,131,238,252, 17,219,114, 0, 1, /* 0x 130 */
219,115, 11,117, 0,139, 30,131,238,252, 17,219,114, 0, 72, 1, /* 0x 140 */
219,117, 7,139, 30,131,238,252, 17,219, 17,192,235, 0, 49,201, /* 0x 150 */
131,232, 3,114, 17,193,224, 8,138, 6, 70,131,240,255,116, 0, /* 0x 160 */
209,248,137,197,235, 11, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 170 */
219, 17,201, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201, /* 0x 180 */
117, 0, 65, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201, /* 0x 190 */
1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, 1,219,115, /* 0x 1a0 */
0,117, 9,139, 30,131,238,252, 17,219,115, 0, 65, 65,131,193, /* 0x 1b0 */
2,129,253, 0,251,255,255,131,209, 1, 86,141, 52, 47,243,164, /* 0x 1c0 */
94,233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, 4, 15,118, /* 0x 1d0 */
0,138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, 0, 0,139, /* 0x 1e0 */
2,131,194, 4,137, 7,131,199, 4,131,233, 4,119,241, 1,207, /* 0x 1f0 */
233, 0, 0, 0, 0,235, 0,164,235, 0,138, 6, 70,136, 7, 71, /* 0x 200 */
1,219,117, 7,139, 30,131,238,252, 17,219,114, 0, 49,192, 64, /* 0x 210 */
138, 7,114, 0,184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131, /* 0x 220 */
238,252, 17,219, 17,192, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 230 */
219,114, 0, 1,219,115, 11,117, 0,139, 30,131,238,252, 17,219, /* 0x 240 */
114, 0, 72, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,192, /* 0x 250 */
235, 0, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201,235, /* 0x 260 */
0, 49,201,131,232, 3,114, 17,193,224, 8,138, 6, 70,131,240, /* 0x 270 */
255,116, 0,209,248,137,197,235, 11, 1,219,117, 7,139, 30,131, /* 0x 280 */
238,252, 17,219,114,204, 65, 1,219,117, 7,139, 30,131,238,252, /* 0x 290 */
17,219,114,190, 1,219,117, 7,139, 30,131,238,252, 17,219, 17, /* 0x 2a0 */
201, 1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, 1,219, /* 0x 2b0 */
115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, 65, 65,131, /* 0x 2c0 */
193, 2,129,253, 0,251,255,255,131,209, 2, 86,141, 52, 47,243, /* 0x 2d0 */
164, 94,233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, 4, 15, /* 0x 2e0 */
118, 0,138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, 0, 0, /* 0x 2f0 */
139, 2,131,194, 4,137, 7,131,199, 4,131,233, 4,119,241, 1, /* 0x 300 */
207,233, 0, 0, 0, 0,185, 84, 69, 88, 76,138, 7, 71, 44,232, /* 0x 310 */
60, 1,119,247,128, 63, 63,117, 0,139, 7,138, 95, 4,102,193, /* 0x 320 */
232, 8,134,196,193,192, 16,134,196, 41,248,128,235,232,137, 7, /* 0x 330 */
131,199, 5,136,216,226, 0,185, 84, 69, 88, 76,176,232,176,233, /* 0x 340 */
242,174,117, 0,128, 63, 63,117, 0,139, 7,102,193,232, 8,134, /* 0x 350 */
196,193,192, 16,134,196, 41,248,171,235, 0,139, 84, 36, 36, 3, /* 0x 360 */
84, 36, 40, 57,214,116, 1, 72, 43,124, 36, 44,139, 84, 36, 48, /* 0x 370 */
137, 58,137, 68, 36, 28, 97,195, 94,252,173, 80, 84,186, 0, 0, /* 0x 380 */
64, 1,139, 66, 72, 1,208,131,194,116, 80,139, 74, 16,129,193, /* 0x 390 */
6, 16, 0, 0, 80, 80,106, 50,106, 7, 81, 80,137,227,106, 90, /* 0x 3a0 */
88,205,128,141,152, 3, 16, 0, 0,131,196, 24,173, 80,173, 86, /* 0x 3b0 */
255,213, 88, 88,195, 93,232,189,255,255,255, 0, 76, 69, 88, 69, /* 0x 3c0 */
67, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, /* 0x 3d0 */
76, 69, 88, 69, 67, 48, 50, 48, 61, 0, 0, 0, 76, 69, 88, 69, /* 0x 3e0 */
67, 48, 49, 48, 5, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, /* 0x 3f0 */
17, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 78, 50, 66, 68, /* 0x 400 */
69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 48, /* 0x 410 */
20, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 78, 50, 66, 68, /* 0x 420 */
69, 67, 49, 48, 4, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 49, /* 0x 430 */
22, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 28, 0, 0, 0, /* 0x 440 */
78, 50, 66, 83, 77, 65, 50, 48, 39, 0, 0, 0, 0, 0, 0, 0, /* 0x 450 */
41, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, 2, 0, 0, 0, /* 0x 460 */
78, 50, 66, 70, 65, 83, 50, 48, 44, 0, 0, 0, 0, 0, 0, 0, /* 0x 470 */
48, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 49, 0, 0, 0, 0, /* 0x 480 */
78, 50, 66, 68, 69, 67, 50, 48, 53, 0, 0, 0, 78, 50, 66, 83, /* 0x 490 */
77, 65, 51, 48, 66, 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, /* 0x 4a0 */
78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 78, 50, 66, 70, /* 0x 4b0 */
65, 83, 51, 48, 79, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, /* 0x 4c0 */
78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 4d0 */
94, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, /* 0x 4e0 */
78, 50, 66, 68, 69, 67, 51, 48, 94, 0, 0, 0, 0, 0, 0, 0, /* 0x 4f0 */
112, 0, 0, 0, 78, 50, 66, 68, 69, 67, 54, 48, 0, 0, 0, 0, /* 0x 500 */
0, 0, 0, 0,142, 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, /* 0x 510 */
0, 0, 0, 0, 78, 50, 66, 83, 77, 65, 52, 48,156, 0, 0, 0, /* 0x 520 */
0, 0, 0, 0,169, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, /* 0x 530 */
49, 0, 0, 0, 78, 50, 66, 70, 65, 83, 52, 48,169, 0, 0, 0, /* 0x 540 */
0, 0, 0, 0,173, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, /* 0x 550 */
49, 0, 0, 0, 0, 0, 0, 0,184, 0, 0, 0, 78, 50, 66, 68, /* 0x 560 */
69, 67, 51, 48, 49, 0, 0, 0, 78, 50, 66, 68, 85, 77, 77, 49, /* 0x 570 */
184, 0, 0, 0, 78, 50, 66, 83, 77, 65, 53, 48,184, 0, 0, 0, /* 0x 580 */
78, 50, 66, 70, 65, 83, 53, 48,186, 0, 0, 0, 78, 50, 66, 68, /* 0x 590 */
69, 67, 53, 48,189, 0, 0, 0, 78, 50, 66, 83, 77, 65, 54, 48, /* 0x 5a0 */
198, 0, 0, 0, 0, 0, 0, 0,210, 0, 0, 0, 78, 50, 66, 68, /* 0x 5b0 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 48, /* 0x 5c0 */
210, 0, 0, 0, 0, 0, 0, 0,221, 0, 0, 0, 78, 50, 66, 70, /* 0x 5d0 */
65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0,235, 0, 0, 0, /* 0x 5e0 */
78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 66, 70, /* 0x 5f0 */
65, 83, 54, 49,235, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, /* 0x 600 */
78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 66, 68, /* 0x 610 */
69, 67, 54, 48, 1, 1, 0, 0, 78, 82, 86, 50, 66, 69, 78, 68, /* 0x 620 */
1, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, 48, 1, 1, 0, 0, /* 0x 630 */
0, 0, 0, 0, 3, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, /* 0x 640 */
4, 0, 0, 0, 78, 50, 68, 70, 65, 83, 49, 48, 4, 1, 0, 0, /* 0x 650 */
0, 0, 0, 0, 6, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, /* 0x 660 */
4, 0, 0, 0, 78, 50, 68, 70, 65, 83, 49, 49, 6, 1, 0, 0, /* 0x 670 */
78, 50, 68, 68, 69, 67, 49, 48, 12, 1, 0, 0, 78, 50, 68, 83, /* 0x 680 */
77, 65, 50, 48, 23, 1, 0, 0, 0, 0, 0, 0, 25, 1, 0, 0, /* 0x 690 */
78, 50, 68, 83, 77, 65, 49, 48, 2, 0, 0, 0, 78, 50, 68, 70, /* 0x 6a0 */
65, 83, 50, 48, 28, 1, 0, 0, 0, 0, 0, 0, 32, 1, 0, 0, /* 0x 6b0 */
78, 50, 68, 70, 65, 83, 49, 49, 0, 0, 0, 0, 78, 50, 68, 68, /* 0x 6c0 */
69, 67, 50, 48, 37, 1, 0, 0, 78, 50, 68, 83, 77, 65, 51, 48, /* 0x 6d0 */
50, 1, 0, 0, 0, 0, 0, 0, 63, 1, 0, 0, 78, 50, 68, 68, /* 0x 6e0 */
69, 67, 51, 48, 16, 0, 0, 0, 78, 50, 68, 70, 65, 83, 51, 48, /* 0x 6f0 */
63, 1, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 78, 50, 68, 68, /* 0x 700 */
69, 67, 51, 48, 16, 0, 0, 0, 0, 0, 0, 0, 78, 1, 0, 0, /* 0x 710 */
78, 50, 68, 68, 69, 67, 51, 48, 16, 0, 0, 0, 78, 50, 68, 68, /* 0x 720 */
69, 67, 51, 48, 78, 1, 0, 0, 0, 0, 0, 0, 94, 1, 0, 0, /* 0x 730 */
78, 50, 68, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 740 */
112, 1, 0, 0, 78, 50, 68, 68, 69, 67, 54, 48, 0, 0, 0, 0, /* 0x 750 */
0, 0, 0, 0,146, 1, 0, 0, 78, 50, 68, 68, 69, 67, 53, 48, /* 0x 760 */
0, 0, 0, 0, 78, 50, 68, 83, 77, 65, 52, 48,160, 1, 0, 0, /* 0x 770 */
0, 0, 0, 0,173, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 780 */
69, 0, 0, 0, 78, 50, 68, 70, 65, 83, 52, 48,173, 1, 0, 0, /* 0x 790 */
0, 0, 0, 0,177, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 7a0 */
69, 0, 0, 0, 0, 0, 0, 0,188, 1, 0, 0, 78, 50, 68, 68, /* 0x 7b0 */
69, 67, 51, 48, 69, 0, 0, 0, 78, 50, 68, 68, 85, 77, 77, 49, /* 0x 7c0 */
188, 1, 0, 0, 78, 50, 68, 83, 77, 65, 53, 48,188, 1, 0, 0, /* 0x 7d0 */
78, 50, 68, 70, 65, 83, 53, 48,190, 1, 0, 0, 78, 50, 68, 68, /* 0x 7e0 */
69, 67, 53, 48,193, 1, 0, 0, 78, 50, 68, 83, 77, 65, 54, 48, /* 0x 7f0 */
202, 1, 0, 0, 0, 0, 0, 0,214, 1, 0, 0, 78, 50, 68, 68, /* 0x 800 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 48, /* 0x 810 */
214, 1, 0, 0, 0, 0, 0, 0,225, 1, 0, 0, 78, 50, 68, 70, /* 0x 820 */
65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0,239, 1, 0, 0, /* 0x 830 */
78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 68, 70, /* 0x 840 */
65, 83, 54, 49,239, 1, 0, 0, 0, 0, 0, 0, 5, 2, 0, 0, /* 0x 850 */
78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 68, 68, /* 0x 860 */
69, 67, 54, 48, 5, 2, 0, 0, 78, 82, 86, 50, 68, 69, 78, 68, /* 0x 870 */
5, 2, 0, 0, 78, 50, 69, 83, 77, 65, 49, 48, 5, 2, 0, 0, /* 0x 880 */
0, 0, 0, 0, 7, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x 890 */
4, 0, 0, 0, 78, 50, 69, 70, 65, 83, 49, 48, 8, 2, 0, 0, /* 0x 8a0 */
0, 0, 0, 0, 10, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x 8b0 */
4, 0, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, 10, 2, 0, 0, /* 0x 8c0 */
78, 50, 69, 68, 69, 67, 49, 48, 16, 2, 0, 0, 78, 50, 69, 83, /* 0x 8d0 */
77, 65, 50, 48, 27, 2, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, /* 0x 8e0 */
78, 50, 69, 83, 77, 65, 49, 48, 2, 0, 0, 0, 78, 50, 69, 70, /* 0x 8f0 */
65, 83, 50, 48, 32, 2, 0, 0, 0, 0, 0, 0, 36, 2, 0, 0, /* 0x 900 */
78, 50, 69, 70, 65, 83, 49, 49, 0, 0, 0, 0, 78, 50, 69, 68, /* 0x 910 */
69, 67, 50, 48, 41, 2, 0, 0, 78, 50, 69, 83, 77, 65, 51, 48, /* 0x 920 */
54, 2, 0, 0, 0, 0, 0, 0, 67, 2, 0, 0, 78, 50, 69, 68, /* 0x 930 */
69, 67, 51, 48, 31, 0, 0, 0, 78, 50, 69, 70, 65, 83, 51, 48, /* 0x 940 */
67, 2, 0, 0, 0, 0, 0, 0, 73, 2, 0, 0, 78, 50, 69, 68, /* 0x 950 */
69, 67, 51, 48, 31, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, /* 0x 960 */
78, 50, 69, 68, 69, 67, 51, 48, 31, 0, 0, 0, 78, 50, 69, 68, /* 0x 970 */
69, 67, 51, 48, 82, 2, 0, 0, 0, 0, 0, 0, 98, 2, 0, 0, /* 0x 980 */
78, 50, 69, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 990 */
113, 2, 0, 0, 78, 50, 69, 68, 69, 67, 53, 48, 0, 0, 0, 0, /* 0x 9a0 */
0, 0, 0, 0,131, 2, 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, /* 0x 9b0 */
0, 0, 0, 0, 78, 50, 69, 83, 77, 65, 52, 48,177, 2, 0, 0, /* 0x 9c0 */
0, 0, 0, 0,190, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x 9d0 */
82, 0, 0, 0, 78, 50, 69, 70, 65, 83, 52, 48,190, 2, 0, 0, /* 0x 9e0 */
0, 0, 0, 0,194, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x 9f0 */
82, 0, 0, 0, 0, 0, 0, 0,205, 2, 0, 0, 78, 50, 69, 68, /* 0x a00 */
69, 67, 51, 48, 82, 0, 0, 0, 78, 50, 69, 68, 85, 77, 77, 49, /* 0x a10 */
205, 2, 0, 0, 78, 50, 69, 83, 77, 65, 53, 48,205, 2, 0, 0, /* 0x a20 */
78, 50, 69, 70, 65, 83, 53, 48,207, 2, 0, 0, 78, 50, 69, 68, /* 0x a30 */
69, 67, 53, 48,210, 2, 0, 0, 78, 50, 69, 83, 77, 65, 54, 48, /* 0x a40 */
219, 2, 0, 0, 0, 0, 0, 0,231, 2, 0, 0, 78, 50, 69, 68, /* 0x a50 */
69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, 48, /* 0x a60 */
231, 2, 0, 0, 0, 0, 0, 0,242, 2, 0, 0, 78, 50, 69, 70, /* 0x a70 */
65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, /* 0x a80 */
78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 69, 70, /* 0x a90 */
65, 83, 54, 49, 0, 3, 0, 0, 0, 0, 0, 0, 22, 3, 0, 0, /* 0x aa0 */
78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 78, 50, 69, 68, /* 0x ab0 */
69, 67, 54, 48, 22, 3, 0, 0, 78, 82, 86, 50, 69, 69, 78, 68, /* 0x ac0 */
22, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, 22, 3, 0, 0, /* 0x ad0 */
67, 84, 67, 76, 69, 86, 69, 49, 36, 3, 0, 0, 0, 0, 0, 0, /* 0x ae0 */
41, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, 5, 0, 0, 0, /* 0x af0 */
67, 65, 76, 76, 84, 82, 48, 49, 41, 3, 0, 0, 67, 84, 68, 85, /* 0x b00 */
77, 77, 89, 49, 46, 3, 0, 0, 67, 84, 66, 83, 72, 82, 48, 49, /* 0x b10 */
46, 3, 0, 0, 67, 84, 66, 82, 79, 82, 48, 49, 50, 3, 0, 0, /* 0x b20 */
67, 84, 66, 83, 87, 65, 48, 49, 52, 3, 0, 0, 67, 65, 76, 76, /* 0x b30 */
84, 82, 48, 50, 57, 3, 0, 0, 0, 0, 0, 0, 71, 3, 0, 0, /* 0x b40 */
67, 65, 76, 76, 84, 82, 48, 48, 10, 0, 0, 0, 67, 65, 76, 76, /* 0x b50 */
84, 82, 49, 48, 71, 3, 0, 0, 67, 65, 76, 76, 84, 82, 69, 56, /* 0x b60 */
76, 3, 0, 0, 67, 65, 76, 76, 84, 82, 69, 57, 78, 3, 0, 0, /* 0x b70 */
67, 65, 76, 76, 84, 82, 49, 49, 80, 3, 0, 0, 0, 0, 0, 0, /* 0x b80 */
84, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, 5, 0, 0, 0, /* 0x b90 */
67, 84, 67, 76, 69, 86, 69, 50, 84, 3, 0, 0, 0, 0, 0, 0, /* 0x ba0 */
89, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 49, 0, 0, 0, 0, /* 0x bb0 */
67, 65, 76, 76, 84, 82, 49, 50, 89, 3, 0, 0, 67, 84, 68, 85, /* 0x bc0 */
77, 77, 89, 50, 91, 3, 0, 0, 67, 84, 66, 83, 72, 82, 49, 49, /* 0x bd0 */
91, 3, 0, 0, 67, 84, 66, 82, 79, 82, 49, 49, 95, 3, 0, 0, /* 0x be0 */
67, 84, 66, 83, 87, 65, 49, 49, 97, 3, 0, 0, 67, 65, 76, 76, /* 0x bf0 */
84, 82, 49, 51,102, 3, 0, 0, 0, 0, 0, 0,107, 3, 0, 0, /* 0x c00 */
67, 65, 76, 76, 84, 82, 49, 48, 5, 0, 0, 0, 67, 84, 84, 72, /* 0x c10 */
69, 69, 78, 68,107, 3, 0, 0, 76, 69, 88, 69, 67, 48, 49, 53, /* 0x c20 */
107, 3, 0, 0, 76, 69, 88, 69, 67, 48, 50, 48,136, 3, 0, 0, /* 0x c30 */
88, 84, 72, 69, 69, 78, 68, 88,203, 3, 0, 0,255,255,255,255, /* 0x c40 */
203, 3 /* 0x c50 */
};
+6 -6
View File
@@ -179,22 +179,22 @@ cutpoint:
; ============= ; =============
; __PS1MSETB__
ori a0,zero,'SC' ; amount of removed zero's at eof
sll a0,3 ; (cd mode 2 data sector alignment)
; __PS1MSETS__ ; __PS1MSETS__
ori a0,zero,'SC' ; amount of removed zero's at eof ori a0,zero,'SC' ; amount of removed zeros at eof
; __PS1MSETB__
ori a0,zero,'SC' ; amount of removed zeros at eof
sll a0,3 ; (cd mode 2 data sector alignment)
; __PS1MSETA__ ; __PS1MSETA__
memset_aligned: memset_aligned:
sw zero,0(a2) sw zero,0(a2)
addiu a0,-4 addiu a0,-1
bnez a0,memset_aligned bnez a0,memset_aligned
addiu a2,4 addiu a2,4
; __PS1MSETU__ ; __PS1MSETU__
memset_unaligned: memset_unaligned:
swl zero,3(a2) swl zero,3(a2)
swr zero,0(a2) swr zero,0(a2)
addiu a0,-4 addiu a0,-1
bnez a0,memset_unaligned bnez a0,memset_unaligned
addiu a2,4 addiu a2,4
+9 -9
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2004 Laszlo Molnar Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -26,8 +26,8 @@
*/ */
#define NRV_BOOT_LOADER_ADLER32 0x4d310522 #define NRV_BOOT_LOADER_ADLER32 0x53c50524
#define NRV_BOOT_LOADER_CRC32 0xb1939f02 #define NRV_BOOT_LOADER_CRC32 0xdf0cbd9e
unsigned char nrv_boot_loader[3918] = { unsigned char nrv_boot_loader[3918] = {
83, 80, 8, 60, 82, 86, 8, 53, 35, 64, 8, 2, 8, 0, 0, 1, /* 0x 0 */ 83, 80, 8, 60, 82, 86, 8, 53, 35, 64, 8, 2, 8, 0, 0, 1, /* 0x 0 */
@@ -254,9 +254,9 @@ unsigned char nrv_boot_loader[3918] = {
4, 0,198, 36,105,255, 0, 16,255,255,173, 37, 35, 24,195, 0, /* 0x dd0 */ 4, 0,198, 36,105,255, 0, 16,255,255,173, 37, 35, 24,195, 0, /* 0x dd0 */
0, 0, 98,144,255,255,140, 37, 0, 0,194,160, 1, 0, 99, 36, /* 0x de0 */ 0, 0, 98,144,255,255,140, 37, 0, 0,194,160, 1, 0, 99, 36, /* 0x de0 */
251,255,128, 21, 1, 0,198, 36, 96,255, 0, 16,255,255,173, 37, /* 0x df0 */ 251,255,128, 21, 1, 0,198, 36, 96,255, 0, 16,255,255,173, 37, /* 0x df0 */
67, 83, 4, 52,192, 32, 4, 0, 67, 83, 4, 52, 0, 0,192,172, /* 0x e00 */ 67, 83, 4, 52, 67, 83, 4, 52,192, 32, 4, 0, 0, 0,192,172, /* 0x e00 */
252,255,132, 36,253,255,128, 20, 4, 0,198, 36, 3, 0,192,168, /* 0x e10 */ 255,255,132, 36,253,255,128, 20, 4, 0,198, 36, 3, 0,192,168, /* 0x e10 */
0, 0,192,184,252,255,132, 36,252,255,128, 20, 4, 0,198, 36, /* 0x e20 */ 0, 0,192,184,255,255,132, 36,252,255,128, 20, 4, 0,198, 36, /* 0x e20 */
160, 0, 10, 36, 9,248, 64, 1, 68, 0, 9, 36, 0, 0,164,143, /* 0x e30 */ 160, 0, 10, 36, 9,248, 64, 1, 68, 0, 9, 36, 0, 0,164,143, /* 0x e30 */
4, 0,165,143, 8, 0,166,143, 12, 0,167,143, 16, 0,162,143, /* 0x e40 */ 4, 0,165,143, 8, 0,166,143, 12, 0,167,143, 16, 0,162,143, /* 0x e40 */
20, 0,163,143, 80, 69, 80, 74, 24, 0,191,143, 85, 80, 88, 33, /* 0x e50 */ 20, 0,163,143, 80, 69, 80, 74, 24, 0,191,143, 85, 80, 88, 33, /* 0x e50 */
@@ -269,8 +269,8 @@ unsigned char nrv_boot_loader[3918] = {
72, 2, 0, 0, 80, 83, 49, 78, 50, 69, 48, 56,136, 4, 0, 0, /* 0x ec0 */ 72, 2, 0, 0, 80, 83, 49, 78, 50, 69, 48, 56,136, 4, 0, 0, /* 0x ec0 */
80, 83, 49, 78, 50, 66, 51, 50, 28, 7, 0, 0, 80, 83, 49, 78, /* 0x ed0 */ 80, 83, 49, 78, 50, 66, 51, 50, 28, 7, 0, 0, 80, 83, 49, 78, /* 0x ed0 */
50, 68, 51, 50, 36, 9, 0, 0, 80, 83, 49, 78, 50, 69, 51, 50, /* 0x ee0 */ 50, 68, 51, 50, 36, 9, 0, 0, 80, 83, 49, 78, 50, 69, 51, 50, /* 0x ee0 */
104, 11, 0, 0, 80, 83, 49, 77, 83, 69, 84, 66, 0, 14, 0, 0, /* 0x ef0 */ 104, 11, 0, 0, 80, 83, 49, 77, 83, 69, 84, 83, 0, 14, 0, 0, /* 0x ef0 */
80, 83, 49, 77, 83, 69, 84, 83, 8, 14, 0, 0, 80, 83, 49, 77, /* 0x f00 */ 80, 83, 49, 77, 83, 69, 84, 66, 4, 14, 0, 0, 80, 83, 49, 77, /* 0x f00 */
83, 69, 84, 65, 12, 14, 0, 0, 80, 83, 49, 77, 83, 69, 84, 85, /* 0x f10 */ 83, 69, 84, 65, 12, 14, 0, 0, 80, 83, 49, 77, 83, 69, 84, 85, /* 0x f10 */
28, 14, 0, 0, 80, 83, 49, 69, 88, 73, 84, 67, 48, 14, 0, 0, /* 0x f20 */ 28, 14, 0, 0, 80, 83, 49, 69, 88, 73, 84, 67, 48, 14, 0, 0, /* 0x f20 */
80, 83, 49, 80, 65, 72, 68, 82, 92, 14, 0, 0, 80, 83, 49, 69, /* 0x f30 */ 80, 83, 49, 80, 65, 72, 68, 82, 92, 14, 0, 0, 80, 83, 49, 69, /* 0x f30 */
+9 -9
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2004 Laszlo Molnar Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -26,8 +26,8 @@
*/ */
#define NRV_CON_LOADER_ADLER32 0x7c7c7da1 #define NRV_CON_LOADER_ADLER32 0x83b87da3
#define NRV_CON_LOADER_CRC32 0xaf39f37f #define NRV_CON_LOADER_CRC32 0x31747f8b
unsigned char nrv_con_loader[2810] = { unsigned char nrv_con_loader[2810] = {
83, 76, 1, 36, 35,232,161, 3, 0, 0,161,175, 4, 0,164,175, /* 0x 0 */ 83, 76, 1, 36, 35,232,161, 3, 0, 0,161,175, 4, 0,164,175, /* 0x 0 */
@@ -182,9 +182,9 @@ unsigned char nrv_con_loader[2810] = {
1, 0, 99, 36,251,255,128, 21, 1, 0,198, 36,165,255, 0, 16, /* 0x 950 */ 1, 0, 99, 36,251,255,128, 21, 1, 0,198, 36,165,255, 0, 16, /* 0x 950 */
0, 0, 0, 0, 6, 0,161, 5, 6, 16,169, 1, 31, 0, 13, 36, /* 0x 960 */ 0, 0, 0, 0, 6, 0,161, 5, 6, 16,169, 1, 31, 0, 13, 36, /* 0x 960 */
0, 0, 9,153, 3, 0, 9,137, 4, 0, 8, 37, 6, 16,169, 1, /* 0x 970 */ 0, 0, 9,153, 3, 0, 9,137, 4, 0, 8, 37, 6, 16,169, 1, /* 0x 970 */
8, 0,224, 3, 1, 0, 66, 48, 67, 83, 4, 52,192, 32, 4, 0, /* 0x 980 */ 8, 0,224, 3, 1, 0, 66, 48, 67, 83, 4, 52, 67, 83, 4, 52, /* 0x 980 */
67, 83, 4, 52, 0, 0,192,172,252,255,132, 36,253,255,128, 20, /* 0x 990 */ 192, 32, 4, 0, 0, 0,192,172,255,255,132, 36,253,255,128, 20, /* 0x 990 */
4, 0,198, 36, 3, 0,192,168, 0, 0,192,184,252,255,132, 36, /* 0x 9a0 */ 4, 0,198, 36, 3, 0,192,168, 0, 0,192,184,255,255,132, 36, /* 0x 9a0 */
252,255,128, 20, 4, 0,198, 36,160, 0, 10, 36, 9,248, 64, 1, /* 0x 9b0 */ 252,255,128, 20, 4, 0,198, 36,160, 0, 10, 36, 9,248, 64, 1, /* 0x 9b0 */
68, 0, 9, 36, 0, 0,161,143, 4, 0,164,143, 8, 0,165,143, /* 0x 9c0 */ 68, 0, 9, 36, 0, 0,161,143, 4, 0,164,143, 8, 0,165,143, /* 0x 9c0 */
12, 0,166,143, 16, 0,167,143, 20, 0,162,143, 24, 0,163,143, /* 0x 9d0 */ 12, 0,166,143, 16, 0,167,143, 20, 0,162,143, 24, 0,163,143, /* 0x 9d0 */
@@ -199,8 +199,8 @@ unsigned char nrv_con_loader[2810] = {
208, 1, 0, 0, 80, 83, 49, 78, 50, 69, 48, 56, 84, 3, 0, 0, /* 0x a60 */ 208, 1, 0, 0, 80, 83, 49, 78, 50, 69, 48, 56, 84, 3, 0, 0, /* 0x a60 */
80, 83, 49, 78, 50, 66, 51, 50,244, 4, 0, 0, 80, 83, 49, 78, /* 0x a70 */ 80, 83, 49, 78, 50, 66, 51, 50,244, 4, 0, 0, 80, 83, 49, 78, /* 0x a70 */
50, 68, 51, 50, 92, 6, 0, 0, 80, 83, 49, 78, 50, 69, 51, 50, /* 0x a80 */ 50, 68, 51, 50, 92, 6, 0, 0, 80, 83, 49, 78, 50, 69, 51, 50, /* 0x a80 */
228, 7, 0, 0, 80, 83, 49, 77, 83, 69, 84, 66,136, 9, 0, 0, /* 0x a90 */ 228, 7, 0, 0, 80, 83, 49, 77, 83, 69, 84, 83,136, 9, 0, 0, /* 0x a90 */
80, 83, 49, 77, 83, 69, 84, 83,144, 9, 0, 0, 80, 83, 49, 77, /* 0x aa0 */ 80, 83, 49, 77, 83, 69, 84, 66,140, 9, 0, 0, 80, 83, 49, 77, /* 0x aa0 */
83, 69, 84, 65,148, 9, 0, 0, 80, 83, 49, 77, 83, 69, 84, 85, /* 0x ab0 */ 83, 69, 84, 65,148, 9, 0, 0, 80, 83, 49, 77, 83, 69, 84, 85, /* 0x ab0 */
164, 9, 0, 0, 80, 83, 49, 69, 88, 73, 84, 67,184, 9, 0, 0, /* 0x ac0 */ 164, 9, 0, 0, 80, 83, 49, 69, 88, 73, 84, 67,184, 9, 0, 0, /* 0x ac0 */
80, 83, 49, 80, 65, 72, 68, 82,236, 9, 0, 0, 80, 83, 49, 83, /* 0x ad0 */ 80, 83, 49, 80, 65, 72, 68, 82,236, 9, 0, 0, 80, 83, 49, 83, /* 0x ad0 */
+91
View File
@@ -0,0 +1,91 @@
/* l_sys.h -- created from l_sys.bin, 926 (0x39e) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV2B_LOADER_ADLER32 0x1ea7e80e
#define NRV2B_LOADER_CRC32 0xc6ee1163
unsigned char nrv2b_loader[926] = {
255,255,255,255, 0, 0, 10, 0, 0, 0, 96, 80, 83, 81, 82, 86, /* 0x 0 */
87, 85,190, 83, 73,191, 68, 73,137,241, 6, 30, 7,253,243,164, /* 0x 10 */
252,187, 0,128,135,247,131,238,187, 25,237, 87,233, 74, 77, 85, /* 0x 20 */
80, 88, 33,161,216,208,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 30 */
0, 0, 0, 0, 45,164,232, 0, 0,114,250, 65,232, 0, 0,227, /* 0x 40 */
0,227, 0,115, 0,131,233, 3,114, 6,136,204,172,247,208,149, /* 0x 50 */
49,201,232, 0, 0, 17,201,117, 8, 65,232, 0, 0,115,251, 65, /* 0x 60 */
65, 65,129,253, 0,243,131,209, 1,141, 3,150,243,164,150,235, /* 0x 70 */
0,232, 2, 0, 17,201, 1,219,117, 4,173, 17,192,147,195, 94, /* 0x 80 */
185, 67, 84,172, 44,232, 60, 1,119,249,193, 4, 8, 41, 52,139, /* 0x 90 */
28,134,223, 41,243,137, 28,173,226, 0,176,232,176,233, 95,185, /* 0x a0 */
67, 84,242,174,117, 0,117, 0,193, 5, 8, 41, 61,139, 29,134, /* 0x b0 */
223, 41,251,137, 29,175,235, 0, 7, 97, 93, 95, 94, 90, 89, 91, /* 0x c0 */
88,233, 74, 79, 83, 89, 83, 77, 65, 73, 78, 49, 0, 0, 0, 0, /* 0x d0 */
83, 89, 83, 73, 50, 56, 54, 49, 10, 0, 0, 0, 83, 89, 83, 73, /* 0x e0 */
48, 56, 54, 49, 11, 0, 0, 0, 83, 89, 83, 77, 65, 73, 78, 50, /* 0x f0 */
18, 0, 0, 0, 83, 89, 83, 83, 85, 66, 83, 73, 41, 0, 0, 0, /* 0x 100 */
83, 89, 83, 83, 66, 66, 66, 80, 41, 0, 0, 0, 83, 89, 83, 67, /* 0x 110 */
65, 76, 76, 84, 43, 0, 0, 0, 83, 89, 83, 77, 65, 73, 78, 51, /* 0x 120 */
44, 0, 0, 0, 85, 80, 88, 49, 72, 69, 65, 68, 47, 0, 0, 0, /* 0x 130 */
83, 89, 83, 67, 85, 84, 80, 79, 69, 0, 0, 0, 78, 82, 86, 50, /* 0x 140 */
66, 49, 54, 48, 69, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, /* 0x 150 */
78, 82, 86, 68, 69, 67, 79, 50, 13, 0, 0, 0, 0, 0, 0, 0, /* 0x 160 */
79, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, 8, 0, 0, 0, /* 0x 170 */
78, 82, 86, 68, 68, 79, 78, 69, 79, 0, 0, 0, 0, 0, 0, 0, /* 0x 180 */
81, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, 22, 0, 0, 0, /* 0x 190 */
78, 82, 86, 68, 82, 69, 84, 85, 81, 0, 0, 0, 0, 0, 0, 0, /* 0x 1a0 */
83, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, 21, 0, 0, 0, /* 0x 1b0 */
78, 82, 86, 68, 69, 67, 79, 49, 83, 0, 0, 0, 0, 0, 0, 0, /* 0x 1c0 */
85, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 48, 7, 0, 0, 0, /* 0x 1d0 */
0, 0, 0, 0,101, 0, 0, 0, 78, 82, 86, 68, 69, 67, 79, 50, /* 0x 1e0 */
8, 0, 0, 0, 0, 0, 0, 0,109, 0, 0, 0, 78, 82, 86, 68, /* 0x 1f0 */
69, 67, 79, 50, 8, 0, 0, 0, 78, 82, 86, 76, 69, 68, 48, 48, /* 0x 200 */
113, 0, 0, 0, 78, 82, 86, 71, 84, 68, 48, 48,114, 0, 0, 0, /* 0x 210 */
78, 82, 86, 68, 69, 67, 79, 50,121, 0, 0, 0, 0, 0, 0, 0, /* 0x 220 */
129, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 48, 1, 0, 0, 0, /* 0x 230 */
78, 82, 86, 50, 66, 49, 54, 57,143, 0, 0, 0, 67, 65, 76, 76, /* 0x 240 */
84, 82, 49, 54,143, 0, 0, 0, 67, 84, 49, 54, 73, 50, 56, 54, /* 0x 250 */
154, 0, 0, 0, 67, 84, 49, 54, 83, 85, 66, 48,157, 0, 0, 0, /* 0x 260 */
67, 84, 49, 54, 73, 48, 56, 54,159, 0, 0, 0, 67, 65, 76, 76, /* 0x 270 */
84, 82, 73, 50,167, 0, 0, 0, 0, 0, 0, 0,170, 0, 0, 0, /* 0x 280 */
67, 65, 76, 76, 84, 82, 49, 54, 4, 0, 0, 0, 67, 84, 49, 54, /* 0x 290 */
68, 85, 77, 49,170, 0, 0, 0, 67, 84, 49, 54, 69, 56, 48, 48, /* 0x 2a0 */
170, 0, 0, 0, 67, 84, 49, 54, 69, 57, 48, 48,172, 0, 0, 0, /* 0x 2b0 */
67, 65, 76, 76, 84, 82, 73, 53,174, 0, 0, 0, 67, 84, 49, 54, /* 0x 2c0 */
74, 69, 78, 68,180, 0, 0, 0, 0, 0, 0, 0,182, 0, 0, 0, /* 0x 2d0 */
78, 82, 86, 68, 69, 67, 79, 50, 21, 0, 0, 0, 67, 84, 49, 54, /* 0x 2e0 */
74, 85, 76, 50,182, 0, 0, 0, 0, 0, 0, 0,184, 0, 0, 0, /* 0x 2f0 */
67, 65, 76, 76, 84, 82, 73, 54, 3, 0, 0, 0, 67, 84, 49, 54, /* 0x 300 */
68, 85, 77, 50,184, 0, 0, 0, 67, 84, 49, 54, 73, 50, 56, 55, /* 0x 310 */
184, 0, 0, 0, 67, 84, 49, 54, 83, 85, 66, 49,187, 0, 0, 0, /* 0x 320 */
67, 84, 49, 54, 73, 48, 56, 55,189, 0, 0, 0, 67, 65, 76, 76, /* 0x 330 */
84, 82, 73, 54,197, 0, 0, 0, 0, 0, 0, 0,200, 0, 0, 0, /* 0x 340 */
67, 65, 76, 76, 84, 82, 73, 53, 4, 0, 0, 0, 83, 89, 83, 77, /* 0x 350 */
65, 73, 78, 53,200, 0, 0, 0, 83, 89, 83, 73, 50, 56, 54, 50, /* 0x 360 */
201, 0, 0, 0, 83, 89, 83, 73, 48, 56, 54, 50,202, 0, 0, 0, /* 0x 370 */
83, 89, 83, 74, 85, 77, 80, 49,209, 0, 0, 0, 83, 89, 83, 84, /* 0x 380 */
72, 69, 78, 68,212, 0, 0, 0,255,255,255,255,212, 0 /* 0x 390 */
};
+75
View File
@@ -0,0 +1,75 @@
/* l_t_n2b.h -- created from l_t_n2b.bin, 668 (0x29c) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV2B_LOADER_ADLER32 0xb05aee80
#define NRV2B_LOADER_CRC32 0x148f8dcd
unsigned char nrv2b_loader[668] = {
32, 8,103, 6, 46,104, 0, 4, 96, 4, 32, 47, 0, 4, 72,231, /* 0x 0 */
127,254, 36, 64, 80,138, 44, 90, 40, 14, 36,188,117,112, 49, 49, /* 0x 10 */
221,218, 36,206, 36,188,117,112, 49, 50,221,218, 40, 82, 36,206, /* 0x 20 */
36,188,117,112, 49, 51, 38, 68,215,252,117,112, 50, 49, 32, 60, /* 0x 30 */
117,112, 50, 50, 73,236,255, 96, 76,236, 39,238, 0,120, 72,227, /* 0x 40 */
119,228, 76,236, 39,238, 0, 80, 72,227,119,228, 76,236, 39,238, /* 0x 50 */
0, 40, 72,227,119,228, 76,212, 39,238, 72,227,119,228,117, 49, /* 0x 60 */
102,210,117, 50, 39, 36, 81,200,255,252, 69,250, 0,188, 47, 4, /* 0x 70 */
122, 73, 63, 34, 83,133,100,250, 63,124, 78,113, 0,130, 97, 32, /* 0x 80 */
40, 68,112,128,126,255,124,152,235, 78, 36, 68,213,252,117,112, /* 0x 90 */
51, 49, 78,210, 44,195, 44,195, 44,195, 44,195,117, 52,102,244, /* 0x a0 */
72,120,255,255, 66,167, 47, 60, 1, 84, 0, 22, 78, 65, 79,239, /* 0x b0 */
0, 12, 74,128,103, 96, 72,122, 0, 16, 63, 60, 0, 38, 78, 78, /* 0x c0 */
92,143, 96, 82, 46, 73, 78,208, 47, 56, 0, 16, 47, 56, 0, 44, /* 0x d0 */
47, 56, 0,244, 34, 79, 65,250,255,236, 33,200, 0, 16, 33,200, /* 0x e0 */
0, 44, 33,200, 0,244, 78,113, 65,250, 0, 6,244,248, 96, 22, /* 0x f0 */
65,250, 0, 20, 78,122, 0, 2, 34, 0, 0, 65, 8, 8, 78,123, /* 0x 100 */
16, 2, 78,123, 0, 2, 33,223, 0,244, 33,223, 0, 44, 33,223, /* 0x 110 */
0, 16, 78,113, 78,117, 78,117, 79,239, 0,152, 76,223,127,254, /* 0x 120 */
32, 8,103, 2,159,207, 78,249, 10, 0, 36, 73,110,102,111, 58, /* 0x 130 */
32, 84,104,105,115, 32,102,105,108,101, 32,105,115, 32,112, 97, /* 0x 140 */
99,107,101,100, 32,119,105,116,104, 32,116,104,101, 32, 85, 80, /* 0x 150 */
88, 32,101,120,101, 99,117,116, 97, 98,108,101, 32,112, 97, 99, /* 0x 160 */
107,101,114, 32,104,116,116,112, 58, 47, 47,117,112,120, 46,115, /* 0x 170 */
102, 46,110,101,116, 32, 36, 10, 0, 36, 73,100, 58, 32, 85, 80, /* 0x 180 */
88, 32, 85, 80, 88, 86, 32, 67,111,112,121,114,105,103,104,116, /* 0x 190 */
32, 40, 67, 41, 32, 49, 57, 57, 54, 45, 50, 48, 48, 53, 32,116, /* 0x 1a0 */
104,101, 32, 85, 80, 88, 32, 84,101, 97,109, 46, 32, 65,108,108, /* 0x 1b0 */
32, 82,105,103,104,116,115, 32, 82,101,115,101,114,118,101,100, /* 0x 1c0 */
46, 32, 36, 10, 0, 0, 0, 0, 85, 80, 88, 33,161,216,208,213, /* 0x 1d0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 1e0 */
0, 0, 0, 0, 0, 0, 0, 45, 24,219,208, 0,100, 8,102,248, /* 0x 1f0 */
16, 27,209, 0,101,242,114, 1,118, 0,208, 0,102, 4, 16, 27, /* 0x 200 */
209, 0,211,129,208, 0,100,242,102, 6, 16, 27,209, 0,100,234, /* 0x 210 */
87,129,101, 10,225,137, 18, 27, 70,129,103, 72, 42, 1,208, 0, /* 0x 220 */
102, 4, 16, 27,209, 0,215, 67,208, 0,102, 4, 16, 27,209, 0, /* 0x 230 */
215, 67, 74, 67,102, 26, 82, 67,208, 0,102, 4, 16, 27,209, 0, /* 0x 240 */
215, 67,208, 0,100,242,102, 6, 16, 27,209, 0,100,234, 84, 67, /* 0x 250 */
69,244, 88, 0, 34, 5,146,134,215, 71, 24,218, 24,218, 81,203, /* 0x 260 */
255,252, 96,134, 44, 60,117,112, 52, 49,117, 51, 32, 78, 34, 68, /* 0x 270 */
211,216,211,195,217,145, 22, 24,103, 10,182, 5,102,244, 67,233, /* 0x 280 */
0,254, 96,242, 78,215, 1,248, 0,158, 0, 2 /* 0x 290 */
};
+67
View File
@@ -0,0 +1,67 @@
/* l_t_n2bs.h -- created from l_t_n2bs.bin, 530 (0x212) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV2B_LOADER_SMALL_ADLER32 0xdbbdb30f
#define NRV2B_LOADER_SMALL_CRC32 0xa0c13a80
unsigned char nrv2b_loader_small[530] = {
32, 8,103, 6, 46,104, 0, 4, 96, 4, 32, 47, 0, 4, 72,231, /* 0x 0 */
127,254, 36, 64, 80,138, 44, 90, 40, 14, 36,188,117,112, 49, 49, /* 0x 10 */
221,218, 36,206, 36,188,117,112, 49, 50,221,218, 40, 82, 36,206, /* 0x 20 */
36,188,117,112, 49, 51, 38, 68,215,252,117,112, 50, 49, 32, 60, /* 0x 30 */
117,112, 50, 50, 39, 36,117, 49,102,250, 69,250, 0,182, 47, 4, /* 0x 40 */
122, 70, 63, 34, 83,133,100,250, 63,124, 78,113, 0,124, 97, 26, /* 0x 50 */
40, 68,112,128,126,255,124,152,235, 78, 36, 68,213,252,117,112, /* 0x 60 */
51, 49, 78,210, 44,195,117, 52,102,250, 72,120,255,255, 66,167, /* 0x 70 */
47, 60, 1, 84, 0, 22, 78, 65, 79,239, 0, 12, 74,128,103, 96, /* 0x 80 */
72,122, 0, 16, 63, 60, 0, 38, 78, 78, 92,143, 96, 82, 46, 73, /* 0x 90 */
78,208, 47, 56, 0, 16, 47, 56, 0, 44, 47, 56, 0,244, 34, 79, /* 0x a0 */
65,250,255,236, 33,200, 0, 16, 33,200, 0, 44, 33,200, 0,244, /* 0x b0 */
78,113, 65,250, 0, 6,244,248, 96, 22, 65,250, 0, 20, 78,122, /* 0x c0 */
0, 2, 34, 0, 0, 65, 8, 8, 78,123, 16, 2, 78,123, 0, 2, /* 0x d0 */
33,223, 0,244, 33,223, 0, 44, 33,223, 0, 16, 78,113, 78,117, /* 0x e0 */
78,117, 79,239, 0,146, 76,223,127,254, 32, 8,103, 2,159,207, /* 0x f0 */
78,249, 10, 36, 73,100, 58, 32, 85, 80, 88, 32, 40, 67, 41, 32, /* 0x 100 */
49, 57, 57, 54, 45, 50, 48, 48, 53, 32,116,104,101, 32, 85, 80, /* 0x 110 */
88, 32, 84,101, 97,109, 46, 32, 65,108,108, 32, 82,105,103,104, /* 0x 120 */
116,115, 32, 82,101,115,101,114,118,101,100, 46, 32,104,116,116, /* 0x 130 */
112, 58, 47, 47,117,112,120, 46,115,102, 46,110,101,116, 32, 36, /* 0x 140 */
10, 0, 0, 0, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, /* 0x 150 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 160 */
0, 0, 0, 45, 24,219,208, 0,102, 4, 16, 27,209, 0,101,244, /* 0x 170 */
114, 1,118, 0,208, 0,102, 4, 16, 27,209, 0,211,129,208, 0, /* 0x 180 */
102, 4, 16, 27,209, 0,100,236, 87,129,101, 10,225,137, 18, 27, /* 0x 190 */
70,129,103, 70, 42, 1,208, 0,102, 4, 16, 27,209, 0,215, 67, /* 0x 1a0 */
208, 0,102, 4, 16, 27,209, 0,215, 67, 74, 67,102, 24, 82, 67, /* 0x 1b0 */
208, 0,102, 4, 16, 27,209, 0,215, 67,208, 0,102, 4, 16, 27, /* 0x 1c0 */
209, 0,100,236, 84, 67, 69,244, 88, 0, 34, 5,146,134,215, 71, /* 0x 1d0 */
24,218, 24,218, 81,203,255,252, 96,140, 44, 60,117,112, 52, 49, /* 0x 1e0 */
117, 51, 32, 78, 34, 68,211,216,211,195,217,145, 22, 24,103, 10, /* 0x 1f0 */
182, 5,102,244, 67,233, 0,254, 96,242, 78,215, 1,116, 0,152, /* 0x 200 */
0, 2 /* 0x 210 */
};
+76
View File
@@ -0,0 +1,76 @@
/* l_t_n2d.h -- created from l_t_n2d.bin, 688 (0x2b0) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV2D_LOADER_ADLER32 0x85f8f45e
#define NRV2D_LOADER_CRC32 0x55102734
unsigned char nrv2d_loader[688] = {
32, 8,103, 6, 46,104, 0, 4, 96, 4, 32, 47, 0, 4, 72,231, /* 0x 0 */
127,254, 36, 64, 80,138, 44, 90, 40, 14, 36,188,117,112, 49, 49, /* 0x 10 */
221,218, 36,206, 36,188,117,112, 49, 50,221,218, 40, 82, 36,206, /* 0x 20 */
36,188,117,112, 49, 51, 38, 68,215,252,117,112, 50, 49, 32, 60, /* 0x 30 */
117,112, 50, 50, 73,236,255, 96, 76,236, 39,238, 0,120, 72,227, /* 0x 40 */
119,228, 76,236, 39,238, 0, 80, 72,227,119,228, 76,236, 39,238, /* 0x 50 */
0, 40, 72,227,119,228, 76,212, 39,238, 72,227,119,228,117, 49, /* 0x 60 */
102,210,117, 50, 39, 36, 81,200,255,252, 69,250, 0,188, 47, 4, /* 0x 70 */
122, 73, 63, 34, 83,133,100,250, 63,124, 78,113, 0,130, 97, 32, /* 0x 80 */
40, 68,112,128,126,255,124,176,233, 78, 36, 68,213,252,117,112, /* 0x 90 */
51, 49, 78,210, 44,195, 44,195, 44,195, 44,195,117, 52,102,244, /* 0x a0 */
72,120,255,255, 66,167, 47, 60, 1, 84, 0, 22, 78, 65, 79,239, /* 0x b0 */
0, 12, 74,128,103, 96, 72,122, 0, 16, 63, 60, 0, 38, 78, 78, /* 0x c0 */
92,143, 96, 82, 46, 73, 78,208, 47, 56, 0, 16, 47, 56, 0, 44, /* 0x d0 */
47, 56, 0,244, 34, 79, 65,250,255,236, 33,200, 0, 16, 33,200, /* 0x e0 */
0, 44, 33,200, 0,244, 78,113, 65,250, 0, 6,244,248, 96, 22, /* 0x f0 */
65,250, 0, 20, 78,122, 0, 2, 34, 0, 0, 65, 8, 8, 78,123, /* 0x 100 */
16, 2, 78,123, 0, 2, 33,223, 0,244, 33,223, 0, 44, 33,223, /* 0x 110 */
0, 16, 78,113, 78,117, 78,117, 79,239, 0,152, 76,223,127,254, /* 0x 120 */
32, 8,103, 2,159,207, 78,249, 10, 0, 36, 73,110,102,111, 58, /* 0x 130 */
32, 84,104,105,115, 32,102,105,108,101, 32,105,115, 32,112, 97, /* 0x 140 */
99,107,101,100, 32,119,105,116,104, 32,116,104,101, 32, 85, 80, /* 0x 150 */
88, 32,101,120,101, 99,117,116, 97, 98,108,101, 32,112, 97, 99, /* 0x 160 */
107,101,114, 32,104,116,116,112, 58, 47, 47,117,112,120, 46,115, /* 0x 170 */
102, 46,110,101,116, 32, 36, 10, 0, 36, 73,100, 58, 32, 85, 80, /* 0x 180 */
88, 32, 85, 80, 88, 86, 32, 67,111,112,121,114,105,103,104,116, /* 0x 190 */
32, 40, 67, 41, 32, 49, 57, 57, 54, 45, 50, 48, 48, 53, 32,116, /* 0x 1a0 */
104,101, 32, 85, 80, 88, 32, 84,101, 97,109, 46, 32, 65,108,108, /* 0x 1b0 */
32, 82,105,103,104,116,115, 32, 82,101,115,101,114,118,101,100, /* 0x 1c0 */
46, 32, 36, 10, 0, 0, 0, 0, 85, 80, 88, 33,161,216,208,213, /* 0x 1d0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 1e0 */
0, 0, 0, 0, 0, 0, 0, 45, 24,219,208, 0,100, 8,102,248, /* 0x 1f0 */
16, 27,209, 0,101,242,114, 1,118, 0,208, 0,102, 4, 16, 27, /* 0x 200 */
209, 0,211, 65,208, 0,100, 8,102, 22, 16, 27,209, 0,101, 16, /* 0x 210 */
83, 65,208, 0,102, 4, 16, 27,209, 0,211, 65,106,220, 96, 88, /* 0x 220 */
87, 65,101, 12,225,137, 18, 27, 70,129,226,129, 42, 1, 96, 8, /* 0x 230 */
208, 0,102, 4, 16, 27,209, 0,215, 67,208, 0,102, 4, 16, 27, /* 0x 240 */
209, 0,215, 67, 74, 67,102, 26, 82, 67,208, 0,102, 4, 16, 27, /* 0x 250 */
209, 0,215, 67,208, 0,100,242,102, 6, 16, 27,209, 0,100,234, /* 0x 260 */
84, 67, 69,244, 88, 0, 34, 5,146,134,215, 71, 24,218, 24,218, /* 0x 270 */
81,203,255,252, 96, 0,255,116, 44, 60,117,112, 52, 49,117, 51, /* 0x 280 */
32, 78, 34, 68,211,216,211,195,217,145, 22, 24,103, 10,182, 5, /* 0x 290 */
102,244, 67,233, 0,254, 96,242, 78,215, 1,248, 0,178, 0, 2 /* 0x 2a0 */
};

Some files were not shown because too many files have changed in this diff Show More