Browse Source

src->rt; smol*.py -> src; add optional 16-bit hash version

pull/8/head
PoroCYon 3 years ago
committed by PoroCYon
parent
commit
8a4b7ce4ec
14 changed files with 63 additions and 27 deletions
  1. +1
    -1
      .gitignore
  2. +4
    -3
      Makefile
  3. +0
    -0
      rt/crt1.c
  4. +0
    -0
      rt/elf.inc
  5. +0
    -0
      rt/header32.asm
  6. +0
    -0
      rt/header64.asm
  7. +0
    -0
      rt/linkscr.inc
  8. +31
    -13
      rt/loader32.asm
  9. +0
    -0
      rt/loader64.asm
  10. +0
    -0
      rt/rtld.inc
  11. +4
    -1
      src/smol.py
  12. +16
    -9
      src/smolemit.py
  13. +0
    -0
      src/smolparse.py
  14. +7
    -0
      src/smolshared.py

+ 1
- 1
.gitignore View File

@ -1,3 +1,3 @@
/bin
/obj
/__pycache__
__pycache__

+ 4
- 3
Makefile View File

@ -1,6 +1,7 @@
OBJDIR := obj
BINDIR := bin
SRCDIR := src
SRCDIR := rt
PYDIR := src
LDDIR := ld
TESTDIR:= test
@ -40,7 +41,7 @@ CXXFLAGS += -m$(BITS) $(shell pkg-config --cflags sdl2)
LIBS=-lc
SMOLFLAGS +=
SMOLFLAGS += -s
ASFLAGS += -DUSE_INTERP -DUSE_DNLOAD_LOADER -DNO_START_ARG -DUNSAFE_DYNAMIC #-DALIGN_STACK
#-DUSE_DNLOAD_LOADER #-DUSE_DT_DEBUG #-DUSE_DL_FINI #-DNO_START_ARG #-DUNSAFE_DYNAMIC
@ -73,7 +74,7 @@ $(OBJDIR)/%.start.o: $(OBJDIR)/%.lto.o $(OBJDIR)/crt1.lto.o
$(CC) $(LDFLAGS) -r -o "$@" $^
$(OBJDIR)/symbols.%.asm: $(OBJDIR)/%.o
$(PYTHON3) ./smol.py $(SMOLFLAGS) $(LIBS) "$<" "$@"
$(PYTHON3) $(PYDIR)/smol.py $(SMOLFLAGS) $(LIBS) "$<" "$@"
$(OBJDIR)/stub.%.o: $(OBJDIR)/symbols.%.asm $(SRCDIR)/header32.asm \
$(SRCDIR)/loader32.asm


src/crt1.c → rt/crt1.c View File


src/elf.inc → rt/elf.inc View File


src/header32.asm → rt/header32.asm View File


src/header64.asm → rt/header64.asm View File


src/linkscr.inc → rt/linkscr.inc View File


src/loader32.asm → rt/loader32.asm View File


src/loader64.asm → rt/loader64.asm View File


src/rtld.inc → rt/rtld.inc View File


smol.py → src/smol.py View File


smolemit.py → src/smolemit.py View File


smolparse.py → src/smolparse.py View File


smolshared.py → src/smolshared.py View File


Loading…
Cancel
Save