aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-11-02 08:37:15 -0800
committerFangrui Song <i@maskray.me>2020-11-02 08:37:15 -0800
commit2fc704a0a529dd7eba7566a293f981a86bfa5c3e (patch)
treeb33465acdde0603b6445d029b8dc806387aa85ce /clang/lib/Frontend/CompilerInvocation.cpp
parent2ca4406de8354357c1b782591e527c1848bf6998 (diff)
downloadllvm-2fc704a0a529dd7eba7566a293f981a86bfa5c3e.zip
llvm-2fc704a0a529dd7eba7566a293f981a86bfa5c3e.tar.gz
llvm-2fc704a0a529dd7eba7566a293f981a86bfa5c3e.tar.bz2
[ELF] --emit-relocs: fix st_value of STT_SECTION in the presence of a gap before the first input section
In the presence of a gap, the st_value field of a STT_SECTION symbol is the address of the first input section (incorrect if there is a gap). Set it to the output section address instead. In -r mode, this bug can cause an incorrect non-zero st_value of a STT_SECTION symbol (while output sections have zero addresses, input sections may have non-zero outSecOff). The non-zero st_value can cause the final link to have incorrect relocation computation (both GNU ld and LLD add st_value of the STT_SECTION symbol to the output section address). Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D90520
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions