599a22e569
Now that the native qstr link table is gone, merging a native .mpy file with a bytecode .mpy file is not as simple as concatenating the .mpy data. The qstr_table and obj_table tables from all merged .mpy files must now be joined together, because they are global to the .mpy file (and hence global to the merged .mpy file). This means the bytecode needs to be be decoded, qstr_table and obj_table indices updated to point to the correct entries in the new tables, and then the bytecode re-encoded. This commit makes this change to the merging feature in mpy-tool.py. This can now merge an arbitrary number of bytecode .mpy files, and up to one native .mpy file. Signed-off-by: Damien George <damien@micropython.org>