From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Fangrui Song <maskray@google.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] elf: Support lld-style link map for librtld.map
Date: Tue, 7 Apr 2020 17:31:51 -0300 [thread overview]
Message-ID: <d3767d15-d8c3-e552-0937-941ba3a415c4@linaro.org> (raw)
In-Reply-To: <20200313020955.rcx63wkdsi6bodd4@google.com>
On 12/03/2020 23:09, Fangrui Song wrote:
> GNU ld and gold's -Map include a line like:
>
> path/to/build/libc_pic.a(check_fds.os)
>
> lld -Map does not have the archive member list, but we can still derive the
> members from the following output
>
> VMA LMA Size Align Out In Symbol
> ...
> 1a1c0 1a1c0 e2 16 path/to/build/libc_pic.a(check_fds.os):(.text)
The new regex will match more entries, but I think it is ok.
LGTM, thanks.
>
> ---
> elf/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/elf/Makefile b/elf/Makefile
> index da689a2c7b..b035407112 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -512,9 +512,10 @@ $(objpfx)librtld.map: $(objpfx)dl-allobjs.os $(common-objpfx)libc_pic.a
> rm -f $@.o
> mv -f $@T $@
>
> +# For lld, skip preceding addresses and values before matching the archive and the member.
> $(objpfx)librtld.mk: $(objpfx)librtld.map Makefile
> LC_ALL=C \
> - sed -n 's@^$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
> + sed -n 's@^[0-9a-f ]*$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
> $< | \
> while read lib file; do \
> case $$lib in \
>
next prev parent reply other threads:[~2020-04-07 20:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 2:09 Fangrui Song
2020-04-07 20:31 ` Adhemerval Zanella [this message]
2020-04-20 19:44 ` Fangrui Song
2020-04-20 20:18 ` Adhemerval Zanella
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=d3767d15-d8c3-e552-0937-941ba3a415c4@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=maskray@google.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.
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).