From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6DAC63851528; Fri, 28 Oct 2022 13:19:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DAC63851528 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666963161; bh=t8/9QxT17610IkQHj8FhOSAn/Ya5c/dVEivjESXFBjA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hgzil6BUx1cch2DCHmAmQPS3lexccm/cQ6OIqg4gFmohs5ONHQhlgnbTYj6IF7F/c 6TGxgKaNqGCzK9VnBSi5Yio2ZdqpL+PjW1KRiX7LlarQU8c35nrOS1OOhHtTAPV4GH zOibRZbnWs3niG0uz/56Pee+Lnz6od4+93Wa/s4E= From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/29621] librtld.os: in function `__register_frame': libgcc/unwind-dw2-fde.c:136: undefined reference to `malloc' Date: Fri, 28 Oct 2022 13:19:19 +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.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org 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=3D29621 --- Comment #12 from Adhemerval Zanella --- (In reply to Florian Weimer from comment #11) > (In reply to Adhemerval Zanella from comment #7) > > Ok, with this one I can see the buildroot failure. It seems that it is > > misconfiguring the stage1 gcc, where the libgcc.a generated is relying = on > > the libc for unwinding (thus why ld.so link is failing). >=20 > No, this is expected. The libgcc unwinder has depended on glibc symbols f= or > many, many years. The unwinder cannot be linked into ld.so. >=20 > Someone needs to use ld tracing to figure out why __register_frame is pul= led > into the ld.so link. What I am trying to say is buildroot generated stage1 compiler with libgcc.a for mipsle that is not what glibc expects. The buildroot symbol trace for librtld.so shows: $ /tmp/buildroot/output/host/mipsel-buildroot-linux-gnu/bin/ld [...] --trace-symbol=3D__register_frame /tmp/buildroot/output/host/mipsel-buildroot-linux-gnu/bin/ld: /tmp/buildroot/output/host/lib/gcc/mipsel-buildroot-linux-gnu/11.3.0/libgcc= .a(unwind-dw2-fde-dip.o): definition of __register_frame However even the stage2 gcc11 from the build-many-glibc does not links agai= nst the unwinder: $ mips64el-glibc-linux-gnu-ld -plugin [...] --trace-symbol=3D__register_fra= me $=20 It does not container any unwinder routines: $ ./bin/mips64el-glibc-linux-gnu-objdump -t ./lib/gcc/mips64el-glibc-linux-gnu/11.3.1/libgcc.a | grep unwind $=20 It is in fact on libgcc_eh.a: $ ./bin/mips64el-glibc-linux-gnu-objdump -t ./lib/gcc/mips64el-glibc-linux-gnu/11.3.1/libgcc_eh.a | grep unwind unwind-dw2.o: file format elf32-ntradlittlemips 00000000 l df *ABS* 00000000 /home/azanella/toolchain/src/gcc/libgcc/unwind-dw2.c unwind-dw2-fde-dip.o: file format elf32-ntradlittlemips 00000000 l df *ABS* 00000000 /home/azanella/toolchain/src/gcc/libgcc/unwind-dw2-fde.c unwind-sjlj.o: file format elf32-ntradlittlemips unwind-c.o: file format elf32-ntradlittlemips 00000000 l df *ABS* 00000000 /home/azanella/toolchain/src/gcc/libgcc/unwind-pe.h $ ./bin/mips64el-glibc-linux-gnu-objdump -t ./lib/gcc/mips64el-glibc-linux-gnu/11.3.1/libgcc_eh.a | grep __register_fra= me 00002090 g F .text 000000d8 .hidden __register_frame_info_bases 00002168 g F .text 000000d8 .hidden __register_frame_info 00002240 g F .text 0000006c .hidden __register_frame 000022b0 g F .text 000000b0 .hidden __register_frame_info_table_bases 00002360 g F .text 000000b0 .hidden __register_frame_info_table 00002410 g F .text 000000d0 .hidden __register_frame_table I am not sure if this is a multilib issue. --=20 You are receiving this mail because: You are on the CC list for the bug.=