[Lldb-commits] [PATCH] D145462: [LLDB][ObjectFileELF] Support LoongArch64 in ApplyReloctions

Lu Weining via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 6 19:51:40 PST 2023


SixWeining created this revision.
SixWeining added reviewers: labath, davide, DavidSpickett, xen0n, wangleiat, MaskRay.
Herald added subscribers: pengfei, emaste.
Herald added a project: All.
SixWeining requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Currently ApplyReloctions() deals with different archs' relocation types
together (in a single `switch() {..}`). I think it is incorrect because
different relocation types of different archs may have same enum values.
For example:
`R_LARCH_32` and `R_X86_64_64` are both `1`;
`R_LARCH_64` and `R_X86_64_PC32` are both `2`.

This patch handles each arch in seperate `switch()` to solve the enum
values conflict issue.

And a new test is added for LoongArch64.

Change-Id: I96aef784bd6ca9387067ef67ffa9f0fd9a7cf18b


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145462

Files:
  lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  lldb/test/Shell/ObjectFile/ELF/loongarch64-relocations.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145462.502906.patch
Type: text/x-patch
Size: 10221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230307/78bae21d/attachment-0001.bin>


More information about the lldb-commits mailing list