From: Michael Forney <mforney@mforney.org>
To: musl@lists.openwall.com
Subject: Re: [musl] ld-musl-* and empty .eh_frame
Date: Fri, 5 Mar 2021 18:04:56 -0800 [thread overview]
Message-ID: <CAGw6cBviZQE_+72=PQetqs8OuGvmfBNo8q=1qE-y5X8kg2dKJg@mail.gmail.com> (raw)
In-Reply-To: <20210306013902.2rec4xrbg4j5mikf@gmail.com>
On 2021-03-05, Fangrui Song <i@maskray.me> wrote:
> The empty .eh_frame is suspicious, though. There may be two problems:
>
> 1. Why do you have an empty .eh_frame in an object file
There is no .eh_frame in any of the object files involved (neither t.o
or crt*.o), just in the final executable. It seems that GNU ld creates
a .eh_frame section unless you pass --no-ld-generated-unwind-info.
> 2. Why does ld.bfd create empty .eh_frame in that case (I have tried
> simple examples like `.section .eh_frame,"a"` and I cannot reproduce
> the empty output .eh_frame)
>
> If you don't share the other files, it is difficult to locate the
> problem.
Which files are you interested in? The recipe I showed earlier should
be sufficient to reproduce the issue. You can use the standard alpine
linux toolchain (using /usr/lib instead of /lib for the paths to the
crt*.o files). With a musl.cc toolchain, you'll need to pass -z
separate-code to get the empty PT_LOAD segment, but the empty
.eh_frame is there either way.
next prev parent reply other threads:[~2021-03-06 2:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 3:18 Michael Forney
2021-03-05 15:07 ` Rich Felker
2021-03-05 16:12 ` Rich Felker
2021-03-05 22:53 ` Michael Forney
2021-03-06 1:14 ` Fangrui Song
2021-03-06 1:28 ` Rich Felker
2021-03-06 1:30 ` Michael Forney
2021-03-06 1:39 ` Fangrui Song
2021-03-06 2:04 ` Michael Forney [this message]
2021-03-06 2:09 ` 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='CAGw6cBviZQE_+72=PQetqs8OuGvmfBNo8q=1qE-y5X8kg2dKJg@mail.gmail.com' \
--to=mforney@mforney.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).