This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/Darwin] Fix section relocation addresses when base address is not 0.
- From: Pedro Alves <palves at redhat dot com>
- To: Xavier Roirand <roirand at adacore dot com>, gdb-patches at sourceware dot org
- Cc: brobecker at adacore dot com, tgingold at free dot fr
- Date: Mon, 26 Mar 2018 19:05:39 +0100
- Subject: Re: [RFA/Darwin] Fix section relocation addresses when base address is not 0.
- References: <1520239994-15165-1-git-send-email-roirand@adacore.com>
On 03/05/2018 08:53 AM, Xavier Roirand wrote:
> When using "info sharedlibrary" on Darwin, the start & end addresses
> may be wrong if the shared objects relocation address is not 0 because
> section relocation adresses does not take in account base address
> when this one is different from 0.
>
> This patch fixes it.
>
> gdb/ChangeLog:
>
> * solib-darwin.c (struct lm_info): Add lm_base and base_set
> fields.
> (darwin_current_sos): Add detail in comment. Set addr_low.
> (darwin_relocate_section_addresses): Use base address to
> relocate a section.
I don't know much about Darwin, but this sounds reasonable to me,
at least.
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2018-03-02 Tristan Gingold <gingold@adacore.com>
Please remember to preserve Tristan as git author, then.
Thanks,
Pedro Alves