Apple Clang 4.2 on Mac OS X 10.7 Lion does support avx2, but it has
issues with some of the asm syntax used, in particular jc and some mov
syntax.
So we add an additional check for a short assembly snippet.
The test for avx512 could result in false-positives because the
_mm256_setr_epi64x intrinsic requires only AVX, not AVX512. Specifically what
is needed here is AVX512VL.
In addition, not passing the -mavx* args to the asm compilation failed the
build on macOS High Sierra and below (Apple LLVM version 10.0.0,
clang-1000.11.45.5)
This commit rewrites completely how RzBinPlugin are used to load info
into the RzBinObject structure.
Main changes are:
- Avoid looping multiple times to set the same data:
now the data is cycled only once to rebase addresses, demangle strings
and to make each loaded structure similar to each other.
- rz_bin_demangle is now demangling only strings:
the old implementation was a hack over a hack to add classes & methods
into the RzBinObject while demangling a string.
This allowed methods and classes to be added to RzBinObject when for
example invoking `is` or other printing commands.
This was meant to be an "optimization" to avoid looping and doing
things on-the-fly.
- Now the demangling is done after guessing the language used in the bin.
This is done to avoid looping to various demanglers hoping that a
string is going to be correctly demangled.
After each string is demangled, the string is given to the language
related function which adds classes, methods and fields into the
RzBinObject fields.
- Swift handling is a special case, since the demangler can be disabled
via -Duse_swift_demangler.
The issue with the swift demangler is that is not correctly demangling
strings and outputting swift code, but instead is creating something
that sometimes works, sometimes doesn't.
Also the old code only added fields and never methods for "reasons",
and the new code just uses what the old code was doing as is.
- The new code also takes advantage of the language detection, which now
happens before the demangling of symbols, imports and relocs.
* Improve cmd_help.yaml and fix a small bug
* Add support for 64bit random numbers
* Make a distinction between 32- and 64-bit PRNG
* Add documentation for new functions
* Change the RBTree test to use 32-bit random numbers
* cmd: Fix summary of few "L" sub-commands
* util: start decluttering plugins handling
- Add Doxygen docs
- Remove unused API functions and make others internal only
- Use RzLibType enum for plugin type instead of int
* util: move dlopen/dlsym/dlclose to rz_sys
* util: make rz_lib_open/close return bool
* util: simplify rz_lib_add_handler and rz_lib_open*
* libs: implement rz_*_plugin_del to remove a plugin
* core: remove commands from RzCmd when removing plugins
* librz: call plugins 'fini' method when removing a plugin
* core/cmd: do not fail if the hashmap removal fails
When removing a group command, the inner command might have the same
name, thus it would result in trying to remove the same name twice.
Ignore it, as it is fine.
* librz: make RzCrypto plugins handling like the others
* librz/crypto: add rz_crypto_reset and use it
* librz: allocate the plugin structures before adding them
Adds /*<type>*/ comments and a linter check from rz-bindgen to enforce
their existence and consistency
Also includes the following fixes made when adding the annotations:
* removed unused intern_table arguments in pyc_dis.c, pyc_dis.h, asm_pyc.c
* removed unused classes argument from place_nodes in agraph.c
* removed unused recurse and recurse_bb functions in canalysis.c
* removed unused vars field from RzPrint struct
* removed unused RzAnalysisType* structs from rz_analysis.h
* removed unused list field from RzEgg struct
* fixed bug in bp_plugin.c where duplication-checking logic iterates over the wrong list
* removed unused q_regs field from RzDebug struct
* removed unused backtrace field from RzDebugPlugin struct
* removed unused classes_list field from RzBinNXOObj struct
* removed unused methods_list and classes_list fields from RzBinZimgObj struct
libuv was only ever used for the tcp server for almost 4 years. Since
the non-libuv implementation of that is working now, it can be dropped
entirely without sacrificing functionality.
* build: fix compilation on Termux by using meson checks
* build: fix compilation on termux, which is recognized as linux
meson identifies termux as "linux" system, however pthread_sigmask is
not available there. Since pthread-fixes.c just defines
uv__pthread_sigmask we include it also in regular linux builds, because
the function is then used automatically instead of pthread_sigmask only
when __ANDROID__ is defined.
* subprojects/rzwinkd: define cc in meson.build before use
* Ignore resent packets
* Resend packet if we didn't get an ACK
* Break if Ctrl-C is pressed
* Always wait for a state change packet in debug event wait function
Since 170ab3eb3b, `ht_pp.h` was included
before the full `sdb.h`, making the symbols mangled in C++ and thus
breaking Cutter by default.
This has been fixed in sdb now.