From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C17593858C60; Mon, 29 Jan 2024 01:39:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C17593858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706492356; bh=q/Pm7W+Lm9U9jPwgJuL02a/gujYViPAXfaxiDNMsJXw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Nec3V2VURxbrjglgEtA/Ly690lZ/SEUd08pAejW9Hi38pS2U+7dstFmzluIBj9M5I nSncmBCSd5BAPNRSM9rXAo6rU2WUJNVCluJGHHVySvLBpPvre7XirpPPXKZAkDNyDW GgmMWoZ3kIT0ad42uUnbaViYs4fpB6kWHRhQav4c= From: "luofengwc at qq dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo Date: Mon, 29 Jan 2024 01:39:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.38 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: luofengwc at qq dot com X-Bugzilla-Status: UNCONFIRMED 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31302 --- Comment #7 from luofeng14 --- (In reply to luofeng14 from comment #6) > (In reply to luofeng14 from comment #5) > > (In reply to Florian Weimer from comment #3) > > > Which linker are you using? > > >=20 > > > It is possible that for static PIE, we assume that the link editor is= able > > > to fully relax TLS relocations, that is, compute fixed constants and = put > > > them into the data segment or directly into the code (after instructi= on > > > relaxation). > >=20 > > and it show some dlerror.o function .rela.dyn section sym relocate type > > cause the problem. not the constant > >=20 > > Relocation section '.rela.dyn' at offset 0x85e0 contains 13252 entries: > > 00000023df28 010b00000012 R_X86_64_TPOFF64 0000000000000078 > > __libc_dlerror_result + 0 > > 00000023df70 011100000012 R_X86_64_TPOFF64 0000000000000058 > > __libc_tsd_CTYPE_[...] + 0 > > 00000023dfc0 025700000012 R_X86_64_TPOFF64 0000000000000068 > > __libc_tsd_CTYPE_B + 0 > > 00000023dfc8 002400000012 R_X86_64_TPOFF64 0000000000000018 > > __libc_tsd_LOCALE + 0 > > 00000023dfe0 023b00000012 R_X86_64_TPOFF64 0000000000000060 > > __libc_tsd_CTYPE_[...] + 0 >=20 >=20 > sorry, ____libc_dlerror_result is var not function; >=20 > thread struct dl_action_result *__libc_dlerror_result (In reply to luofeng14 from comment #6) > (In reply to luofeng14 from comment #5) > > (In reply to Florian Weimer from comment #3) > > > Which linker are you using? > > >=20 > > > It is possible that for static PIE, we assume that the link editor is= able > > > to fully relax TLS relocations, that is, compute fixed constants and = put > > > them into the data segment or directly into the code (after instructi= on > > > relaxation). > >=20 > > and it show some dlerror.o function .rela.dyn section sym relocate type > > cause the problem. not the constant > >=20 > > Relocation section '.rela.dyn' at offset 0x85e0 contains 13252 entries: > > 00000023df28 010b00000012 R_X86_64_TPOFF64 0000000000000078 > > __libc_dlerror_result + 0 > > 00000023df70 011100000012 R_X86_64_TPOFF64 0000000000000058 > > __libc_tsd_CTYPE_[...] + 0 > > 00000023dfc0 025700000012 R_X86_64_TPOFF64 0000000000000068 > > __libc_tsd_CTYPE_B + 0 > > 00000023dfc8 002400000012 R_X86_64_TPOFF64 0000000000000018 > > __libc_tsd_LOCALE + 0 > > 00000023dfe0 023b00000012 R_X86_64_TPOFF64 0000000000000060 > > __libc_tsd_CTYPE_[...] + 0 >=20 >=20 > sorry, ____libc_dlerror_result is var not function; >=20 > thread struct dl_action_result *__libc_dlerror_result and __libc_dlerror_result is not constant glibc/glibc-2.34/dlfcn/dlerror.c 49,7: __libc_dlerror_result =3D NULL; 62,7: __libc_dlerror_result =3D NULL; 120,4: __libc_dlerror_result =3D NULL; 153,4: __libc_dlerror_result =3D NULL; 175,8: __libc_dlerror_result =3D dl_action_result_malloc_fai= led; 178,4: __libc_dlerror_result =3D result; glibc/glibc-2.34/dlfcn/libc_dlerror_result.c 37,7: __libc_dlerror_result =3D NULL; --=20 You are receiving this mail because: You are on the CC list for the bug.=