[PATCH] D115635: [llvm-objcopy] Fix handling of MIPS64 little endian files
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 07:02:45 PST 2021
atanasyan created this revision.
atanasyan added reviewers: jhenderson, nathanchance, rupprecht.
Herald added subscribers: abrachet, jrtc27, arichardson, sdardis, emaste.
Herald added a reviewer: alexander-shaposhnikov.
atanasyan requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
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 patch looks ugly but I could not figure out how to hide the nature of MIPS64 ABI better.
The bug was reported in the issue #52647.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115635
Files:
llvm/test/tools/llvm-objcopy/ELF/mips64el.test
llvm/tools/llvm-objcopy/ELF/Object.cpp
llvm/tools/llvm-objcopy/ELF/Object.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115635.393879.patch
Type: text/x-patch
Size: 5178 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211213/5ecaf5af/attachment.bin>
More information about the llvm-commits
mailing list