This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Handle PIEs in libbacktrace


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]