Skip to content

Commit abb3850

Browse files
committed
tools/mpy_ld.py: Support R_XTENSA_PDIFF32 relocation.
Newer versions of the ESP-IDF's toolchain use this relocation. Fixes issue micropython#8436. Signed-off-by: Damien George <damien@micropython.org>
1 parent 85597aa commit abb3850

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/mpy_ld.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
R_X86_64_GOTPCREL = 9
7676
R_X86_64_REX_GOTPCRELX = 42
7777
R_386_GOT32X = 43
78+
R_XTENSA_PDIFF32 = 59
7879

7980
################################################################################
8081
# Architecture configuration
@@ -572,9 +573,9 @@ def do_relocation_text(env, text_addr, r):
572573
reloc = addr - r_offset
573574
reloc_type = "xtensa_l32r"
574575

575-
elif env.arch.name == "EM_XTENSA" and r_info_type == R_XTENSA_DIFF32:
576+
elif env.arch.name == "EM_XTENSA" and r_info_type in (R_XTENSA_DIFF32, R_XTENSA_PDIFF32):
576577
if s.section.name.startswith(".text"):
577-
# it looks like R_XTENSA_DIFF32 into .text is already correctly relocated
578+
# it looks like R_XTENSA_[P]DIFF32 into .text is already correctly relocated
578579
return
579580
assert 0
580581

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy