llvm-project/lld/ELF
Petr Hosek 1a3f3a3fa1 [lld][ELF] __start_/__stop_ refs don't retain C-ident named group sections
The special root semantics for identifier-named sections is meant
specifically for the metadata sections. In the context of group
semantics, where group members are always retained or discarded as a
unit, it's natural not to have this semantics apply to a section in a
group, otherwise we would never discard the group defeating the purpose
of using the group in the first place.

This change modifies the GC behavior so that __start_/__stop_ references
don't retain C identifier named sections in section groups which allows
for these groups to be collected. This matches the behavior of BFD ld.

The only kind of existing case that might break is interdependent
metadata sections that are all in a group together, but that group
doesn't contain any other sections referenced by anything except
implicit inclusion in a `__start_` and/or `__stop_`-referenced
identifier-named section, but such cases should be unlikely.

Differential Revision: https://reviews.llvm.org/D96753
2021-02-20 22:22:05 -08:00
..
Arch [ELF] Support aarch64_be 2021-02-08 08:55:29 -08:00
AArch64ErrataFix.cpp
AArch64ErrataFix.h [LLD][ELF] Optimize linker script filename glob pattern matching NFC 2020-09-16 10:26:11 +01:00
ARMErrataFix.cpp
ARMErrataFix.h [LLD][ELF] Optimize linker script filename glob pattern matching NFC 2020-09-16 10:26:11 +01:00
CallGraphSort.cpp
CallGraphSort.h
CMakeLists.txt
Config.h [ELF] Inspect -EL & -EB for OUTPUT_FORMAT(default, big, little) 2021-02-08 10:34:57 -08:00
Driver.cpp fix comment typos to cycle bots 2021-02-18 14:25:21 -05:00
Driver.h [LLD] Rename lld port driver entry function to a consistent name 2020-12-18 12:18:37 +05:30
DriverUtils.cpp [ELF] Rewriting the path of sample profile file for --reproduce response.txt 2021-02-09 00:00:16 -08:00
DWARF.cpp [lib/Object] - Generalize the RelocationResolver API. 2020-11-20 10:32:49 +03:00
DWARF.h
EhFrame.cpp ELF: Teach the linker about the 'B' augmentation string character. 2021-01-05 19:51:11 -08:00
EhFrame.h
ICF.cpp [LLD][ELF] Improve ICF for relocations to ineligible sections via "aliases" 2020-10-15 12:43:14 +01:00
ICF.h
InputFiles.cpp fix comment typos to cycle bots 2021-02-18 14:25:21 -05:00
InputFiles.h [LLD][ELF] - Use LLVM_ELF_IMPORT_TYPES_ELFT instead of multiple types definitions. NFCI. 2020-12-29 10:50:07 +03:00
InputSection.cpp [ELF] Allow R_386_GOTOFF from .debug_info 2021-02-04 09:17:47 -08:00
InputSection.h [ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections 2020-11-12 09:59:43 -08:00
LinkerScript.cpp [LLD][ELF] - Don't keep empty output sections which have explicit program headers. 2020-12-02 11:19:21 +03:00
LinkerScript.h [LLD][ELF] Optimize linker script filename glob pattern matching NFC 2020-09-16 10:26:11 +01:00
LTO.cpp fix comment typo to cycle bots 2021-02-17 11:53:42 -05:00
LTO.h
MapFile.cpp [lld][ELF] Add additional time trace categories 2020-11-10 10:28:46 +00:00
MapFile.h
MarkLive.cpp [lld][ELF] __start_/__stop_ refs don't retain C-ident named group sections 2021-02-20 22:22:05 -08:00
MarkLive.h
Options.td [ELF] Inspect -EL & -EB for OUTPUT_FORMAT(default, big, little) 2021-02-08 10:34:57 -08:00
OutputSections.cpp [ELF] --emit-relocs: fix a crash if .rela.dyn is an empty output section 2020-12-16 08:59:38 -08:00
OutputSections.h [ELF][NFCI] small cleanup to OutputSections.h 2021-01-12 23:09:16 +00:00
README.md
Relocations.cpp [ELF] Delete unused --warn-ifunc-textrel 2021-02-02 09:47:06 -08:00
Relocations.h [LLD][ELF][AArch64] Add support for R_AARCH64_LD64_GOTPAGE_LO15 relocation 2021-01-26 12:01:38 +00:00
ScriptLexer.cpp
ScriptLexer.h
ScriptParser.cpp [ELF] Inspect -EL & -EB for OUTPUT_FORMAT(default, big, little) 2021-02-08 10:34:57 -08:00
ScriptParser.h
Symbols.cpp fix comment typo to cycle bots 2021-02-17 15:29:39 -05:00
Symbols.h [LTO] Prevent devirtualization for symbols dynamically exported 2021-01-27 15:54:13 -08:00
SymbolTable.cpp
SymbolTable.h
SyntheticSections.cpp [ELF] Drop .rel[a].debug_gnu_pub{names,types} for --gdb-index --emit-relocs 2021-01-12 00:07:28 -08:00
SyntheticSections.h [LLD][ELF] - Use LLVM_ELF_IMPORT_TYPES_ELFT instead of multiple types definitions. NFCI. 2020-12-29 10:50:07 +03:00
Target.cpp [ELF] Rename adjustRelaxExpr to adjustTlsExpr and delete the unused data parameter. NFC 2020-11-25 09:00:55 -08:00
Target.h [ELF] Rename adjustRelaxExpr to adjustTlsExpr and delete the unused data parameter. NFC 2020-11-25 09:00:55 -08:00
Thunks.cpp [PowerPC][LLD] Extend R2 save stub to support offsets of more than 26 bits 2020-09-25 06:39:14 -05:00
Thunks.h
Writer.cpp fix comment typos to cycle bots 2021-02-18 14:25:21 -05:00
Writer.h

See docs/NewLLD.rst