tools/mpy_ld.py: Support GOT entries that reference inside mp_fun_table.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-06-10 16:38:20 +10:00
parent ee9feacc00
commit 17a0d65ee4

View File

@ -434,6 +434,8 @@ def populate_got(env):
dest = got_entry.name
elif got_entry.name.startswith("mp_fun_table+0x"):
dest = int(got_entry.name.split("+")[1], 16) // env.arch.word_size
elif got_entry.sec_name == ".external.mp_fun_table":
dest = got_entry.sym.mp_fun_table_offset
elif got_entry.sec_name.startswith(".text"):
dest = ".text"
elif got_entry.sec_name.startswith(".rodata"):