[PATCH] D85994: [LLD][PowerPC] Add check in LLD to produce an error for missing TLSGD/TLSLD
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 14:44:32 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/Relocations.cpp:1311
if (config->emachine == EM_PPC64) {
+ // When computing the address of a TLS symbol for the General Dynamic
+ // and Local Dynamic models a call is made to __tls_get_addr. This function
----------------
I still think this is a diagnostic of lower value, so I'd hope we can spend less code on this (when it is no longer needed, delete it).
The comments are too verbose in my opinion. We have explained __tls_get_addr is used by General Dynamic/Local Dynamic TLS models, so there is no point spending more sentences on it. Suggest:
// For a call to __tls_get_addr, the instruction needs to relocated by two relocations, R_PPC64_TLSGD/R_PPC64_TLSLD and R_PPC64_REL24[_NOTOC]
I am not sure it is worth checking the relocation at i - 2.
================
Comment at: lld/test/ELF/ppc64-tls-missing-gdld.s:1
+# REQUIRES ppc
+# RUN: llvm-mc --triple=powerpc64le %s --filetype=obj -o %t1.o
----------------
REQUIRES:
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85994/new/
https://reviews.llvm.org/D85994
More information about the llvm-commits
mailing list