This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto] PATCH: Locate DWARF information in ELF files
Andrew Pinski wrote:
>
> On Jun 18, 2006, at 1:25 PM, Mark Mitchell wrote:
>
>>
>> This patch makes the LTO front end open ELF files and locate the DWARF
>> sections required for building LTO information. The ELF-specific bits
>> are segreated into a separate file so that platforms using other
>> object file formats can be supported in future. We will probably also
>> need some autoconf bits to detect libelf; for now, we'll just assume
>> its available.
>
> Isn't libelf not part of the GNU project? Even some GNU/Linux does not
> include libelf by default. Why not use BFD to read the dwarf2 info
> instead?
At this point, I don't consider this choice to be very interesting; the
hard parts are reading/writing the GCC tree representation. This stuff
is just a way to get to the hard parts, so we can achieve proof of concept.
I chose libelf because it seemed the simplest way to get past this bit,
and on to the next part. But, I wrote the interface in such a way that
it's easy to drop in a different object file reader. I had thought
people would use that to support Mach-O or PE/COFF, but if you want to
contribute a BFD port, that's fine by me.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713