summaryrefslogtreecommitdiffstatshomepage
path: root/tools/mpy_ld.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-06-09 11:57:22 +1000
committerDamien George <damien@micropython.org>2022-06-09 11:57:22 +1000
commitabb38503987f2523726d05819e87977e3cdd65b5 (patch)
tree43df885cb1954895732db081593dba6556151e80 /tools/mpy_ld.py
parent85597aa68e116c4af9652ea006fac0f33cb78a78 (diff)
downloadmicropython-abb38503987f2523726d05819e87977e3cdd65b5.tar.gz
micropython-abb38503987f2523726d05819e87977e3cdd65b5.zip
tools/mpy_ld.py: Support R_XTENSA_PDIFF32 relocation.
Newer versions of the ESP-IDF's toolchain use this relocation. Fixes issue #8436. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tools/mpy_ld.py')
-rwxr-xr-xtools/mpy_ld.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/mpy_ld.py b/tools/mpy_ld.py
index 9fda49826f..4cceaa56df 100755
--- a/tools/mpy_ld.py
+++ b/tools/mpy_ld.py
@@ -75,6 +75,7 @@ R_ARM_THM_JUMP24 = 30
R_X86_64_GOTPCREL = 9
R_X86_64_REX_GOTPCRELX = 42
R_386_GOT32X = 43
+R_XTENSA_PDIFF32 = 59
################################################################################
# Architecture configuration
@@ -572,9 +573,9 @@ def do_relocation_text(env, text_addr, r):
reloc = addr - r_offset
reloc_type = "xtensa_l32r"
- elif env.arch.name == "EM_XTENSA" and r_info_type == R_XTENSA_DIFF32:
+ elif env.arch.name == "EM_XTENSA" and r_info_type in (R_XTENSA_DIFF32, R_XTENSA_PDIFF32):
if s.section.name.startswith(".text"):
- # it looks like R_XTENSA_DIFF32 into .text is already correctly relocated
+ # it looks like R_XTENSA_[P]DIFF32 into .text is already correctly relocated
return
assert 0