public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "arnout at mind dot be" <sourceware-bugzilla@sourceware.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: Thu, 24 Nov 2022 17:01:57 +0000	[thread overview]
Message-ID: <bug-29621-131-eBY3mi8MhA@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29621-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29621

Arnout Vandecappelle <arnout at mind dot be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arnout at mind dot be

--- Comment #17 from Arnout Vandecappelle <arnout at mind dot be> ---
I can reproduce the issue with:

CFLAGS_FOR_TARGET='-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=107728 but 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.
> 
> Either libgcc should be built with -fdata-sections -ffunction-sections or 
> glibc builds needs to be fixed such that it does not reference the function
> 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-11-24 17:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 19:44 [Bug libc/29621] New: " james.hilliard1 at gmail dot com
2022-09-27 19:44 ` [Bug libc/29621] " james.hilliard1 at gmail dot com
2022-09-29 17:45 ` adhemerval.zanella at linaro dot org
2022-09-29 19:51 ` james.hilliard1 at gmail dot com
2022-10-17 12:42 ` adhemerval.zanella at linaro dot org
2022-10-26 18:54 ` james.hilliard1 at gmail dot com
2022-10-26 19:10 ` adhemerval.zanella at linaro dot org
2022-10-26 19:33 ` james.hilliard1 at gmail dot com
2022-10-27 14:04 ` adhemerval.zanella at linaro dot org
2022-10-27 19:57 ` james.hilliard1 at gmail dot com
2022-10-27 21:05 ` adhemerval.zanella at linaro dot org
2022-10-27 21:35 ` james.hilliard1 at gmail dot com
2022-10-28  5:28 ` fweimer at redhat dot com
2022-10-28 13:19 ` adhemerval.zanella at linaro dot org
2022-10-28 13:36 ` adhemerval.zanella at linaro dot org
2022-10-28 16:18 ` james.hilliard1 at gmail dot com
2022-10-28 16:32 ` adhemerval.zanella at linaro dot org
2022-10-28 21:23 ` james.hilliard1 at gmail dot com
2022-11-24 17:01 ` arnout at mind dot be [this message]
2022-11-24 17:21 ` arnout at mind dot be
2022-11-24 17:27 ` fweimer at redhat dot com
2023-08-07  9:37 ` sam at gentoo dot org
2024-01-11  9:41 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29621-131-eBY3mi8MhA@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).