llvm-capstone/lld/ELF
Fangrui Song f5b42eaadb [ELF] -r --compress-debug-sections: update implicit addends for .rel.debug_* referencing STT_SECTION symbols (#66804)
https://reviews.llvm.org/D48929 updated addends for non-SHF_ALLOC sections
relocated by REL for -r links, but the patch did not update the addends when
--compress-debug-sections={zlib,zstd} is used (#66738).

https://reviews.llvm.org/D116946 handled tombstone values in debug
sections in relocatable links. As a side effect, both
relocateNonAllocForRelocatable (using `sec->relocations`) and
relocatenonNonAlloc (using raw REL/RELA) may run.

Actually, we can adjust the condition in relocatenonAlloc to completely replace
relocateNonAllocForRelocatable. This patch implements this idea and fixes #66738.

As relocateNonAlloc processes the raw relocations like copyRelocations() does,
the condition `if (config->relocatable && type != target.noneRel)` in `copyRelocations`
(commit 08d6a3f133, modified by https://reviews.llvm.org/D62052)
can be made specific to SHF_ALLOC sections.

As a side effect, we can now report diagnostics for PC-relative relocations for
-r. This is a less useful diagnostic that is not worth too much code. As
https://github.com/ClangBuiltLinux/linux/issues/1937 has violations, just
suppress the warning for -r. Tested by commit 561b98f9e0.
2023-09-20 14:50:13 -07:00
..
Arch [ELF] Implement getImplicitAddend and enable checkDynamicRelocsDefault for Hexagon 2023-09-15 23:10:17 -07:00
AArch64ErrataFix.cpp
AArch64ErrataFix.h
ARMErrataFix.cpp
ARMErrataFix.h
CallGraphSort.cpp
CallGraphSort.h
CMakeLists.txt
Config.h [WPD][LLD] Add option to validate RTTI is enabled on all native types and prevent devirtualization on types with native RTTI 2023-09-18 15:51:49 -07:00
Driver.cpp [WPD][LLD] Add option to validate RTTI is enabled on all native types and prevent devirtualization on types with native RTTI 2023-09-18 15:51:49 -07:00
Driver.h
DriverUtils.cpp
DWARF.cpp
DWARF.h
EhFrame.cpp
EhFrame.h
ICF.cpp
ICF.h
InputFiles.cpp [ELF] Make -t work with --format=binary 2023-09-16 00:41:23 -07:00
InputFiles.h
InputSection.cpp [ELF] -r --compress-debug-sections: update implicit addends for .rel.debug_* referencing STT_SECTION symbols (#66804) 2023-09-20 14:50:13 -07:00
InputSection.h [ELF][RISCV] Implement --emit-relocs with relaxation 2023-09-09 12:06:39 +02:00
LinkerScript.cpp [ELF] Postpone "unable to move location counter backward" error (#66854) 2023-09-20 09:06:45 -07:00
LinkerScript.h [ELF] Postpone "unable to move location counter backward" error (#66854) 2023-09-20 09:06:45 -07:00
LTO.cpp [WPD][LLD] Add option to validate RTTI is enabled on all native types and prevent devirtualization on types with native RTTI 2023-09-18 15:51:49 -07:00
LTO.h
MapFile.cpp
MapFile.h
MarkLive.cpp
MarkLive.h
Options.td [WPD][LLD] Add option to validate RTTI is enabled on all native types and prevent devirtualization on types with native RTTI 2023-09-18 15:51:49 -07:00
OutputSections.cpp [ELF] Implement getImplicitAddend and enable checkDynamicRelocsDefault for PPC32 2023-09-15 22:49:18 -07:00
OutputSections.h
README.md
Relocations.cpp
Relocations.h
ScriptLexer.cpp
ScriptLexer.h
ScriptParser.cpp [ELF] Correct a comment about ^=. NFC 2023-09-15 17:52:48 -07:00
ScriptParser.h
Symbols.cpp
Symbols.h
SymbolTable.cpp [ELF] Priorize the last catch-all pattern in version scripts 2023-09-09 23:47:01 -07:00
SymbolTable.h
SyntheticSections.cpp [ELF] Align the end of PT_GNU_RELRO associated PT_LOAD to a common-page-size boundary (#66042) 2023-09-14 10:33:11 -07:00
SyntheticSections.h [ELF] Align the end of PT_GNU_RELRO associated PT_LOAD to a common-page-size boundary (#66042) 2023-09-14 10:33:11 -07:00
Target.cpp
Target.h [PowerPC][lld] Account for additional X-Forms -> D-Form/DS-Forms load/stores when relaxing initial-exec to local-exec 2023-08-31 08:45:10 -05:00
Thunks.cpp
Thunks.h
Writer.cpp [ELF] Postpone "unable to move location counter backward" error (#66854) 2023-09-20 09:06:45 -07:00
Writer.h

See docs/NewLLD.rst