mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
tools/mpy_ld.py: Support more complex rodata sections.
Sections sometimes named .rodata.str1.1 etc, instead of just .rodata. Avoid crashing in that case. Instead treat it like any other RO section. Fix thanks to @phlash. Fixes issue #8783. Signed-off-by: Jon Nordby <jononor@gmail.com>
This commit is contained in:
committed by
Damien George
parent
d1f288c041
commit
4837ec336a
@@ -972,7 +972,7 @@ def build_mpy(env, entry_offset, fmpy, native_qstr_vals, native_qstr_objs):
|
||||
for base, addr, kind in env.mpy_relocs:
|
||||
if isinstance(kind, str) and kind.startswith(".text"):
|
||||
kind = 0
|
||||
elif kind in (".rodata", ".data.rel.ro"):
|
||||
elif isinstance(kind, str) and kind.startswith((".rodata", ".data.rel.ro")):
|
||||
if env.arch.separate_rodata:
|
||||
kind = rodata_const_table_idx
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user