[Lldb-commits] [PATCH] D108061: [lldb] Add support for shared library load when executable called through ld.

Rumeet Dhindsa via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 13 16:29:07 PDT 2021


rdhindsa created this revision.
rdhindsa added reviewers: labath, clayborg.
Herald added a subscriber: emaste.
rdhindsa requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLDB.

Add support for shared library load when executable called through ld.

Currently, when an executable is called like: ld-linux --library-path <path> executable, lldb is not able to load the shared libraries needed by the executable provided by library-path. lldb is not able to set Rendezvous breakpoint in this case.

This patch adds the support to enable setting rendezvous breakpoint when called using ld-*.so. It enables it to hit the breakpoint and extract the address of the rendezvous structure, which is how lldb is now able to load the shared libraries.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108061

Files:
  lldb/include/lldb/Symbol/ObjectFile.h
  lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
  lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
  lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
  lldb/test/Shell/ObjectFile/ELF/Inputs/main.cpp
  lldb/test/Shell/ObjectFile/ELF/Inputs/signal_file.cpp
  lldb/test/Shell/ObjectFile/ELF/Inputs/signal_file.h
  lldb/test/Shell/ObjectFile/ELF/ld_test.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108061.366373.patch
Type: text/x-patch
Size: 8556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210813/f3f7443e/attachment-0001.bin>


More information about the lldb-commits mailing list