[PATCH] D78438: [ELF] Delete "TLS attribute mismatch" diagnostics
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 08:05:17 PDT 2020
MaskRay added a comment.
> For example if we added the check in scanRelocs the symbol combination would have completed so if there was a non-TLS symbol reference (via bitcode or assembly) that was replaced by a TLS definition we would accept that. However if the definition were non-TLS we would.
(1)The example I intend to add to `lld/test/ELF/tls-mismatch.s` (below) and (2) https://bugs.llvm.org/show_bug.cgi?id=45600 suggests that testing STT_TLS is not suitable.
# RUN: echo '.globl tls1' | llvm-mc -filetype=obj -triple=x86_64 - -o %t2.o
# RUN: ld.lld %t2.o %t.o -o /dev/null
We can add the diagnostic back when (2) is implemented (likely via a new RelExpr member) (My experience is that this diagnostic has not detected anything.)
> Btw, do you know what is the behavior of modern bfd/gold and/or their plans?
GNU ld does not check TLS mismatching. gold has a `symbol '%s' used as both __thread and non-__thread` error but its use case is a bit different (despite the similarity of code).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78438/new/
https://reviews.llvm.org/D78438
More information about the llvm-commits
mailing list