From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 605E03840C03; Fri, 12 Mar 2021 17:29:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 605E03840C03 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug threads/27239] gdb/cp-support.c:1619:(.text+0x5502): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for thread_local_segv_handler' Date: Fri, 12 Mar 2021 17:29:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: threads X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 10.2 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: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2021 17:29:36 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27239 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The gdb-10-branch branch has been updated by Christian Biesinger : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1ee63759b094= c15300f9cd74da20830a6e1137c7 commit 1ee63759b094c15300f9cd74da20830a6e1137c7 Author: Christian Biesinger Date: Tue Mar 9 08:16:23 2021 -0600 Use RAII to set the per-thread SIGSEGV handler This avoids using a thread-local extern variable, which causes link err= ors on some platforms, notably Cygwin. But I think this is a better pattern even outside of working around linker bugs because it encapsulates dire= ct access to the variable inside the class, instead of having a global ext= ern variable. The cygwin link error is: cp-support.o: in function `gdb_demangle(char const*, int)': =20=20=20 /home/Christian/binutils-gdb/obj/gdb/../../gdb/cp-support.c:1619:(.text+0x6= 472): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS in= it function for thread_local_segv_handler' =20=20=20 /home/Christian/binutils-gdb/obj/gdb/../../gdb/cp-support.c:1619:(.text+0x6= 48b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS in= it function for thread_local_segv_handler' collect2: error: ld returned 1 exit status 2021-03-12 Christian Biesinger PR threads/27239 * cp-support.c: Use scoped_segv_handler_restore. * event-top.c (thread_local_segv_handler): Made static. (scoped_segv_handler_restore::scoped_segv_handler_restore): New function. (scoped_segv_handler_restore::~scoped_segv_handler_restore): New function. * event-top.h (class scoped_segv_handler_restore): New class. (thread_local_segv_handler): Removed. --=20 You are receiving this mail because: You are on the CC list for the bug.=