]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf32-microblaze.c
bfd: microblaze: Fix bug in TLSTPREL Relocation
[thirdparty/binutils-gdb.git] / bfd / elf32-microblaze.c
index bbc70fdf4e36cfb37d675e9ac919833cde634894..a7e81c70fc8e6b3bc91ed5d100987167ecd1ee8a 100644 (file)
@@ -1467,9 +1467,9 @@ microblaze_elf_relocate_section (bfd *output_bfd,
              relocation += addend;
              relocation -= dtprel_base(info);
              bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff,
-                         contents + offset + 2);
+                         contents + offset + endian);
              bfd_put_16 (input_bfd, relocation & 0xffff,
-                         contents + offset + 2 + INST_WORD_SIZE);
+                         contents + offset + endian + INST_WORD_SIZE);
              break;
            case (int) R_MICROBLAZE_TEXTREL_64:
            case (int) R_MICROBLAZE_TEXTREL_32_LO: