Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elf2flt: xtensa: fix text relocations
The commit 5e08f19 ("Don't always update text in !pic_with_got case") changed good_32bit_resolved_reloc to not do endianness swapping for relocated entries in the text segment. This broke little-endian xtensa FLAT images which after this change fail to start with the following message: binfmt_flat: reloc outside program 0x24c80100 (0 - 0x6e430/0x56a20) Fix it by preserving 'update_text' when building for xtensa. This fix is a modified version of an original fix by Max Filippov <[email protected]>. This commit message was his, though his Signed-off-by has been dropped due to it being a different fix. The relocation code is used "as-is" but a different entry path into it ensures that "update_text" is not cleared for Xtensa. Fixes: 5e08f19 ("Don't always update text in !pic_with_got case") Reported-by: Niklas Cassel <[email protected]> Signed-off-by: Greg Ungerer <[email protected]>
- Loading branch information