This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto, build] Provide elf_getshdrstrndx replacement
Richard Guenther <richard.guenther@gmail.com> writes:
> I have
>
> /* Define to 1 if you have the `elf_getshdrstrndx' function. */
> #ifndef USED_FOR_TARGET
> /* #undef HAVE_ELF_GETSHDRSTRNDX */
> #endif
>
>
> /* Define to 1 if you have the `elf_getshstrndx' function. */
> #ifndef USED_FOR_TARGET
> #define HAVE_ELF_GETSHSTRNDX 1
> #endif
>
> and elfutils libelf.
That one implements the gABI elf_getshstrndx AFAIK, so
HAVE_ELF_GETSHSTRNDX_GABI should be defined.
> Appearantly your elf_getshdrstrnd wrapper doesn't work.
> elf_getshstrndx returns zero for me. So it appears
> that instead of ? 0 : -1 you should simply forward the
> return value.
Which is done in the HAVE_ELF_GETSHSTRNDX_GABI case. Could you check
gcc/config.log to find out why the configure test doesn't detect this?
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University