Guest User

Untitled

a guest
Nov 9th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. start.S
  2.  
  3. .section .multiboot
  4.  
  5. mov $0xaaaaaaaa, %eax
  6. mov $0xbbbbbbbb, %ebx
  7.  
  8. .section .setup
  9. .global _kernel_entry
  10. _kernel_entry:
  11. mov $0xcccccccc, %ecx
  12.  
  13. ------------------------------------------------------------------------
  14.  
  15. earlycon.c
  16.  
  17. int a1 = 1;
  18. int b0;
  19. int c() { return a1; }
  20.  
  21. ------------------------------------------------------------------------
  22.  
  23. preinit.c
  24.  
  25. int x1 = 1;
  26. int y0;
  27. int z() { return x1; }
  28.  
  29. ------------------------------------------------------------------------
  30.  
  31. Makefile
  32.  
  33. AS = i586-elf-as
  34. GCC = i586-elf-gcc
  35. LD = i586-elf-ld
  36.  
  37.  
  38. SRCS = $(wildcard src/arch/x86/preinit/*.S src/arch/x86/preinit/*.c wildcard src/arch/x86/*.c)
  39. OBJS = $(addsuffix .o, $(basename $(SRCS)))
  40.  
  41. k: $(OBJS)
  42. $(LD) -T kernel.ld -o $@ $+
Advertisement
Add Comment
Please, Sign In to add comment