Re: ELF and DWARF tools ?

Walter Banks <>
Mon, 29 Dec 2014 08:05:57 -0500

          From comp.compilers

Related articles
ELF and DWARF tools ? (John R. Levine) (2014-12-29)
Re: ELF and DWARF tools ? (=?UTF-8?B?QyBCZXJnc3Ryw7Zt?=) (2014-12-29)
Re: ELF and DWARF tools ? (Hans Aberg) (2014-12-29)
Re: ELF and DWARF tools ? (Walter Banks) (2014-12-29)
Re: ELF and DWARF tools ? (Charles Chester) (2014-12-30)
| List of all articles for this month |

From: Walter Banks <>
Newsgroups: comp.compilers
Date: Mon, 29 Dec 2014 08:05:57 -0500
Organization: NNTP Server
References: 14-12-005
Keywords: tools, ELF
Posted-Date: 29 Dec 2014 12:00:15 EST

"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.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.