lib/tcov.c: - can't be cross-compiled (needs stdio.h) - can be included in libtcc1.a Reason why bt-xxx.o/bcheck.o are linked separatly is because we don't want then to linked into exe's and dlls at the same time.
Showing the changes to lib (3 of 10 files). Show all
Unified · Split
| @@ -38,6 +38,7 @@ endif · 37 unmodified lines | |||
| 38 | $(X)BT_O = bt-exe.o bt-log.o | 38 | $(X)BT_O = bt-exe.o bt-log.o |
| 39 | $(X)B_O = $(BCHECK_O) bt-exe.o bt-log.o bt-dll.o | 39 | $(X)B_O = $(BCHECK_O) bt-exe.o bt-log.o bt-dll.o |
| 40 | endif | 40 | endif |
| 41 | $(X)BT_O += tcov.o | ||
| 41 | 42 | ||
| 42 | DSO_O = dsohandle.o | 43 | DSO_O = dsohandle.o |
| 43 | 44 | ||
| @@ -64,7 +65,6 @@ OBJ-arm-wince = $(ARM_O) $(WIN_O) · 20 unmodified lines | |||
| 64 | OBJ-riscv64 = $(RISCV64_O) $(BCHECK_O) $(DSO_O) | 65 | OBJ-riscv64 = $(RISCV64_O) $(BCHECK_O) $(DSO_O) |
| 65 | 66 | ||
| 66 | OBJ-extra = $(filter $(B_O),$(OBJ-$T)) | 67 | OBJ-extra = $(filter $(B_O),$(OBJ-$T)) |
| 67 | OBJ-extra += tcov.o | ||
| 68 | OBJ-libtcc1 = $(addprefix $(X),$(filter-out $(OBJ-extra),$(OBJ-$T))) | 68 | OBJ-libtcc1 = $(addprefix $(X),$(filter-out $(OBJ-extra),$(OBJ-$T))) |
| 69 | 69 | ||
| 70 | ALL = $(addprefix $(TOP)/,$(X)libtcc1.a $(OBJ-extra)) | 70 | ALL = $(addprefix $(TOP)/,$(X)libtcc1.a $(OBJ-extra)) |
| @@ -1367,6 +1367,10 @@ int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) · 1366 unmodified lines | |||
| 1367 | 1367 | ||
| 1368 | dprintf (stderr, "%s, %s() %d %p %p\n", __FILE__, __FUNCTION__, | 1368 | dprintf (stderr, "%s, %s() %d %p %p\n", __FILE__, __FUNCTION__, |
| 1369 | signum, act, oldact); | 1369 | signum, act, oldact); |
| 1370 | |||
| 1371 | if (sigaction_redir == NULL) | ||
| 1372 | __bound_init(0,-1); | ||
| 1373 | |||
| 1370 | if (act) { | 1374 | if (act) { |
| 1371 | nact = *act; | 1375 | nact = *act; |
| 1372 | if (nact.sa_flags & SA_SIGINFO) | 1376 | if (nact.sa_flags & SA_SIGINFO) |
| @@ -18,11 +18,6 @@ void __bt_init(rt_context *p, int num_callers) · 17 unmodified lines | |||
| 18 | __attribute__((weak)) void __bound_init(void*, int); | 18 | __attribute__((weak)) void __bound_init(void*, int); |
| 19 | struct rt_context *rc = &g_rtctxt; | 19 | struct rt_context *rc = &g_rtctxt; |
| 20 | //fprintf(stderr, "__bt_init %d %p %p\n", num_callers, p->stab_sym, p->bounds_start), fflush(stderr); | 20 | //fprintf(stderr, "__bt_init %d %p %p\n", num_callers, p->stab_sym, p->bounds_start), fflush(stderr); |
| 21 | #ifdef __APPLE__ | ||
| 22 | /* call __bound_init here due to redirection of sigaction */ | ||
| 23 | if (__bound_init && p->bounds_start) | ||
| 24 | __bound_init(p->bounds_start, 0); | ||
| 25 | #endif | ||
| 26 | if (num_callers) { | 21 | if (num_callers) { |
| 27 | memcpy(rc, p, offsetof(rt_context, next)); | 22 | memcpy(rc, p, offsetof(rt_context, next)); |
| 28 | rc->num_callers = num_callers - 1; | 23 | rc->num_callers = num_callers - 1; |