Commit Graph

1060 Commits

Author SHA1 Message Date
Petr Zemek
0456a3d0b3 Remove trailing whitespace from all source files.
Reasons (in Czech): https://cs-blog.petrzemek.net/2011-09-09-proc-se-zbavovat-nadbytecnych-bilych-znaku
2019-05-30 13:39:34 +02:00
Petr Zemek
5352b359f6 Add a new CHANGELOG entry (#268, #533, #550). 2019-05-29 12:58:57 +02:00
Peter Matula
3905f47ff4 Merge branch 'arm64' 2019-05-29 12:34:19 +02:00
Peter Matula
1bda328716
travis.yml: build and run unit tests only on macOS
Linux builds are often timeouting when unit tests are enabled.
2019-05-29 12:24:25 +02:00
Marek Milkovič
bc9b912d5a Updated reference to the latest PeLib 2019-05-29 12:15:48 +02:00
Marek Milkovič
71c68c485f
Merge pull request #580 from avast/LZ_ImportTableGetter
* Dumping import directory to console is now more pretty
2019-05-29 12:13:26 +02:00
Zezula Ladislav
a1c00b6673 * Dumping import directory is now a more pretty 2019-05-28 10:40:30 +02:00
Peter Matula
fd3ee25205 Merge branch 'master' into arm64
# Conflicts:
#	deps/capstone/CMakeLists.txt
2019-05-27 10:28:42 +02:00
Matej Kastak
24b50de5bb Bin2LlvmIr:Check for contants optimalization to process max 64bitnum
- This check was necessary to fix assertions in decompilations for
  arm64
- maxC->getValue().getActiveBits() is used to still alow biger
  contants, that can be represented by uint64_t
2019-05-27 10:24:39 +02:00
Matej Kastak
0579735102 Arm64: Updated headers and comments 2019-05-27 10:24:39 +02:00
Marek Milkovič
960da61721 Added TLS presentation to changelog (#417, #523) 2019-05-03 23:57:26 +02:00
JakubPruzinec
6053642554 TLS parsing and presentation (#523)
* TLS parsing and presentation

* override added

* unsigned short to fixed value

* addresses represented with 64 bits

* Updated reference to pelib
2019-05-03 23:14:44 +02:00
Marek Milkovič
58494613b0 Revert "Try to build just llvm in travis right now"
This reverts commit 0ddbb6b3cd.
2019-05-03 20:45:48 +02:00
Marek Milkovič
0ddbb6b3cd Try to build just llvm in travis right now
Currently all our build in Travis CI time out so let's try to regenerate
the cache because it seems like it is corrupted since we upgraded to
Xenail.
2019-05-03 20:20:51 +02:00
Peter Matula
a93cebbef0
README.md: remove mention about no prebuild packages for macOS and Linux 2019-05-02 09:38:17 +02:00
Peter Matula
f2e90d687a CHANGELOG.md: close #526, add entry for #526. 2019-04-30 15:38:23 +02:00
Peter Matula
658bb9d545 deps: fix #279, support for using local repository clones of RetDec deps 2019-04-25 14:08:13 +02:00
Petr Zemek
14ee574f66
Merge pull request #559 from mohe2015/patch-1
Don't reinstall packages on Arch Linux [ci skip]
2019-04-24 14:12:46 +02:00
Moritz
c363d8520e
Don't reinstall packages on Arch Linux [ci skip] 2019-04-24 14:03:02 +02:00
Petr Zemek
3a53dbfa6b scripts: Fix generation of a log file when calling retdec-decompiler.py --generate-log.
The original escaping was flawed (for example, it did not escape backslashes,
which caused the produced JSONs to be invalid). The fix is to use json.dump() [1],
which properly escapes all the needed characters.

[1] https://docs.python.org/3/library/json.html#json.dump
2019-04-24 13:54:09 +02:00
Peter Matula
2e4fbed5cb CHANGELOG.md: add entry for #540, close #540.
#540 was fixed by 03801e4ffd.
2019-04-24 13:51:52 +02:00
Petr Zemek
03801e4ffd Parallelize compilation of YARA rules during installation (#540) (#542)
* support: Parallelize compilation of YARA rules during installation (#540).

When you run cmake with -DRETDEC_COMPILE_YARA=ON (the default), YARA rules that
RetDec uses are compiled during the installation step, which makes
decompilations run faster (no need to compile them on the fly during each
decompilation). The issue is that YARA rules are compiled sequentially, which
takes around 50 seconds to compile them on my machine.

This commit parallelizes their compilation by using all available cores. Now,
the compilation takes around 10 seconds on my machine (Intel Xeon E5-1650 @
3.60GHz, 6 cores with HT = 12 threads).

* support: Do not create a pool when there are no YARA files to compile.

There is no need to create a thread pool when there are no YARA files to
compile. This saves us a bit of time during each re-install.
2019-04-24 13:49:01 +02:00
Peter Matula
7a2018bb4d Merge branch 'llvm-8'
# Conflicts:
#	CHANGELOG.md
#	deps/llvm/CMakeLists.txt
2019-04-24 13:25:29 +02:00
Peter Matula
8bee3e2aa0 CHANGELOG.md: add entry for #110. fix #110. 2019-04-24 13:21:40 +02:00
Peter Matula
3db1534759 deps/llvm: update reference to the latest commit. 2019-04-24 13:19:25 +02:00
Peter Matula
5529038520 travis+appveyor: do not run for llvm-8 branch. 2019-04-24 12:16:24 +02:00
Peter Matula
a558ac0a10 tests/bin2llvmir: remove load/store alignment before comparing LLVM IRs. 2019-04-23 16:42:14 +02:00
Marek Milkovič
c63cc93a6e Updated yaramod to version 2.5.0 2019-04-21 18:52:27 +02:00
Petr Zemek
fe27942fb3 scripts: Improve the missing-Graphviz error message by mentioning PATH.
RetDec runs the `dot` (or `dot.exe` on Windows) program from Graphivz to convert
the graphs from `.dot` files to PNG files. This program has to be reachable
from PATH. We should mention this as it may not be obvious (see #553).
2019-04-20 11:26:43 +02:00
Peter Matula
506bb9a8c6 deps/llvm: update reference to the latest commit. 2019-04-18 17:31:31 +02:00
Peter Matula
6fc18e4644 bin2llvmir/inst_opt: use doxygen's \code to mark LLVM IR in comments.
This will prevent doxygen parsing erros caused by @g and @gv LLVM IR
global variables - doxygen thought they are commands.
2019-04-18 13:06:21 +02:00
Peter Matula
da24c7c42a travis+appveyor: run builds for llvm-8 branch. 2019-04-18 12:04:42 +02:00
Peter Matula
da30382cd7 deps/llvm: update reference to the latest commit. 2019-04-17 17:21:06 +02:00
Peter Matula
99a938c1da bin2llvmir/inst_opt: add method countering LLVM load optimizations. 2019-04-17 16:22:32 +02:00
MatejKastak
3ab9797b53 Arm64 (#550)
* Arm64: System registers + bariers + Pseudo for vector registers

* Arm64: Neg instruction can take d registers for some reason

* Arm64: Helper functions to extract value from vector registers

- those are used in simple mov instructions or sometimes in pseudo

* Arm64: Regular ADD can take FP operands + test

- include function decl in header from last commit

* Arm64: PSTATE operands + More systemregs

- fixed FMinMax and Movi vector variants to generate psuedo

* Arm64: Create missing register type

* Arm64: Generate all conditional codes

- Fixed generation of AL and NV conditions

* Arm64: Cond branch tests

- altered the definition of conditional instruction to be only true if
  ARM64_CC_INVALID, and generate allways true for AL and NV

* Arm64: Missing B16 register

* Arm64: Temporary solution for Msl shift and stopped ignoring DMB ins

* Arm64: UXTX + SXTX extensions fix

* Arm64: try to solve unhandled regs better

* Arm64: Add and sub can have fp registers as operands

For some reason this is valid and the operation is addition integerwise

* Arm64: Removed debug output
2019-04-17 11:50:05 +02:00
Peter Matula
1dedd45939 include <llvm/Object/Coff.h> on several other places to fix compilation 2019-04-17 11:36:46 +02:00
Petr Zemek
f62b4c0684 Remove useless trailing whitespace. 2019-04-17 09:48:44 +02:00
Petr Zemek
5b478c72df Fix links to repositories after the move from avast-tl to avast.
We have moved all of our repositories in https://github.com/avast-tl to
https://github.com/avast.
2019-04-17 09:09:58 +02:00
Petr Zemek
0648af25b1 Add a missing newline to the end of LICENSE-THIRD-PARTY. 2019-04-17 09:01:30 +02:00
stepanek-m
820d514067 fileformat: Hashes of certificates changed to lowercase (#543)
* fileformat: Hashes of certificates changed to lowercase

* Added comment to make meaning of 'false' argument clear
2019-04-16 18:21:18 +02:00
Peter Matula
a6bae22280 fileformat/coff: do not include <llvm/Object/Coff.h> in our headers.
This file defines many symbols that are also defined in winnt.h.
Including it in our headers might cause that both files are included at
one place and name collisions occurr.
2019-04-16 13:19:35 +02:00
Peter Matula
b62c2fc133 deps/llvm: add -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON.
It is necessary for builds with older MS Visual Studios - e.g. 2015.
2019-04-16 13:16:47 +02:00
Peter Matula
fac328a4f0 llvmir-emul: remove "include <llvm/IR/TypeBuilder.h>".
This header is no longer in LLVm 8.0.0.
2019-04-10 15:46:39 +02:00
Peter Matula
510ac4f541 deps/llvm: use commit ref from repository instead of local directory. 2019-04-10 15:37:20 +02:00
Peter Matula
7e152aedd0 bin2llvmir/inst_opt: add LLVM -instcombine countering optimization.
This is related to commit d8963f9f3ea7db217a15646a99eaf1b7df2ef00b in
our LLVM repository.
2019-04-10 12:55:59 +02:00
Petr Zemek
a5f2992ac5 support: Fix the order of imports in install-yara.py.
We order imports alphabetically.
2019-04-08 18:28:38 +02:00
Peter Matula
835e45ecc5 bin2llvmir/idioms: make exchangeCopysign() pattern commutative. 2019-04-08 15:36:53 +02:00
Petr Zemek
71e9305819 scripts: Make install-yara.py executable.
install-share.py is executable, so make also install-yara executable
(uniformity).
2019-04-08 05:39:55 +02:00
Marek Milkovič
7872f7e241 Updated CHANGELOG with presentation of version info (#408, #519) 2019-04-05 13:28:34 +02:00
Jakub Pruzinec
e307cf5020 versionInfo class removed, comments fixed 2019-04-05 13:22:53 +02:00