[PATCH] D120626: [ELF] Move section assignment from initializeSymbols to postParse
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 15 14:54:03 PDT 2022
MaskRay added a comment.
In D120626#3383784 <https://reviews.llvm.org/D120626#3383784>, @vitalybuka wrote:
> Could this be related to the patch https://lab.llvm.org/buildbot/#/builders/37/builds/11582 ?
>
> FYI @pcc
I could verify that `clang -fuse-ld=lld -m32 a.c` failed to link if I used an older crti.o (glibc<2.32)
usr/lib32/crti.o: definition of __x86.get_pc_thunk.bx
usr/lib32/crti.o: reference to __x86.get_pc_thunk.bx
usr/lib32/crti.o: reference to __x86.get_pc_thunk.bx
ld.lld: error: relocation refers to a symbol in a discarded section: __x86.get_pc_thunk.bx
>>> defined in usr/lib32/crti.o
>>> referenced by usr/lib32/crti.o:(.init+0x5)
>>> referenced by usr/lib32/crti.o:(.fini+0x5)
It was related to the partially supported(worked around) `.gnu.linkonce.t.__x86.get_pc_thunk.bx` broken by this change.
Should be fixed by 6be457c14dafd634989c2c0b702a9231b438e2c4 <https://reviews.llvm.org/rG6be457c14dafd634989c2c0b702a9231b438e2c4>
In D120626#3383810 <https://reviews.llvm.org/D120626#3383810>, @haowei wrote:
> We are seeing build failures in cmake config step for the clang runtime builds after this patch. Example of error messages:
Thanks for the report, but with `Host compiler does not support '-fuse-ld=lld'` it might be difficult to know for sure whether the culprit was in an lld change or a brittle configure.
Providing CMakeError.log or CMakeOutput.log with the linker diagnostic could make me more sure that it was related to this lld change.
Anycase, I think the issue was exactly the one for i386 sanitizers and it should have been fixed by the aforementioned commit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120626/new/
https://reviews.llvm.org/D120626
More information about the llvm-commits
mailing list