From: Max Filippov <jcmvbkbc@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Ian Lance Taylor <ian@airs.com>
Subject: Re: [RFC 1/2] libbacktrace: add FDPIC support
Date: Tue, 11 Jun 2024 09:54:00 -0700 [thread overview]
Message-ID: <CAMo8BfJshzWhbW+9P39m265w6gLn5CH-BUiUmk=9XX7VNFCTiw@mail.gmail.com> (raw)
In-Reply-To: <20240527065026.855607-2-jcmvbkbc@gmail.com>
On Sun, May 26, 2024 at 11:50 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> Instead of a single base address FDPIC ELF files use load map: a
> structure with an array of mappings for individual segments. Change
> libbacktrace functions and structures to support that.
Ping?
> libbacktrace/
>
> PR libbacktrace/114941
> * dwarf.c: Include <link.h> or <sys/link.h> if available.
> (struct dwarf_data): Change base_address type to base_address_type.
> (add_low_high_range): Change base_address argument type to
> base_address_type. Use __RELOC_UINTPTR for lowpc and highpc
> calculation.
> (add_ranges_from_ranges): Change base_address argument type to
> base_address_type. Use __RELOC_UINTPTR to calculate arguments
> for add_range().
> (add_ranges_from_rnglists): Change base_address argument type to
> base_address_type. Use __RELOC_UINTPTR to calculate arguments
> for add_range(). Use __RELOC_UINTPTR for low calculation.
> (add_ranges, find_address_ranges, build_address_map): Change
> base_address argument type to base_address_type.
> (add_line): Use __RELOC_UINTPTR for ln->pc calculation.
> (build_dwarf_data, backtrace_dwarf_add): Change base_address
> argument type to base_address_type.
> * elf.c (elf_initialize_syminfo): Change base_address argument
> type to base_address_type. Use __RELOC_UINTPTR for
> elf_symbols[j].address calculation.
> (elf_add): Change base_address argument type to
> base_address_type. Do early return -1 in case of FDPIC
> executable, update corresponding comment.
> (backtrace_initialize): Change NULL base address parameter in
> the add_elf() call to no_base_address.
> * internal.h (base_address_type, __RELOC_POINTER)
> (__RELOC_UINTPTR, no_base_address): New definitions.
> (backtrace_dwarf_add): Change base_address argument type to
> base_address_type.
> ---
> libbacktrace/dwarf.c | 60 ++++++++++++++++++++++++-----------------
> libbacktrace/elf.c | 20 +++++++++-----
> libbacktrace/internal.h | 14 +++++++++-
> 3 files changed, 62 insertions(+), 32 deletions(-)
--
Thanks.
-- Max
next prev parent reply other threads:[~2024-06-11 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 6:50 [RFC 0/2] " Max Filippov
2024-05-27 6:50 ` [RFC 1/2] " Max Filippov
2024-06-11 16:54 ` Max Filippov [this message]
2024-05-27 6:50 ` [RFC 2/2] libstdc++-v3/src/libbacktrace: add -funwind-tables Max Filippov
2024-05-27 7:01 ` [RFC 0/2] libbacktrace: add FDPIC support Rainer Orth
2024-05-27 7:12 ` Max Filippov
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='CAMo8BfJshzWhbW+9P39m265w6gLn5CH-BUiUmk=9XX7VNFCTiw@mail.gmail.com' \
--to=jcmvbkbc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ian@airs.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).