hope this works
This commit is contained in:
parent
f686c61ad3
commit
e02bc887ca
4 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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])
|
||||
{
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
void allocation_primitive(int fd[2]);
|
Loading…
Add table
Reference in a new issue