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: [lto, build] Provide elf_getshdrstrndx replacement


On Fri, Apr 16, 2010 at 3:45 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Diego Novillo <dnovillo@google.com> writes:
>
>> OK for trunk. ?Thanks for fixing this wart.
>
> Thanks, installed with a one-line change to install.texi.
>
>> I suppose that it's also OK for 4.5.1, but the RMs should decide that.
>
> Ok, I'll ask again in a week or two.

This broke all LTO tests on a previously working (lto disabled)
configuration with

lto1: error: could not locate ELF string table: ^M
lto-wrapper: /home/abuild/rguenther/obj/gcc/xgcc returned 1 exit status^M
collect2: lto-wrapper returned 1 exit status^M

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.

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.

Richard.

> ? ? ? ?Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2010-04-16 ?Rainer Orth ?<ro@CeBiTec.Uni-Bielefeld.DE>
>
> ? ? ? ?* doc/install.texi (Prerequisites): Document that Solaris 2 libelf
> ? ? ? ?works.
>
> Index: gcc/doc/install.texi
> ===================================================================
> --- gcc/doc/install.texi ? ? ? ?(revision 158422)
> +++ gcc/doc/install.texi ? ? ? ?(working copy)
> @@ -361,7 +361,7 @@
> ?downloaded from @uref{http://www.mr511.de/software/libelf-0.8.12.tar.gz},
> ?though it is commonly available in several systems. ?The versions in
> ?IRIX 5 and 6 don't work since they lack @file{gelf.h}. ?The version in
> -recent releases of Solaris 11 does work, previous ones don't yet.
> +Solaris 2 does work.
>
> ?The @option{--with-libelf} configure option should be used if libelf is
> ?not installed in your default library search patch.
>


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