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

@ -18,6 +18,19 @@
*/
#include "libc/fmt/conv.h"
/**
* Divides integers yielding numerator and denominator.
*/
div_t(div)(int num, int den) {
return div(num, den);
div_t retval;
retval.quot = num / den;
retval.rem = num % den;
#if __STDC_VERSION__ + 0 < 199901L
// satisfy quot*denominator+rem == numerator
if (n > 0 && retval.rem < 0) {
retval.quot += 1;
retval.rem -= d;
}
#endif
return retval;
}