mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Fangrui Song <i@maskray.me>
To: musl@lists.openwall.com
Cc: Rich Felker <dalias@libc.org>, Ariadne Conill <ariadne@dereferenced.org>
Subject: Re: [musl] option to enable eh_frame
Date: Sat, 24 Jul 2021 16:45:52 -0700	[thread overview]
Message-ID: <20210724234552.v43fcviw5igtpej3@gmail.com> (raw)
In-Reply-To: <20210718102007.0b40e53b@vostro>

On 2021-07-18, Timo Teras wrote:
>On Sun, 18 Jul 2021 09:09:22 +0300
>Timo Teras <timo.teras@iki.fi> wrote:
>
>> I do have some technical reasons why I'd prefer .eh_frame (getting it
>> on core dumps). Fortunately I need these from development boxes where
>> I can have custom build for internal use only. So if .debug_frame is
>> needed for peace, then so be it.
>
>I'm trying to implement this currently, and have two observations:
>
>1) musl.so seems to have .eh_frame even with default options currently.
>GCC insists generating it for the PLT. Though otherwise it's empty.
>This is on gcc 10.3.1.

ld can generate .eh_frame pieces for PLT entries on x86.

GNU ld and gold have implemented --ld-generated-unwind-info. It was
proposed in 2011 in
https://sourceware.org/bugzilla/show_bug.cgi?id=12570 At that time gdb
could not unwind from the middle of a PLT entry. (It can do that now.)

(ld.lld doesn't have the feature. Considering that only asynchronous
unwinding requests in the PLT code sequence may benefit from the
feature, this is of very low value.
It adds complexity due to breaking phase ordering in a linker.)

>2) .debug_frame is 109944 bytes, while .eh_frame_hdr + .eh_frame is
>83832. The size difference seems to be because of CIE entries not being
>merged for .debug_frame.

Yep, ld can optimize .eh_frame_hdr + .eh_frame . .debug_frame is
unoptimized.

  reply	other threads:[~2021-07-24 23:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  9:16 Timo Teras
2021-07-16 15:57 ` Rich Felker
2021-07-16 22:06   ` Ariadne Conill
2021-07-17  0:41     ` Rich Felker
2021-07-17  1:08       ` Ariadne Conill
2021-07-17  1:10         ` Érico Nogueira
2021-07-17  7:24         ` Laurent Bercot
2021-07-18  8:16       ` Timo Teras
2021-07-17  7:33   ` Timo Teras
2021-07-17 10:38     ` Timo Teras
2021-07-17 13:25     ` Rich Felker
2021-07-17 15:40       ` Timo Teras
2021-07-17 16:09         ` Rich Felker
2021-07-17 19:52           ` Ariadne Conill
2021-07-17 23:56             ` Rich Felker
2021-07-18  1:40               ` Ariadne Conill
2021-07-18  2:23                 ` Ariadne Conill
2021-07-18  6:09               ` Timo Teras
2021-07-18  7:20                 ` Timo Teras
2021-07-24 23:45                   ` Fangrui Song [this message]
2022-04-17 19:50     ` Fangrui Song

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=20210724234552.v43fcviw5igtpej3@gmail.com \
    --to=i@maskray.me \
    --cc=ariadne@dereferenced.org \
    --cc=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).