llvm-project/lldb
Pavel Labath 1177bc597d ObjectFileELF: permit thread-local sections with overlapping file addresses
Summary:
In an attempt to make file-address-based lookups more predictable, in D55998
we started ignoring sections which would result in file address
overlaps. It turns out this was too aggressive because thread-local
sections typically will have file addresses which apear to overlap
regular data/code. This does not cause a problem at runtime because
thread-local sections are loaded into memory using special logic, but it
can cause problems for lldb when trying to lookup objects by their file
address.

This patch changes ObjectFileELF to permit thread-local sections to
overlap regular ones by essentially giving them a separate address
space. It also makes them more symmetrical to regular sections by
creating container sections from PT_TLS segments.

Simultaneously, the patch changes the regular file address lookup logic
to ignore sections with the thread-specific bit set. I believe this is
what the users looking up file addresses would typically expect, as
looking up thread-local data generally requires more complex logic (e.g.
DWARF has a special opcode for that).

Reviewers: clayborg, jingham, MaskRay

Subscribers: emaste, aprantl, arichardson, lldb-commits

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

llvm-svn: 368010
2019-08-06 10:04:27 +00:00
..
cmake [lldb][CMake] Avoid 'Autogenerate scheme' dialogs in Xcode projects 2019-08-01 10:33:44 +00:00
docs [lldb][docs] Update landing page for monorepo 2019-08-01 10:33:54 +00:00
examples [Symbolication] Remove some dead code. Nothing exciting. 2019-07-29 21:25:51 +00:00
include/lldb SymbolVendor: Remove passthrough methods 2019-08-06 09:12:42 +00:00
lit ObjectFileELF: permit thread-local sections with overlapping file addresses 2019-08-06 10:04:27 +00:00
packages/Python/lldbsuite Fix ClangASTContext::CreateParameterDeclaration to not call addDecl 2019-08-02 21:41:50 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts [lldb] Remove Xcode project legacy 2019-07-24 09:20:14 +00:00
source ObjectFileELF: permit thread-local sections with overlapping file addresses 2019-08-06 10:04:27 +00:00
test [dotest] Remove multiprocessing 2019-07-30 16:42:47 +00:00
third_party/Python/module [lldb/thirdparty] Remove unneeded files, asked by Jonas. 2019-03-12 20:41:36 +00:00
tools SymbolVendor: Remove passthrough methods 2019-08-06 09:12:42 +00:00
unittests SymbolVendor: Remove passthrough methods 2019-08-06 09:12:42 +00:00
utils [TableGen] Move helpers into LLDBTableGenUtils. 2019-07-31 00:47:00 +00:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [CMake] Remove check for the readline target. 2019-08-05 23:54:13 +00:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py