[all-commits] [llvm/llvm-project] d5d8b1: [llvm-objcopy] Fix handling of MIPS64 little endia...

Simon Atanasyan via All-commits all-commits at lists.llvm.org
Tue Dec 14 06:21:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5d8b1c972bca995133f358f01ce474fb8d0b669
      https://github.com/llvm/llvm-project/commit/d5d8b1c972bca995133f358f01ce474fb8d0b669
  Author: Simon Atanasyan <simon at atanasyan.com>
  Date:   2021-12-14 (Tue, 14 Dec 2021)

  Changed paths:
    A llvm/test/tools/llvm-objcopy/ELF/mips64.test
    M llvm/tools/llvm-objcopy/ELF/Object.cpp
    M llvm/tools/llvm-objcopy/ELF/Object.h

  Log Message:
  -----------
  [llvm-objcopy] Fix handling of MIPS64 little endian files

MIPS64 little endian target has a "special" encoding of `r_info`
relocation record field. Instead of one 64-bit little endian number, it
is a little endian 32-bit number followed by a 32-bit big endian number.
For correct reading and writing such fields we must provide information
about target machine into the corresponding routine. This patch does
this for the `llvm-objcopy` tool and fix handling of MIPS64 little
endian files.

The bug was reported in the issue #52647.

Differential Revision: https://reviews.llvm.org/D115635




More information about the All-commits mailing list