diff options
author | Fangrui Song <i@maskray.me> | 2024-03-14 09:51:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 09:51:27 -0700 |
commit | 8fe3e70e810b409dce36f6d415e86f0f9b1cf22d (patch) | |
tree | 68617ad9d99438ccd881e3b1937e132d701ca219 /clang/lib/Driver/ToolChain.cpp | |
parent | 5a77bdc3e7d60c1724054d09a7dc7c67fb58ea9a (diff) | |
download | llvm-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