hanchenye-llvm-project/llvm
James Henderson 9bc817a0ae [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names
Prior to this change, the "Symbol" field of a relocation would always be
assumed to be a symbol name, and if no such symbol existed, the
relocation would reference index 0. This confused me when I tried to use
a literal symbol index in the field: since "0x1" was not a known symbol
name, the symbol index was set as 0. This change falls back to treating
unknown symbol names as integers, and emits an error if the name is not
found and the string is not an integer.

Note that the Symbol field is optional, so if a relocation doesn't
reference a symbol, it shouldn't be specified. The new error required a
number of test updates.

Reviewed by: grimar, ruiu
Differential Revision: https://reviews.llvm.org/D58510

llvm-svn: 355938
2019-03-12 17:00:25 +00:00
..
benchmarks
bindings [bindings/go] Fix building on 32-bit systems (ARM etc.) 2019-02-16 22:33:10 +00:00
cmake [CMake] Support stripping and linking output to .build-id directory 2019-03-09 01:26:55 +00:00
docs [Docs] Add note about legacy PM to Ch4 of tutorial 2019-03-12 15:44:18 +00:00
examples [Kaleidoscope] Fix symbol resolver to search in reverse order. 2019-02-21 16:53:04 +00:00
include [TTI] Enable analysis of clib functions in getIntrinsicCosts. NFCI. 2019-03-12 09:48:02 +00:00
lib [SDAG] Expand pow2 mulo using shifts 2019-03-12 16:57:25 +00:00
projects
resources
runtimes [runtime] Use --strip-all rather than --strip-sections 2019-03-10 04:26:54 +00:00
test [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names 2019-03-12 17:00:25 +00:00
tools [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names 2019-03-12 17:00:25 +00:00
unittests [Utils] Extract EliminateUnreachableBlocks (NFC) 2019-03-11 17:51:57 +00:00
utils Fix git-llvm crashing when trying to remove directory while cleaning 2019-03-12 07:40:54 +00:00
.arcconfig
.clang-format
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitattributes
.gitignore [clangd] Store index in '.clangd/index' instead of '.clangd-index' 2019-02-20 19:08:06 +00:00
CMakeLists.txt [cmake] Remove llvm from LLVM_ALL_PROJECTS 2019-03-08 21:10:22 +00:00
CODE_OWNERS.TXT
CREDITS.TXT [NFC] Add to contributor list. 2019-02-26 05:46:45 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt Testing commit access 2019-02-19 20:38:51 +00:00
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.