hope this works

This commit is contained in:
twoneis 2025-04-04 00:36:58 +02:00
parent f686c61ad3
commit e02bc887ca
4 changed files with 11 additions and 5 deletions

View file

@ -1,13 +1,23 @@
obj-m += lkm.o
CC := gcc
SOURCES := $(wildcard *.c)
TARGETS := $(SOURCES:.c=.o)
CFLAGS += -g
CFLAGS += -O0
CFLAGS += -Wall
CFLAGS += -Wextra
all: $(TARGETS)
run: leak
./leak.o
%.o: %.c
$(CC) $< $(CFLAGS) -o $@
lkm:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules

View file

@ -7,7 +7,7 @@
#include <string.h>
#include <unistd.h>
#include "pipe_utils.h"
#include "pipe_utils.c"
// where does this come from?
#define OBJS_PER_SLAB 42

View file

@ -1,11 +1,8 @@
#define _GNU_SOURCE
#include <sys/socket.h>
#include <fcntl.h>
#include <unistd.h>
#include "pipe_utils.h"
void
allocation_primitive(int fd[2])
{

View file

@ -1 +0,0 @@
void allocation_primitive(int fd[2]);