Can generate symbole file
This commit is contained in:
parent
84d421a014
commit
86f55a41ef
11
Makefile
11
Makefile
@ -2,9 +2,9 @@
|
|||||||
CPPFLAGS = -MMD
|
CPPFLAGS = -MMD
|
||||||
AS=nasm
|
AS=nasm
|
||||||
ASFLAGS += -f elf32
|
ASFLAGS += -f elf32
|
||||||
LDFLAGS += -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fno-weak -fno-rtti -fno-stack-protector
|
LDFLAGS += -g -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fno-weak -fno-rtti -fno-stack-protector
|
||||||
CFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -fno-stack-protector
|
CFLAGS += -g -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -fno-stack-protector
|
||||||
CXXFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie
|
CXXFLAGS += -g -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie
|
||||||
|
|
||||||
SUBDIRS := core drivers
|
SUBDIRS := core drivers
|
||||||
|
|
||||||
@ -18,6 +18,9 @@ deps = $(csrc:%.c=%.d)
|
|||||||
|
|
||||||
kernel:$(asmobj) $(cobj) linker.ld
|
kernel:$(asmobj) $(cobj) linker.ld
|
||||||
$(CC) -m32 -ffreestanding -nostdlib $(cobj) $(asmobj) -o $@ -T linker.ld
|
$(CC) -m32 -ffreestanding -nostdlib $(cobj) $(asmobj) -o $@ -T linker.ld
|
||||||
|
objcopy --only-keep-debug $@ $@.sym
|
||||||
|
objcopy --strip-debug $@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -41,7 +44,7 @@ test:kernel
|
|||||||
qemu-system-x86_64 -kernel $<
|
qemu-system-x86_64 -kernel $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) kernel $(asmobj) $(cobj) $(deps)
|
$(RM) kernel $(asmobj) $(cobj) $(deps) fd.iso kernel.sym
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include $(deps)
|
-include $(deps)
|
||||||
|
Loading…
Reference in New Issue
Block a user