Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: Walter Banks Newsgroups: comp.compilers Subject: Re: ELF and DWARF tools ? Date: Mon, 29 Dec 2014 08:05:57 -0500 Organization: Aioe.org NNTP Server Lines: 32 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-12-008@comp.compilers> References: <14-12-005@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-Trace: miucha.iecc.com 1419872415 61165 2001:470:1f07:1126:0:676f:7373:6970 (29 Dec 2014 17:00:15 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Mon, 29 Dec 2014 17:00:15 +0000 (UTC) Keywords: tools, ELF Posted-Date: 29 Dec 2014 12:00:15 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com X-Received-Bytes: 2501 X-Received-Body-CRC: 2748364399 Xref: csiph.com comp.compilers:1451 "John R. Levine" wrote: > I am working on a project which involves building a compiler toolchain for > yet another architecture. The obvious object format to use is ELF and > DWARF, and I'm trying to figure out the least painful way to do that. ... This isn't going to help much. I have plenty of coding scars to show for re-implementing compiler elf/dwarf support from scratch. Most of what I found comes from a number of issues. 1) Lack of comprehensive elf/dwarf documentation. There are several documents out there that help but often critical details are missing. This has several effects on tools that use elf / dwarf. I discovered that debug tools that use elf/dwarf have the same problem and results in in-compatibility between tools that generate elf/dwarf and those that use these files. 2) Extensions to the elf/dwarf files to represent ISA or data types specific issues have been a problem. Integer types are well handled fixed point formats not so much. elf/dwarf is surprisingly complex in ways that primarily designed to save file space not as much of a goal in today's computing environment. Keep detailed implementation notes on choices made to resolve details, one thing that I didn't do but should have done. I resolved issues on my initial implementation to make the intended debug tools and the elf/dwarf files I was generating compatible but that in the long term came back to bite me when I started to work on a new tool set. Walter..