| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
linux/ptrace.h
|
|
|
|
Since Android has dropped support for GCC most probably it will not affect the
targets. Copying to be aligned with core makefile common CFLAGS and for
possible future GCC support.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
|
|
libcommon requires libblocksruntime when compiled with clang. A common static
libs flag has been created to automatically include dep for all three targets when
compiling with clang. '-fblocks' flag is already propagated from
'COMMON_CFLAGS'.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
|
|
|
|
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
It’s mostly triggered with some older versions of the Android NDK
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
libhfuzz is not an actual dependency of the honggfuzz standalone tool. Instead it
is simply desired to always build it with the build config matching the main tool so
that it is available to user for wrapping targets with instrumentation.
Having libhfuzz as part of LOCAL_STATIC_LIBRARIES effectively instructs NDK
automation to include it as dependency. This results into resolving some of the
external libc dependencies (strcmp, strstr, etc.) with the ones implemented from
libhfuzz. This is not desired since it breaks functionality.
Replace LOCAL_STATIC_LIBRARIES dependency with a proper APP_MODULES
list when invoking ndk-build to always build both modules.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
If target Android API level changed from previous build, an initial clean
will be triggered. Although, due to the way that make expands expressions
at first run, the file check for NDK toolchain config file will be also true while
the file will have been deleted from triggered clean. This effectively triggers
a shell cat against a missing file resulting into an ugly warning being print.
To avoid using secondary expansion, use a simple bool variable which checks
if a clean has already happened before re-trying the checks against a different
config.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
ANDROID_API is not always visible for Android.mk, thus not safe to be used.
Prefer APP_PLATFORM which is always set due the way ndk-build is invoked
from master makefile.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Android NDK is failing to automatically detect if input API level
or build toolchain has been changed. As such it's not forcing an
objs clean. Deal with such case by using build attribute cache files.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
All CPU targets have matching names expect arm64 (vs aarch64). Create
a softlink for this case so that we don't need create more target naming
conventions in makefiles.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
libhfuzz is compiled as static library using the BUILD_STATIC_LIBRARY
template from Android NDK. The static library is added as "virtual"
dependency to main honggfuzz module, otherwise the build system
will ignore it since it detects that the module target is not used. The
libhfuzz extra cflags are matching the ones from master Makefile. Testing
of the libhfuzz is still pending since it requires clang 4.0 while Android is
still defaulting to 3.8.
Also tided-up a little bit the Android.mk so that common configuration is
shared at the top of the file for both target modules.
Finally an additional post build step was required to copy the generated
.a file into the project dir so that both output files are under the same file.
Static libraries compiled from NDK templates are not automatically added
to project output dirs since they purposed for internal dependencies by
default.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Seems to be safer for NDK toolchains to link
with lib atomic (-latomic).
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Glue with libBlocksRuntime and compile with
minimum API 23 which works with current HF
ptrace backend.
Use 'ANDROID_CLANG=true' flag to enable
clang builds (default off)
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
# third_party/android/scripts/compile-libBlocksRuntime.sh third_party/android/libBlocksRuntime arm
# make android ANDROID_CLANG=true
|
|
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
|
|
|
|
Build 'pt.c' component to resolve undefined references
to 'arch_ptAnalyze()' from 'arch_perfMmapParse()'. IPT
has no value yet for Android x86/x64_86 ABIs due to
very old kernels. Add component instead of a disabling
macro for future benefit when new kernels adopted.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Initial commit of sanitizer coverage data parsing. Currently
only number of PCs is measured. More coverage data to
be added soon.
rawunpack is still pending for targets being terminated
with signals that are not handled by supported sanitizers.
Testing so far included "-fsanitize-coverage=func"
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Reduce allocated stack memory & add compile
warning to verify stack size < 50k
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Small fixes spotted when compiling for MAC & Android.
* Print-out format fixes. Casts have been introduced at some places to clarify the matching type and satisfy tested compilers.
* Update Android makefile with new cmd parsing component.
* Wrap getpid() with arch defines, enabling syscall only for LINUX arch.
* Clean-up unused headers in cmdline.c
* Split LOG_HELP print messages since clang was complaining:
cmdline.c:88:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Clean-up when OPENSSL_ARMCAP flag is exported
to avoid possible future confusion
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
* Perf is setting 'exclude_callchain_kernel' flag which requires kernels >= 3.7.
Detect old kernels and abort archInit() if not compatible.
TODO: See if disabling that flag at runtime for non-compatible kernels affects perf operations
* For ARM kernels running Android API <= 21, if fuzzing target links to
libcrypto (OpenSSL), OPENSSL_cpuid_setup initialization is triggering a
SIGILL/ILLOPC at armv7_tick(). Setups using BoringSSL (API >= 22) are
not affected.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
Clang is not supported yet due to local_thread implementation.
Clang uses __aeabi_read_tp() which not supported by bionic.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
* Missing display.c from Android makefile (TODO: Export some
variables from main makefile to auto-inherit without need to manually update both)
* Extra semicolon (apart GCC doesn't give a damn about it)
* Integer format fix
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
libunwind imports have to be re-ordered to pick the correct
"_Ux86_64_setcontext" definition. Small typo fixes too.
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
|
|
|
|
|
|
* Fork upstream libunwind and cross-compile with Android NDK
* libunwind is also used for proc symbol resolve instead of bfd
* Replace BDF lib with capstone for disassembling actions
* Engineer build & patch scripts to support Android ARM, ARM64, x86, x86_64
* Rename linux/ptrace.* to linux/ptrace_utils.* since it conflicts with Android platform includes for ptrace API
* Wrap register & instruction sizes under macros to reflect sizes for supported CPU arch (makes debugging easier)
* Add / Implement missing definitions / functions for Android
* Improve Android build process
|
|
* Add Android API 21 support (make android) using POSIX / SIGNAL arch
* Add support for targets with args of type arg=___FILE___
* Add .gitignore
|