Open lks9 opened 1 year ago
I managed to put the src_tracer.c
inside musl:
cd ~/musl/src/
mkdir src_tracer/
cp ~/src-tracer/lib/src_tracer.c src_tracer/
cd ~/musl/include
mkdir src_tracer/
cp ~/src-tracer/include/* src_tracer/
Then run configure, make, etc.
I tested it on alpine linux, it worked well, but some apps like gdb and firefox received a segmentation fault nontheless. And I couldn't debug them with gdb, because of the segv.
I managed to install alpine linux (see #20) with an instrumented musl libc for tracing. This does not yet start recording, since the applications need to start recording explicitely.
The only problem: I now get segfaults for some applications (the system still starts without an issue). This is because
libsrc_tracer.a
is not loaded by musl or the application. But the instrumented musl still refers to_trace*
symbols.Solution: Compile
libsrc_tracer
into either gcc'slibgcc
or musl'slibc
. Sincelibgcc
is loaded unconditionally for all applications, this should be fine.Edit: I compiled
libsrc_tracer
into gcc'slibgcc
, it took one day and in the end it vanished, apparently compiled away. Argh!