mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Reduce code size of mandatory runtime
This change reduces o/tiny/examples/life from 44kb to 24kb in size since it avoids linking mmap() when unnecessary. This is important, to helping cosmo not completely lose touch with its roots.
This commit is contained in:
parent
fdab49b30e
commit
15ea0524b3
17 changed files with 164 additions and 163 deletions
|
@ -30,10 +30,8 @@
|
|||
*/
|
||||
struct AuxiliaryValue __getauxval(unsigned long at) {
|
||||
unsigned long *ap;
|
||||
for (ap = __auxv; ap[0]; ap += 2) {
|
||||
if (at == ap[0]) {
|
||||
for (ap = __auxv; ap && ap[0]; ap += 2)
|
||||
if (at == ap[0])
|
||||
return (struct AuxiliaryValue){ap[1], true};
|
||||
}
|
||||
}
|
||||
return (struct AuxiliaryValue){0, false};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue