hanchenye-llvm-project/lld
Alex Bradbury 44deaf7e54 [DWARF][RISCV] Add support for RISC-V relocations needed for debug info
When code relaxation is enabled many RISC-V fixups are not resolved but
instead relocations are emitted. This happens even for DWARF debug
sections. Therefore, to properly support the parsing of DWARF debug info
we need to be able to resolve RISC-V relocations. This patch adds:

* Support for RISC-V relocations in RelocationResolver
* DWARF support for two relocations per object file offset
* DWARF changes to support relocations in more DIE fields

The two relocations per offset change is needed because some RISC-V
relocations (used for label differences) come in pairs.

Relocations can also be emitted for DWARF fields where relocations were
not yet evaluated. Adding relocation support for some of these fields is
essencial. On the other hand, LLVM currently emits RISC-V relocations
for fixups that could be safely evaluated, since they can never be
affected by code relaxations. This patch also adds relocation support
for the fields affected by those extraneous relocations (the DWARF unit
entry Length, and the DWARF debug line entry TotalLength and
PrologueLength), for testing purposes.

Differential Revision: https://reviews.llvm.org/D62062
Patch by Luís Marques.

llvm-svn: 366402
2019-07-18 05:22:55 +00:00
..
COFF [COFF] Implement /safeseh:no and check @feat.00 flags by default 2019-07-16 18:17:33 +00:00
Common [lld] Add Visual Studio compatible diagnostics 2019-07-17 14:54:02 +00:00
ELF [DWARF][RISCV] Add support for RISC-V relocations needed for debug info 2019-07-18 05:22:55 +00:00
MinGW [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
cmake/modules
docs Add --undefined-glob which is an --undefined with wildcard pattern match 2019-06-14 14:00:59 +00:00
include/lld [lld] Add Visual Studio compatible diagnostics 2019-07-17 14:54:02 +00:00
lib [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
test [ELF][test] Merge/rename some basic*.s tests 2019-07-18 04:54:58 +00:00
tools/lld Fix build breakage on Darwin. 2019-07-11 06:12:18 +00:00
unittests Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
utils Python 2/3 compatibility 2019-03-20 07:42:13 +00:00
wasm [lld][WebAssembly] Fix handling of comdat functions in init array. 2019-07-17 18:43:36 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.md

README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

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

Benchmarking

In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.

It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz

The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.