aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorJason Molenda <jason@molenda.com>2023-05-10 16:39:20 -0700
committerJason Molenda <jason@molenda.com>2023-05-10 16:42:38 -0700
commitf9759d0cb6dc19aa67dbe1c3d56404041f8b4c7e (patch)
tree8125337b94dac20df993dea1f14c4732ca28f593 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentf497611f436cbf5ae0157edcf498f62a136799cb (diff)
downloadllvm-f9759d0cb6dc19aa67dbe1c3d56404041f8b4c7e.zip
llvm-f9759d0cb6dc19aa67dbe1c3d56404041f8b4c7e.tar.gz
llvm-f9759d0cb6dc19aa67dbe1c3d56404041f8b4c7e.tar.bz2
Prioritize using a segment with the name TEXT instead off fileoff 0
lldb needs to find the virtual address of the mach header of a binary. It first scans for a segment which starts at file offset 0, and uses the vmaddr of that segment. If no segment starts at fileoff 0, it looks for a segment named __TEXT. This patch changes the order of those, to first search for the TEXT segment. We have a situation where binaries exist that have the DATA segment first, which does not have the vmaddr of the mach header, it merely happens to come first in the binary file. It's an unusual arrangement, but not breaking any rules of Mach-O. So lldb needs to handle this. Differential Revision: https://reviews.llvm.org/D150239 rdar://109128418
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions