diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-06-04 13:09:32 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-06-04 13:09:32 -0400 |
| commit | ea6cb2d3bb1796aef2c195079fe91311a43f4b82 (patch) | |
| tree | 05849e82b3791e6b8132a34d5fe04e98b2665ba7 /mk | |
| parent | 9c1836f093bf18db12eef6d437ee856b4c888c95 (diff) | |
implement jmp_buf tracking and disallow setjmp macro suppression
Diffstat (limited to 'mk')
| -rw-r--r-- | mk/___setjmp.x86-64.s.d | 8 | ||||
| -rw-r--r-- | mk/__setjmp.d | 9 | ||||
| -rw-r--r-- | mk/__setjmp.x86-64.s.d | 8 | ||||
| -rw-r--r-- | mk/__setjmp_h.d | 9 | ||||
| -rw-r--r-- | mk/all.mk | 5 | ||||
| -rw-r--r-- | mk/deps.mk | 18 | ||||
| -rw-r--r-- | mk/setjmp.d | 2 |
7 files changed, 46 insertions, 13 deletions
diff --git a/mk/___setjmp.x86-64.s.d b/mk/___setjmp.x86-64.s.d new file mode 100644 index 00000000..5e2f61c7 --- /dev/null +++ b/mk/___setjmp.x86-64.s.d @@ -0,0 +1,8 @@ +libc_C.0: libc.a(___setjmp.x86-64.s.o) +libc.a(___setjmp.x86-64.s.o): $(OBJDIR)/___setjmp.x86-64.s.o + @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% + +$(OBJDIR)/___setjmp.x86-64.s.o: src/setjmp/___setjmp.x86-64.s +$(OBJDIR)/___setjmp.x86-64.s.o: + @mkdir -p $(@D) + $(CC) -c -o $@ $(CFLAGS) src/setjmp/___setjmp.x86-64.s diff --git a/mk/__setjmp.d b/mk/__setjmp.d new file mode 100644 index 00000000..401d987e --- /dev/null +++ b/mk/__setjmp.d @@ -0,0 +1,9 @@ +libc_C.1: libc.a(__setjmp.o) +libc.a(__setjmp.o): $(OBJDIR)/__setjmp.o + @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% + +$(OBJDIR)/__setjmp.o: src/setjmp/__setjmp.c +$(OBJDIR)/__setjmp.o: src/_safety.h +$(OBJDIR)/__setjmp.o: + @mkdir -p $(@D) + $(CC) -c -o $@ $(CFLAGS) src/setjmp/__setjmp.c diff --git a/mk/__setjmp.x86-64.s.d b/mk/__setjmp.x86-64.s.d deleted file mode 100644 index 0b0e30ae..00000000 --- a/mk/__setjmp.x86-64.s.d +++ /dev/null @@ -1,8 +0,0 @@ -libc_C.0: libc.a(__setjmp.x86-64.s.o) -libc.a(__setjmp.x86-64.s.o): $(OBJDIR)/__setjmp.x86-64.s.o - @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% - -$(OBJDIR)/__setjmp.x86-64.s.o: src/setjmp/__setjmp.x86-64.s -$(OBJDIR)/__setjmp.x86-64.s.o: - @mkdir -p $(@D) - $(CC) -c -o $@ $(CFLAGS) src/setjmp/__setjmp.x86-64.s diff --git a/mk/__setjmp_h.d b/mk/__setjmp_h.d new file mode 100644 index 00000000..6d696465 --- /dev/null +++ b/mk/__setjmp_h.d @@ -0,0 +1,9 @@ +libc_C.0: libc.a(__setjmp_h.o) +libc.a(__setjmp_h.o): $(OBJDIR)/__setjmp_h.o + @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% + +$(OBJDIR)/__setjmp_h.o: src/setjmp/__setjmp_h.c +$(OBJDIR)/__setjmp_h.o: src/setjmp/_setjmp.h +$(OBJDIR)/__setjmp_h.o: + @mkdir -p $(@D) + $(CC) -c -o $@ $(CFLAGS) src/setjmp/__setjmp_h.c @@ -216,6 +216,8 @@ include mk/nanosleep.d include mk/mktime.d include mk/asctime.d include mk/__readonly.d +include mk/__setjmp.d +include mk/__setjmp_h.d include mk/longjmp.d include mk/setjmp.d include mk/thrd_join.d @@ -347,6 +349,7 @@ include mk/strcpy.d include mk/strtok.d include mk/memset.d include mk/memmove.d +include mk/strdup.d include mk/strncpy.d include mk/strcat_s.d include mk/strnlen_s.d @@ -476,4 +479,4 @@ include mk/calloc.d include mk/div.d include mk/__sys.x86-64.s.d include mk/__longjmp.x86-64.s.d -include mk/__setjmp.x86-64.s.d +include mk/___setjmp.x86-64.s.d @@ -874,6 +874,14 @@ all: mk/__readonly.d mk/__readonly.d: src/__readonly.c sh mk/deps.sh src/__readonly.c +all: mk/__setjmp.d +mk/__setjmp.d: src/setjmp/__setjmp.c + sh mk/deps.sh src/setjmp/__setjmp.c + +all: mk/__setjmp_h.d +mk/__setjmp_h.d: src/setjmp/__setjmp_h.c + sh mk/deps.sh src/setjmp/__setjmp_h.c + all: mk/longjmp.d mk/longjmp.d: src/setjmp/longjmp.c sh mk/deps.sh src/setjmp/longjmp.c @@ -1398,6 +1406,10 @@ all: mk/memmove.d mk/memmove.d: src/string/memmove.c sh mk/deps.sh src/string/memmove.c +all: mk/strdup.d +mk/strdup.d: src/string/strdup.c + sh mk/deps.sh src/string/strdup.c + all: mk/strncpy.d mk/strncpy.d: src/string/strncpy.c sh mk/deps.sh src/string/strncpy.c @@ -1914,7 +1926,7 @@ all: mk/__longjmp.x86-64.s.d mk/__longjmp.x86-64.s.d: src/setjmp/__longjmp.x86-64.s sh mk/deps.sh src/setjmp/__longjmp.x86-64.s -all: mk/__setjmp.x86-64.s.d -mk/__setjmp.x86-64.s.d: src/setjmp/__setjmp.x86-64.s - sh mk/deps.sh src/setjmp/__setjmp.x86-64.s +all: mk/___setjmp.x86-64.s.d +mk/___setjmp.x86-64.s.d: src/setjmp/___setjmp.x86-64.s + sh mk/deps.sh src/setjmp/___setjmp.x86-64.s diff --git a/mk/setjmp.d b/mk/setjmp.d index 006a4c31..b696edbc 100644 --- a/mk/setjmp.d +++ b/mk/setjmp.d @@ -1,4 +1,4 @@ -libc_C.1: libc.a(setjmp.o) +libc_C.0: libc.a(setjmp.o) libc.a(setjmp.o): $(OBJDIR)/setjmp.o @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% |
