From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6891C382FC9B; Thu, 24 Nov 2022 17:01:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6891C382FC9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669309318; bh=fCXGqYfagG83j7Olbai9/wq3cOUXQbFJfArvJUPJ+WU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Hx7TcCH27HmYPQzgXovrqOzLeyqMTojRL5ZOSV5AvE2tCmQOBDUFAJzu8MBJRehuj 3KB1FhXI868wCT01PPUDlHSzm2yjD9k638bWUVFf09IqZKxs6/AfxDvoecW2/FWs/2 7CtpoT9kvGJU3t7dk8rnfzHlpWNS9VEogdRt5IvE= From: "arnout at mind dot be" 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: Thu, 24 Nov 2022 17:01:57 +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: arnout at mind dot be 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: cc 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 Arnout Vandecappelle changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arnout at mind dot be --- Comment #17 from Arnout Vandecappelle --- I can reproduce the issue with: CFLAGS_FOR_TARGET=3D'-O0' scripts/build-many-glibcs.py /var/tmp/glibc-tests compilers nios2-linux-gnu It fails at compilers-nios2-linux-gnu glibc nios2-linux-gnu build with /.../nios2-glibc-linux-gnu/bin/ld: /.../nios2-linux-gnu/glibc/nios2-linux-gnu/elf/librtld.os: in function `__register_frame': /.../libgcc/unwind-dw2-fde.c:136: undefined reference to `malloc' I don't know if we can conclude if the problem is in GCC or in glibc. There= is a GCC bug as well: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107728 bu= t they answer with: > This is not a GCC issue as __register_frame_table is declared as extern. > This is almost definitely a glibc issue really. > But I doubt glibc can be compiled at -O0 because of these issues. > [Moreover], the functions are not optimized out at -O2 but rather they > don't get pulled in glibc building because another function is referenced. >=20 > Either libgcc should be built with -fdata-sections -ffunction-sections or= =20 > glibc builds needs to be fixed such that it does not reference the functi= on > in the unwinder at -O0. You need to look at the linker map to figure why > the object file is being pulled into glibc at -O0 and not at -O2. > But it is still a bug in glibc's ld.so really. --=20 You are receiving this mail because: You are on the CC list for the bug.=