[all-commits] [llvm/llvm-project] cb8c1e: [lldb/PlatformPOSIX] Change LoadImage default to R...

Vedant Kumar via All-commits all-commits at lists.llvm.org
Fri Mar 19 15:14:06 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb8c1ee269da72eb6e2c18800cd8ab0a74050785
      https://github.com/llvm/llvm-project/commit/cb8c1ee269da72eb6e2c18800cd8ab0a74050785
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2021-03-19 (Fri, 19 Mar 2021)

  Changed paths:
    M lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
    A lldb/test/API/functionalities/load_lazy/Makefile
    A lldb/test/API/functionalities/load_lazy/TestLoadUsingLazyBind.py
    A lldb/test/API/functionalities/load_lazy/categories
    A lldb/test/API/functionalities/load_lazy/main.cpp
    A lldb/test/API/functionalities/load_lazy/t1.c
    A lldb/test/API/functionalities/load_lazy/t2_0.c
    A lldb/test/API/functionalities/load_lazy/t2_1.c

  Log Message:
  -----------
  [lldb/PlatformPOSIX] Change LoadImage default to RTLD_LAZY

In general, it seems like the debugger should allow programs to load & run with
libraries as far as possible, instead of defaulting to being super-picky about
unavailable symbols.

This is critical on macOS/Darwin, as libswiftCore.dylib may 1) export a version
symbol using @available markup and then 2) expect that other exported APIs are
only dynamically used once the version symbol is checked. We can't open a
version of the library built with a bleeding-edge SDK on an older OS without
RTLD_LAXY (or pervasive/expensive @available markup added to dyld APIs).

See: https://lists.llvm.org/pipermail/lldb-dev/2021-March/016796.html

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




More information about the All-commits mailing list