bfd: microblaze: Fix bug in TLSTPREL Relocation
authorNeal Frager <neal.frager@amd.com>
Wed, 27 Sep 2023 12:49:18 +0000 (13:49 +0100)
committerMichael J. Eager <eager@eagercon.com>
Fri, 29 Sep 2023 15:44:11 +0000 (08:44 -0700)
commit54fd15eef722f56383a5a3a978219e11d3d0be15
tree5ef04293202a1c005b8c01742b33b03a805bf75a
parent832ca732b8a96ff9a3e7c4abf24098bf2a59a96d
bfd: microblaze: Fix bug in TLSTPREL Relocation

Fixed the problem related to the fixup/relocations TLSTPREL.
When the fixup is applied the addend is not added at the correct offset
of the instruction. The offset is hard coded considering its big endian
and it fails for Little endian. This patch allows support for both
big & little-endian compilers.

This patch has been tested for years of AMD Xilinx Yocto
releases as part of the following patch set:

https://github.com/Xilinx/meta-xilinx/tree/master/meta-microblaze/recipes-devtools/binutils/binutils

Signed-off-by: nagaraju <nagaraju.mekala@amd.com>
Signed-off-by: Neal Frager <neal.frager@amd.com>
bfd/elf32-microblaze.c