[all-commits] [llvm/llvm-project] 7c7702: [ELF] Move section assignment from initializeSymbo...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Mar 15 19:24:53 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7c7702b318503e27ebc3c795a827aa85135cc130
https://github.com/llvm/llvm-project/commit/7c7702b318503e27ebc3c795a827aa85135cc130
Author: Fangrui Song <i at maskray.me>
Date: 2022-03-15 (Tue, 15 Mar 2022)
Changed paths:
M lld/ELF/Config.h
M lld/ELF/Driver.cpp
M lld/ELF/InputFiles.cpp
M lld/ELF/Relocations.cpp
M lld/ELF/Symbols.cpp
M lld/ELF/Symbols.h
M lld/docs/ReleaseNotes.rst
R lld/test/ELF/Inputs/i386-linkonce.s
M lld/test/ELF/comdat-binding.s
M lld/test/ELF/comdat-discarded-error.s
M lld/test/ELF/comdat-discarded-lazy.s
R lld/test/ELF/comdat-linkonce.s
M lld/test/ELF/duplicated-synthetic-sym.s
M lld/test/ELF/exclude-discarded-error2.s
M lld/test/ELF/i386-linkonce.s
M lld/test/ELF/lto/comdat-mixed-archive.test
Log Message:
-----------
[ELF] Move section assignment from initializeSymbols to postParse
https://discourse.llvm.org/t/parallel-input-file-parsing/60164
initializeSymbols currently sets Defined::section and handles non-prevailing
COMDAT groups. Move the code to the parallel postParse to reduce work from the
single-threading code path and make parallel section initialization infeasible.
Postpone reporting duplicate symbol errors so that the messages have the
section information. (`Defined::section` is assigned in postParse and another
thread may not have the information).
* duplicated-synthetic-sym.s: BinaryFile duplicate definition (very rare) now
has no section information
* comdat-binding: `%t/w.o %t/g.o` leads to an undesired undefined symbol. This
is not ideal but we report a diagnostic to inform that this is unsupported.
(See release note)
* comdat-discarded-lazy.s: %tdef.o is unextracted. The new behavior (discarded
section error) makes more sense
* i386-comdat.s: switched to a better approach working around
.gnu.linkonce.t.__x86.get_pc_thunk.bx in glibc<2.32 for x86-32.
Drop the ancient no-longer-relevant workaround for __i686.get_pc_thunk.bx
Depends on D120640
Differential Revision: https://reviews.llvm.org/D120626
More information about the All-commits
mailing list