diff options
| author | Drahflow <drahflow@gmx.de> | 2013-12-29 16:43:40 +0100 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2013-12-29 16:43:40 +0100 |
| commit | 665ecd4b714771b2e69384991a1043bcfcde3f72 (patch) | |
| tree | 6e81d329d222e50f56d62bacbb61cf14ee55394d /elymas/lib/sys | |
| parent | d245b90de88b762f65a5007c1776206dc7cd72dc (diff) | |
Memory footprint reduced to ~10%
Diffstat (limited to 'elymas/lib/sys')
| -rw-r--r-- | elymas/lib/sys/opt.ey | 20 | ||||
| -rw-r--r-- | elymas/lib/sys/so.ey | 7 |
2 files changed, 15 insertions, 12 deletions
diff --git a/elymas/lib/sys/opt.ey b/elymas/lib/sys/opt.ey index 8f54e1e..9da4424 100644 --- a/elymas/lib/sys/opt.ey +++ b/elymas/lib/sys/opt.ey @@ -139,6 +139,16 @@ t { f } { 0 } ? * } /andif deffd + { ==e + [ + 0 e * STATICTYPED streq { 4 e * sys .typed .type 0 eq }' andif + 0 e * PUSH streq { 1 e * sys .typed .type 0 eq }' andif + 0 e * STRINGSTAR streq + ] any + } /holdsInt deffd + + { -1010 lt -012 ? } /max deffd + { ==o ==executingScope 0 ==containsScopeModifications # TODO: replace <, > by macros ( {, scope } * respectively) then remove this @@ -264,14 +274,6 @@ i 2 sub logic * ==secondLast i 3 sub logic * ==thirdLast - { ==e - [ - 0 e * STATICTYPED streq { 4 e * sys .typed .type 0 eq }' andif - 0 e * PUSH streq { 1 e * sys .typed .type 0 eq }' andif - 0 e * STRINGSTAR streq - ] any - } /holdsInt deffd - action CALL streq { 1 entry * "*" | ::rawCodeAddress eq }' andif { 0 last * PUSH streq }' andif @@ -507,8 +509,6 @@ { action CALL streq { 1 entry * "-" | ::rawCodeAddress eq }' andif { 0 last * PUSH streq }' andif }' { 1 last * ::rawObject ==constant - { -1010 lt -012 ? } /max deffd - 0 ==largestNumber 0 ==starUsed diff --git a/elymas/lib/sys/so.ey b/elymas/lib/sys/so.ey index 0b68250..d474d4c 100644 --- a/elymas/lib/sys/so.ey +++ b/elymas/lib/sys/so.ey @@ -555,7 +555,7 @@ 0 ==?dataSize # to be filled later { _ =data len =dataSize } /setData deff > _ ==?relocationTable - ] ==metaSections + ] ==?metaSections [ 0 frozenAllocationCount range { ==i @@ -832,13 +832,16 @@ # Elf64_Xword sh_entsize; /* Size of entries, if section has table */ s .entsize uint64 } each } each - ] ==fileHeaders + ] ==?fileHeaders 0 ==fileOffset [ fileHeaders metaSections { .data } each ] { ==data fileOffset data len add =fileOffset data str .fromArray out .writeall } each + + [ ] _ =fileHeaders + =metaSections 1 ==:WRITE |
