diff options
author | Damien George <damien.p.george@gmail.com> | 2014-11-29 14:36:18 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-11-29 14:36:18 +0000 |
commit | e636279fe07898c5cfd0d33197cdf79f42f76b96 (patch) | |
tree | b7fd51cc557899e08ff8cb4984bc738556007997 /esp8266/esp8266.ld | |
parent | bfdc205934d86d4c419f237bb79d1dd6ccb93406 (diff) | |
download | micropython-e636279fe07898c5cfd0d33197cdf79f42f76b96.tar.gz micropython-e636279fe07898c5cfd0d33197cdf79f42f76b96.zip |
esp8266: Move more rodata to irom section.
rodata can only go in iram/irom if it's accessed only using word loads
(ie no byte or half-word access).
Diffstat (limited to 'esp8266/esp8266.ld')
-rw-r--r-- | esp8266/esp8266.ld | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/esp8266/esp8266.ld b/esp8266/esp8266.ld index b845fad219..2fbe9296a1 100644 --- a/esp8266/esp8266.ld +++ b/esp8266/esp8266.ld @@ -73,9 +73,23 @@ SECTIONS { _irom0_text_start = ABSOLUTE(.); *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) - *py*.o*(.literal* .text*) - *gccollect.o*(.literal* .text*) - *gchelper.o*(.literal* .text*) + + /* we put some specific text in this section */ + *py/*.o*(.literal* .text*) + *pyexec.o(.literal*, .text*) + *readline.o(.literal*, .text*) + *pybstdio.o(.literal*, .text*) + *modpyb.o(.literal*, .text*) + *gccollect.o(.literal* .text*) + *gchelper.o(.literal* .text*) + + /* we put as much rodata as possible in this section */ + /* note that only rodata accessed as a machine word is allowed here */ + *py/qstr.o(.rodata.const_pool) + *py/*.o(.rodata.mp_type_*) /* catches type: mp_obj_type_t */ + *py/*.o(.rodata.*_locals_dict*) /* catches types: mp_obj_dict_t, mp_map_elem_t */ + *py/*.o(.rodata.mp_module_*) /* catches types: mp_obj_module_t, mp_obj_dict_t, mp_map_elem_t */ + _irom0_text_end = ABSOLUTE(.); } >irom0_0_seg :irom0_0_phdr @@ -90,13 +104,6 @@ SECTIONS *(.fini.literal) *(.fini) *(.gnu.version) - *qstr.o(.rodata.const_pool) - *.o(.rodata.mp_type_*) - /* - can't put these here for some reason... - *builtin.o(.rodata.mp_builtin_*_obj) - *parse.o(.rodata.rule_*) - */ _text_end = ABSOLUTE(.); _etext = .; } >iram1_0_seg :iram1_0_phdr |