From dfedf3f2bb434065da3ddbc931e87a4017535f80 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 30 Apr 2025 20:42:31 -0400 Subject: Update compiler to use randomly generated unique-per-file symbol suffixes instead of needing to rename symbols with objcopy --- src/stdlib/files.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/stdlib/files.c') diff --git a/src/stdlib/files.c b/src/stdlib/files.c index 900129f8..87b0205c 100644 --- a/src/stdlib/files.c +++ b/src/stdlib/files.c @@ -79,23 +79,6 @@ public char *file_base_name(const char *path) return buf; } -public char *file_base_id(const char *path) -{ - const char *slash = strrchr(path, '/'); - if (slash) path = slash + 1; - assert(!isdigit(*path)); - const char *end = path + strcspn(path, "."); - size_t len = (size_t)(end - path); - char *buf = GC_MALLOC_ATOMIC(len+1); - strncpy(buf, path, len); - buf[len] = '\0'; - for (char *p = buf; *p; p++) { - if (!isalnum(*p)) - *p = '_'; - } - return buf; -} - static file_t *_load_file(const char* filename, FILE *file) { if (!file) return NULL; -- cgit v1.2.3