Description
Hi, I've made an all-in-one build for jerryscript. With this method we can reach smaller binary size.
You can see the details below. If you want to try it you can download it from here: https://github.com/tczene/jerryscript/tree/all_in_one
This patch is only an example, not ready yet.
Do you think this is a good idea? Should I continue it?
original build:
size -A build/bin/release.mcu_stm32f4-cp/jerry
build/bin/release.mcu_stm32f4-cp/jerry :
section | size | addr |
---|---|---|
.isr_vector | 392 | 134217728 |
.text | 153220 | 134218120 |
.ARM | 8 | 134371340 |
.init_array | 4 | 134371348 |
.data | 296 | 536870912 |
.bss | 21952 | 536871232 |
._user_heap_stack | 1024 | 536893184 |
.ARM.attributes | 55 | 0 |
.debug_info | 869597 | 0 |
.debug_abbrev | 40949 | 0 |
.debug_loc | 559999 | 0 |
.debug_aranges | 1128 | 0 |
.debug_ranges | 81976 | 0 |
.debug_line | 115396 | 0 |
.debug_str | 110440 | 0 |
.comment | 112 | 0 |
.debug_frame | 18700 | 0 |
Total | 1975248 |
ls -lh build/bin/release.mcu_stm32f4-cp/jerry
2.0M build/bin/release.mcu_stm32f4-cp/jerry
ls -lh build/bin/release.mcu_stm32f4-cp/jerry.bin
151K build/bin/release.mcu_stm32f4-cp/jerry.bin
all-in-one build:
size -A build/bin/release.mcu_stm32f4-cp/jerry
build/bin/release.mcu_stm32f4-cp/jerry :
section | size | addr |
---|---|---|
.isr_vector | 392 | 134217728 |
.text | 150632 | 134218120 |
.ARM | 8 | 134368752 |
.init_array | 4 | 134368760 |
.data | 260 | 536870912 |
.bss | 19968 | 536871232 |
._user_heap_stack | 1024 | 536891200 |
.ARM.attributes | 55 | 0 |
.debug_info | 791910 | 0 |
.debug_abbrev | 47869 | 0 |
.debug_loc | 515231 | 0 |
.debug_aranges | 1112 | 0 |
.debug_ranges | 81784 | 0 |
.debug_line | 118910 | 0 |
.debug_str | 111149 | 0 |
.comment | 112 | 0 |
.debug_frame | 17232 | 0 |
Total | 1857652 |
ls -lh build/bin/release.mcu_stm32f4-cp/jerry
1.9M build/bin/release.mcu_stm32f4-cp/jerry
ls -lh build/bin/release.mcu_stm32f4-cp/jerry.bin
148K build/bin/release.mcu_stm32f4-cp/jerry.bin