Commit Graph

1920 Commits

Author SHA1 Message Date
Peter Matula
3723cc295b deps/llvm: update referene to latest commmit from master. 2018-01-26 10:32:17 +01:00
Peter Matula
23ba7b944f Merge branch 'faster-build' 2018-01-26 10:27:01 +01:00
Petr Zemek
d23f2c6955 scripts: Unify formatting in retdec-decompiler.sh. 2018-01-25 17:29:54 +01:00
Michal Bandzi
87c48633ff cpdetect: cosmetic, minor upgrades in heuristics
Some useless code was removed, horizontal size od code was shrinked
below 100 characters where possible, added and corrected comments.
2018-01-25 16:13:57 +01:00
Marek Milkovič
fd7fa3f4d3 Merge branch 'yangfl-filesystem-path-enh' 2018-01-25 07:31:23 +01:00
Marek Milkovič
b610e38433 Added memory freeing into SCOPE_EXIT in case anything throws an
exception
2018-01-25 07:30:18 +01:00
Marek Milkovič
1b193f1d81 Merge branch 'upstream' of git://github.com/yangfl/retdec into yangfl-filesystem-path-enh 2018-01-25 06:58:25 +01:00
Petr Zemek
dcfc5ca224 unpacker: Fix a typo in the description of DynamicBuffer::operator=(). 2018-01-24 20:11:43 +01:00
Petr Zemek
b3f8f824d2 utils: Make tests for time-related functions timezone-agnostic (#90).
In timestampToDate(), std::localtime() is called to convert the timestamp into
a date and time. Since std::localtime() is timezone-aware, we have to force a
specific timezone (UTC) in tests to make them timezone-agnostic. After each
test is run, we set the timezone back to its original value.
2018-01-24 09:01:22 +01:00
Petr Zemek
7032c4231d utils: Rename OS_LINUX to OS_UNIX.
At the moment, we (unofficially) support also macOS, so differentiate only
between Windows and UNIX by defining the following two symbolic constants:
* OS_WINDOWS
* OS_UNIX
2018-01-24 08:09:57 +01:00
Petr Zemek
0067f9f70d utils: Unify formatting in the time module.
Inside a single file, we should use definitely use the same format.
2018-01-24 07:56:39 +01:00
Petr Zemek
f9f58bc174 Update GoogleTest to its latest version (current master).
The new version can be built faster:

    Original version:

        real    0m11.028s
        user    0m10.241s
        sys     0m0.782s

    Latest version:

        real    0m5.178s
        user    0m4.753s
        sys     0m0.425s

As a related change, this commit adds missing dependencies between the
gtest_main, gmock, and gmock_main libraries. In the original version,
libgmock.a contained libgtest.a and libgmock_main.a contained libgmock.a. Now,
libgmock.a is without libgtest.a and libgmock_main.a is without libgmock.a.
Thus, if one wants to link gmock_main, he or she has to also link gmock and
gtest. This has been reflected in the dependencies.
2018-01-23 13:41:29 +01:00
Peter Matula
5c2c13429a deps/openssl: better log msgs. 2018-01-23 11:24:25 +01:00
yangfl
a22178d214 Let realpath allocate a buffer itself 2018-01-23 18:04:38 +08:00
Petr Zemek
8f1d7f7e38 Mention #100 in CHANGELOG. 2018-01-23 08:20:33 +01:00
Petr Zemek
b0a9829e8c Update the used version of avast-tl/libdwarf.
The updated version contains commit 85465d5e235cc2d2f90d04016d6aca1a452d0e73,
which fixes the setting of RPATH during installation (#100).
2018-01-23 08:17:09 +01:00
Peter Matula
315adc431f deps/openssl: simplify openssl-crypto target from find_package() 2018-01-22 17:50:14 +01:00
Peter Matula
1cfc9c4fbb deps/openssl: use system OpenSLL if it exists. 2018-01-22 17:31:42 +01:00
Peter Matula
296ebfe5fd Merge branch 'master' into faster-build
# Conflicts:
#	deps/capstone/CMakeLists.txt
#	deps/elfio/CMakeLists.txt
#	deps/llvm/CMakeLists.txt
2018-01-22 16:32:05 +01:00
Peter Matula
a991b17a7f deps: propagate C/C++ compilers to all deps. 2018-01-22 16:20:10 +01:00
Petr Zemek
8bf8507f05 Merge branch 'fix-path-detections' (#21). 2018-01-21 11:39:29 +01:00
Petr Zemek
90767ab6f8 Add support for Cygwin paths into scripts (#21).
Based on #21:

    The scripts will also fail on Cygwin, due to Cygwin's virtual paths (c:
    becomes /cygdrive/c/, and so on), which are not transformed by readlink.
    Instead, one needs to use cygpath, to get the real windows path. So I've
    added get_realpath to retdec-utils.sh, to check if the scripts are running
    on Cygwin, and if they do, to use cygpath -ma (-a = absolute path, and -m =
    mixed, i.e., forward slashes rather than backward slashes). Otherwise it
    just uses readlink.
2018-01-21 10:56:59 +01:00
Petr Zemek
d0086e63c6 Fix the detection of SCRIPT_DIR in the beginning of scripts (#21).
Based on #21:

    Right now, the scripts used by retdec (e.g. retdec-decompiler.sh) will fail
    if they're symlinked, i.e., retdec-decompiler.sh symlinked to
    ~/bin/retdec-decompiler, because both ${BASH_SOURCE} and $0 will always
    point at the symlinked path, rather than the original, so $SCRIPT_DIR would
    become invalid.

    This is easy enough to fix, by doing dirname "$(readlink -e "$0")", rather
    than the pretty ancient style of cding to dirname "$0" (pretty sure this
    has been out of date since the inception of Linux itself ...).
2018-01-21 10:52:32 +01:00
Petr Zemek
d5d173783b Rename SCRIPTPATH to SCRIPT_DIR in scripts.
The new name is more appropriate (it is a directory) and consistent with the
naming of other variables storing directory paths.
2018-01-21 10:48:18 +01:00
Peter Matula
f036d11a6e use URL instead of SOURCE_DIR 2018-01-19 20:06:08 +01:00
Peter Matula
179e785bcf bin2llvmir: remove codegen passes initialization. 2018-01-19 19:36:16 +01:00
Peter Matula
aec8aac4a1 deps/llvm: remove LLVMAsmPrinter & LLVMSelectionDAG from LLVM_LIB_LIST 2018-01-19 15:44:08 +01:00
Peter Matula
bd54527cb0 deps/llvm: remove execution engine related libs from LLVM_LIB_LIST
The following libs are removed:
	LLVMInterpreter
	LLVMMCJIT
	LLVMOrcJIT
	LLVMExecutionEngine
	LLVMRuntimeDyld
They were used in llvm_emul.
2018-01-19 15:41:06 +01:00
Peter Matula
ccca6a24e6 llvmir_emul: remove unnecessary LLVM includes. 2018-01-19 15:39:27 +01:00
Peter Matula
134f5e66a8 bin2llvmir: remove initializeInstrumentation() & LLVMInstrumentation 2018-01-19 15:21:54 +01:00
Peter Matula
689872a78f bin2llvmir: remove initializeObjCARCOpts() & associated LLVMObjCARCOpts 2018-01-19 15:20:42 +01:00
Peter Matula
edd99a4264 deps/llvm: remove LLVMMCDisassembler from LLVM_LIB_LIST.
It should not be needed.
2018-01-19 15:19:40 +01:00
Peter Matula
a27d0afafa bin2llvmir: do not include LinkAllPasses.h.
It links all the LLVM passes, but we do not need/want all of them -- we
would need all the libraries.
2018-01-19 15:15:11 +01:00
Peter Matula
d7c9f14178 bin2llvmirtool: remove some low-level initializations + associated libs
Removed:
	InitializeAllTargets();
	InitializeAllTargetMCs();
	InitializeAllAsmPrinters();
2018-01-19 14:57:00 +01:00
Peter Matula
9563f1e8c6 deps/llvm: remove one LLVMRuntimeDyld from LLVM_LIB_LIST. 2018-01-19 14:43:01 +01:00
Peter Matula
ffefd3e676 Revert "deps/googletest: update googletest version."
This reverts commit 57f6c248b0.

It was faster to compile, but did not play well with the rest of the code. Will need some work to get it compilable.
2018-01-19 14:41:15 +01:00
Peter Matula
aef8721de1 deps/json: disable unused options. 2018-01-19 13:49:02 +01:00
Peter Matula
57f6c248b0 deps/googletest: update googletest version. 2018-01-19 13:44:22 +01:00
Peter Matula
abd817cb90 deps/elfio: disable CONFIGURE_COMMAND -- this is header only lib. 2018-01-19 13:18:55 +01:00
Peter Matula
361e42b5b0 deps/capstone: disable AT&T asm syntax. 2018-01-19 13:13:04 +01:00
Peter Matula
b659bc6c62 deps/capstone: build only what is actually needed at the moment. 2018-01-19 13:11:12 +01:00
Peter Matula
ec921d8f5b deps/llvm: Disable build of unnecessary LLVM parts. 2018-01-19 12:57:45 +01:00
Peter Matula
3812f7ebc2 Merge branch 'tinyxml2-external-project' 2018-01-19 12:23:10 +01:00
Peter Matula
a9c92af145 deps/googletest: fix windows debug build. 2018-01-19 12:15:48 +01:00
Peter Matula
00cbfd7f09 deps/tinyxml2: set DOWNLOAD_NAME for external project. 2018-01-19 12:12:18 +01:00
Petr Zemek
af24c3fe25 Speedup installation of OpenSSL by disabling installation of docs and man pages.
We need only libraries and includes.

On my PC, this speeds up the installation step for OpenSSL by about 20 seconds.
2018-01-19 12:02:31 +01:00
Petr Zemek
405e21d96f Add DOWNLOAD_NAME for each external project.
Reasons:
- Downloaded archives will have more meaningful names (e.g. capstone.zip
  instead of 27c713fe4f6eaf9721785932d850b6291a6073fe.zip).
- This prevents collisions between projects (e.g. both yaracpp and yaramod are
  in version 1.0.1 at the moment, so they were both downloaded as v1.0.1.zip).
2018-01-19 11:57:50 +01:00
Peter Matula
e0d70a78a0 Merge branch 'master' into tinyxml2-external-project 2018-01-19 11:16:44 +01:00
Peter Matula
3f4329a953 utils: fix windows build. 2018-01-19 11:16:16 +01:00
Peter Matula
754d4a18ec deps: get tinyxml2 via CMake external project. 2018-01-19 10:08:17 +01:00