[ELF] Move addWrappedSymbols before postParseObjectFile
authorFangrui Song <i@maskray.me>
Sat, 5 Mar 2022 02:56:37 +0000 (18:56 -0800)
committerFangrui Song <i@maskray.me>
Sat, 5 Mar 2022 02:56:37 +0000 (18:56 -0800)
commitf456c3ae3f4182b23673929e8fe0aa18bcec4289
treea62caf50536bc10254cc03fa877aeb1a392ae0f6
parentc01ec3083026f7e24e6c06f48a05d413e2c697d4
[ELF] Move addWrappedSymbols before postParseObjectFile

addWrappedSymbols may trigger archive extraction: split stack implementation
uses --wrap=pthread_create, which extracts libgcc.a(generic-morestack-thread.o).

This fixes the regression caused by 09602d3b47ec83abb2c26efa5a199c13b72c7abf by
making the invariant satisfied: no more non-compileBitcodeFiles object file is
produced at postParseObjectFile.
lld/ELF/Driver.cpp
lld/test/ELF/wrap-extract.s [new file with mode: 0644]