diff options
Diffstat (limited to 'toolchain/elf2flt/patches/v2021.08/0006-elf2flt-xtensa-fix-text-relocations.patch')
| -rw-r--r-- | toolchain/elf2flt/patches/v2021.08/0006-elf2flt-xtensa-fix-text-relocations.patch | 25 | 
1 files changed, 25 insertions, 0 deletions
| diff --git a/toolchain/elf2flt/patches/v2021.08/0006-elf2flt-xtensa-fix-text-relocations.patch b/toolchain/elf2flt/patches/v2021.08/0006-elf2flt-xtensa-fix-text-relocations.patch new file mode 100644 index 000000000..fc8784a1b --- /dev/null +++ b/toolchain/elf2flt/patches/v2021.08/0006-elf2flt-xtensa-fix-text-relocations.patch @@ -0,0 +1,25 @@ +diff -Nur elf2flt-v2021.08.orig/elf2flt.c elf2flt-v2021.08/elf2flt.c +--- elf2flt-v2021.08.orig/elf2flt.c	2023-01-09 11:08:28.637676113 +0100 ++++ elf2flt-v2021.08/elf2flt.c	2023-01-09 11:09:04.502804007 +0100 +@@ -835,7 +835,20 @@ + 					continue; + 				case R_XTENSA_32: + 				case R_XTENSA_PLT: +-					goto good_32bit_resolved_reloc; ++					if (bfd_big_endian (abs_bfd)) ++						sym_addr = ++							(r_mem[0] << 24) ++							+ (r_mem[1] << 16) ++							+ (r_mem[2] << 8) ++							+ r_mem[3]; ++					else ++						sym_addr = ++							r_mem[0] ++							+ (r_mem[1] << 8) ++							+ (r_mem[2] << 16) ++							+ (r_mem[3] << 24); ++					relocation_needed = 1; ++					break; + 				default: + 					goto bad_resolved_reloc; + #elif defined(TARGET_riscv64) | 
