This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Handle PIEs in libbacktrace
- From: Ian Lance Taylor <iant at google dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, Dmitry Vyukov <dvyukov at google dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 6 Dec 2013 06:36:44 -0800
- Subject: Re: [PATCH] Handle PIEs in libbacktrace
- Authentication-results: sourceware.org; auth=none
- References: <20131206075033 dot GE892 at tucnak dot redhat dot com>
On Thu, Dec 5, 2013 at 11:50 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>
> 2013-12-06 Jakub Jelinek <jakub@redhat.com>
>
> * elf.c (ET_DYN): Undefine and define again.
> (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
> return early -1 without closing the descriptor.
> (struct phdr_data): Add exe_descriptor.
> (phdr_callback): If pd->exe_descriptor is not -1, for very first
> call if dlpi_name is NULL just call elf_add with the exe_descriptor,
> otherwise backtrace_close the exe_descriptor if not -1. Adjust
> call to elf_add.
> (backtrace_initialize): Adjust call to elf_add. If it returns
> -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
Please update the comment for elf_add to explain the return value.
This patch is OK with that change.
Thanks.
Ian