From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 5ECFB3858D39 for ; Sun, 26 Dec 2021 15:48:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5ECFB3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=deneb.enyo.de Received: from [172.17.203.2] (port=37505 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1n1Vl4-0000jR-Q5; Sun, 26 Dec 2021 15:48:26 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.94.2) (envelope-from ) id 1n1Vl4-000APm-Ce; Sun, 26 Dec 2021 16:48:26 +0100 From: Florian Weimer To: Fengkai Sun via Libc-help Cc: Fengkai Sun Subject: Re: CHECK_STATIC_TLS in R_X86_64_TPOFF64 type relocation References: Date: Sun, 26 Dec 2021 16:48:26 +0100 In-Reply-To: (Fengkai Sun via Libc-help's message of "Sun, 26 Dec 2021 21:29:13 +0800") Message-ID: <87wnjrjrjp.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2021 15:48:30 -0000 * Fengkai Sun via Libc-help: >> We are trying to perform a static TLS relocation in MAP, but it was > dynamically loaded. > > To the best of my knowledge, I found that R_X86_64_TPOFF64 is for > Initial-exec TLS model, which only appears in executables. No, initial-exec in shared objects is fine (as long as static TLS space is available). Local-exec TLS in executables does not need relocations, and the link editor typically relaxes initial-exec TLS reference in main programs to local-exec TLS, leaving no of them trace (except for the PT_TLS segment).