Create ELF aliases for identical symbols

This change greatly reduces the number of modules that need to be
compiled. The only issue right now is that sometimes when viewing
symbol table entries, the aliased symbol is chosen.
This commit is contained in:
Justine Tunney 2023-06-06 03:30:37 -07:00
parent e1b83399bd
commit b8a6a989c0
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
191 changed files with 414 additions and 2190 deletions

View file

@ -1,9 +1,20 @@
#ifndef COSMOPOLITAN_LIBC_STDIO_APPEND_H_
#define COSMOPOLITAN_LIBC_STDIO_APPEND_H_
#include "libc/fmt/pflink.h"
#ifdef COSMO
#define APPEND_COOKIE 21578
#define appendz __appendz
#define appendr __appendr
#define appendd __appendd
#define appendw __appendw
#define appends __appends
#define appendf __appendf
#define vappendf __vappendf
#define kappendf __kappendf
#define kvappendf __kvappendf
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
@ -22,11 +33,7 @@ ssize_t vappendf(char **, const char *, va_list);
ssize_t kappendf(char **, const char *, ...);
ssize_t kvappendf(char **, const char *, va_list);
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define appendf(BUF, FMT, ...) appendf(BUF, PFLINK(FMT), ##__VA_ARGS__)
#define vappendf(BUF, FMT, VA) vappendf(BUF, PFLINK(FMT), VA)
#endif
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMO */
#endif /* COSMOPOLITAN_LIBC_STDIO_APPEND_H_ */