hanchenye-llvm-project/lld
Fangrui Song 8df4e60945 [ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections
Fixes PR48071

* The Rust compiler produces SHF_ALLOC `.debug_gdb_scripts` (which normally does not have the flag)
* `.debug_gdb_scripts` sections are removed from `inputSections` due to --strip-debug/--strip-all
* When processing --gc-sections, pieces of a SHF_MERGE section can be marked live separately

`=>` segfault when marking liveness of a `.debug_gdb_scripts` which is not split into pieces (because it is not in `inputSections`)

This patch circumvents the problem by not treating SHF_ALLOC ".debug*" as debug sections (to prevent --strip-debug's stripping)
(which is still useful on its own).

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D91291
2020-11-12 09:59:43 -08:00
..
COFF Revert "Reland [CFGuard] Add address-taken IAT tables and delay-load support" 2020-11-11 16:03:33 +01:00
Common [LLD][COFF] When using LLD-as-a-library, always prevent re-entrance on failures 2020-11-12 08:14:43 -05:00
ELF [ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections 2020-11-12 09:59:43 -08:00
MachO [lld-macho] Add very basic support for LTO 2020-11-10 12:19:28 -08:00
MinGW Reapply [LLD] [COFF] Implement a GNU/ELF like -wrap option 2020-10-15 22:14:02 +03:00
cmake/modules lld: Let find_package(LLD) work 2020-05-14 09:59:53 -04:00
docs [lld] Provide a hook to customize undefined symbols error handling 2020-11-09 13:28:48 +01:00
include/lld [LLD][COFF] When using LLD-as-a-library, always prevent re-entrance on failures 2020-11-12 08:14:43 -05:00
lib Reland "[yaml2obj][ELF] - Simplify the code that performs sections validation." 2020-10-20 16:25:33 +03:00
test [ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections 2020-11-12 09:59:43 -08:00
tools/lld [LLD][COFF] When using LLD-as-a-library, always prevent re-entrance on failures 2020-11-12 08:14:43 -05:00
unittests Use INTERFACE_COMPILE_OPTIONS to disable -Wsuggest-override for any target that links to gtest 2020-07-27 08:37:01 -07:00
utils
wasm [lld][WebAssembly] Allow references to __tls_base without shared memory 2020-11-10 17:58:06 -08:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Remove .svn from exclude list as we moved to git 2020-10-21 16:09:21 +02:00
CODE_OWNERS.TXT Add code owners of new MachO port 2020-09-02 19:32:12 -07:00
LICENSE.TXT
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.