On 25/10/2010 19:43, Andi Kleen wrote: > Andrew Pinski <pins...@gmail.com> writes: > >> On Mon, Oct 25, 2010 at 11:15 AM, Ian Lance Taylor <i...@google.com> wrote: >>> At least, that is how I see it. >> Why not require libelf just like for LTO? That seems like a time to >> reduce what we depend on. For an example if we compile with lto and >> go, GCC will use two different elf libraries. This seems dumb really. > > libelf is rather awkward and has different implementations with > different bugs and also usually needs to be installed explicitely on > Linux. > > It would be better to make LTO use Ian's library (but then it's C++ I > believe, not C) > > -Andi
What would be even nicer would be if we could share the same code-reader interface between lto and go (and the lto-plugin), thereby getting object format independence equally everywhere for no extra cost. That could be orthogonal to plugging elfcpp into the role currently occupied by libelf in that reader. (As to needing c++, that's just a matter of enabling c++ as a stage1 language and living with the minor limitation that go can't be a stage1 language unless you already have an installed c++ compiler, no?) cheers, DaveK