From e636279fe07898c5cfd0d33197cdf79f42f76b96 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 29 Nov 2014 14:36:18 +0000 Subject: [PATCH] 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). --- esp8266/esp8266.ld | 27 +++++++++++++++++---------- 1 file 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