From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A4803858405; Mon, 15 Nov 2021 13:59:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A4803858405 From: "jason at zx2c4 dot com" To: glibc-bugs@sourceware.org Subject: [Bug build/28595] glibc-2.34 build fails with linker error (TLS transition from R_386_TLS_GOTIE to R_386_TLS_LE_32 against `__libc_tsd_CTYPE_B' at 0xf4 in section `.text' failed) Date: Mon, 15 Nov 2021 13:59:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: build X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at zx2c4 dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2021 13:59:48 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28595 --- Comment #7 from Jason A. Donenfeld --- Wow, gcc is wild. It looks like it's converting that ctypes indexing into a kmovd, into the mask register (even in 32-bit mode, woah): movsx eax, dl kmovd k0, ds:(__libc_tsd_CTYPE_B_tpoff - _GLOBAL_OFFSET_TABLE_)[ebx] kmovd edx, k0 kmovd k0, dword ptr gs:[edx] kmovd edx, k0 test byte ptr [edx+eax*2+1], 20h jz short loc_80000B0 Presumably when this happens, gcc isn't emitting the right type of relocati= on. It assumes it's a local-exec instead of an init-exec, or something like tha= t? Notably, that symbol is declared with `__attribute__ ((tls_model ("initial-exec")))`. --=20 You are receiving this mail because: You are on the CC list for the bug.=