From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12838 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: TLS issue on aarch64 Date: Fri, 25 May 2018 23:38:10 +0200 Message-ID: <20180525213810.GH4418@port70.net> References: <20180525145059.GG4418@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1527284178 14913 195.159.176.226 (25 May 2018 21:36:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 May 2018 21:36:18 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) To: musl@lists.openwall.com Original-X-From: musl-return-12854-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 25 23:36:14 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fMKNi-0003nF-8W for gllmg-musl@m.gmane.org; Fri, 25 May 2018 23:36:14 +0200 Original-Received: (qmail 8065 invoked by uid 550); 25 May 2018 21:38:23 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 8044 invoked from network); 25 May 2018 21:38:22 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20180525145059.GG4418@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:12838 Archived-At: * Szabolcs Nagy [2018-05-25 16:50:59 +0200]: > * Phillip Berndt [2018-05-25 14:40:14 +0200]: > > I'm experiencing a TLS-related error with musl on aarch64. This is my > > test program: > > > > ----8<-------------- > > #include > > > > __thread int foo = 1234; > > __thread int bar __attribute__((aligned(0x100))) = 5678; > > > > int main(int argc, char **argv) > > { > > printf("0x%p: %d\n", &foo, foo); > > printf("0x%p: %d\n", &bar, bar); > > > > return 0; > > } > > ---->8--------------- verified that this fails on arm and sh4 too, these targets have non-trivial TP_ADJ, i suspect we might need some further macro to do arch specific tls alignment correctly.