aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-03-14 09:51:27 -0700
committerGitHub <noreply@github.com>2024-03-14 09:51:27 -0700
commit8fe3e70e810b409dce36f6d415e86f0f9b1cf22d (patch)
tree68617ad9d99438ccd881e3b1937e132d701ca219 /clang/lib/Driver/ToolChain.cpp
parent5a77bdc3e7d60c1724054d09a7dc7c67fb58ea9a (diff)
downloadllvm-8fe3e70e810b409dce36f6d415e86f0f9b1cf22d.zip
llvm-8fe3e70e810b409dce36f6d415e86f0f9b1cf22d.tar.gz
llvm-8fe3e70e810b409dce36f6d415e86f0f9b1cf22d.tar.bz2
[ELF] Eliminate symbols demoted due to /DISCARD/ discarded sections (#85167)
#69295 demoted Defined symbols relative to discarded sections. If such a symbol is unreferenced, the desired behavior is to eliminate it from .symtab just like --gc-sections discarded definitions. Linux kernel's CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y configuration expects that the unreferenced `unused` is not emitted to .symtab (https://github.com/ClangBuiltLinux/linux/issues/2006). For relocations referencing demoted symbols, the symbol index restores to 0 like older lld (`R_X86_64_64 0` in `discard-section.s`). Fix #85048
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
0 files changed, 0 insertions, 0 deletions