hanchenye-llvm-project/llvm
George Rimar 4e14bf71b7 [llvm-readelf] - Allow dumping dynamic symbols when there is no program headers.
D62179 introduced a regression. llvm-readelf lose the ability to dump the dynamic symbols
when there is .dynamic section with a DT_SYMTAB, but there are no program headers:
https://reviews.llvm.org/D62179#1652778

Below is a program flow before the D62179 change:

1) Find SHT_DYNSYM.
2) Find there is no PT_DYNAMIC => don't try to parse it.
3) Print dynamic symbols using information about them found on step (1).

And after the change it became:

1) Find SHT_DYNSYM.
2) Find there is no PT_DYNAMIC => find SHT_DYNAMIC.
3) Parse dynamic table, but fail to handle the DT_SYMTAB because of the absence of the PT_LOAD. Report the "Virtual address is not in any segment" error.

This patch fixes the issue. For doing this it checks that the value of DT_SYMTAB was
mapped to a segment. If not - it ignores it.

Differential revision: https://reviews.llvm.org/D67078

llvm-svn: 371071
2019-09-05 14:02:58 +00:00
..
benchmarks
bindings
cmake [cmake] Remove MSVC C4180 override 2019-09-04 10:26:39 +00:00
docs [LLVM][Alignment] Make functions using log of alignment explicit 2019-09-05 10:00:22 +00:00
examples [ORCv2] - New Speculate Query Implementation 2019-08-27 18:23:36 +00:00
include [LLVM][Alignment] Convert isLegalNTStore/isLegalNTLoad to llvm::Align 2019-09-05 13:09:42 +00:00
lib [ARM] Fixup the creation of VPT blocks 2019-09-05 13:37:04 +00:00
projects
resources
runtimes
test [llvm-readelf] - Allow dumping dynamic symbols when there is no program headers. 2019-09-05 14:02:58 +00:00
tools [llvm-readelf] - Allow dumping dynamic symbols when there is no program headers. 2019-09-05 14:02:58 +00:00
unittests [globalisel] Support trivial COPY in GISelKnownBits 2019-09-04 18:59:43 +00:00
utils gn build: Merge r370985 2019-09-04 21:34:21 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Revert Autogenerate the shebang lines for tools/opt-viewer 2019-08-27 18:31:29 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.