Fangrui Song 7c7702b318 [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
2022-03-15 19:24:41 -07:00
..
2017-09-28 17:15:02 +00:00
2021-06-17 17:08:13 +07:00
2017-11-28 20:17:58 +00:00
2017-11-23 23:40:33 +00:00
2018-06-13 18:45:25 +00:00
2018-01-16 18:53:09 +00:00
2017-12-14 05:01:49 +00:00
2018-03-23 00:35:27 +00:00
2019-02-11 21:38:20 +00:00
2017-07-19 16:45:05 +00:00
2017-07-19 16:45:05 +00:00
2017-11-28 23:06:09 +00:00