Skip to content

Commit af9207d

Browse files
committed
Strip binaries
1 parent c692d00 commit af9207d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ $(BPF_OBJ): $(BPF_SRC)
5050
# Build the loader (compiled before eBPF program)
5151
$(LOADER_BIN): $(LOADER_SRCS)
5252
$(CLANG) $(CFLAGS) $^ -o $@ $(LDFLAGS)
53+
objcopy --strip-all --keep-symbol=read_kernel_memory $@ $@_strip
54+
mv $@_strip $@
5355

5456
# Dump vmlinux BTF as C header (only if CORE is enabled)
5557
vmlinux:

dump.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ static int dump_region(const uintptr_t region_start, const uintptr_t region_end,
3636
chunk_end = (region_end - chunk_start + 1 > granule) ? chunk_start + granule - 1 : region_end;
3737
chunk_size = chunk_end - chunk_start + 1;
3838

39-
4039
if ((ret = read_kernel_memory(phys_to_virt(chunk_start), chunk_size, &read_data))) {
4140
fprintf(stderr, "Error reading kernel physical memory. Physical address: 0x%lx, size: 0x%zx. Error code: %d Maybe KFENCE area ?\n", chunk_start, chunk_size, ret);
4241

0 commit comments

Comments
 (0)