This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Dwarf2 FDE CIE offset
On Sat, Dec 08, 2001 at 06:34:59PM +1030, Alan Modra wrote:
> Worse, you'd need to edit the eh_frame section in the linker, or make
> the assembler emit relocs for those FDE CIE offsets. I don't
> particularly like the idea of teaching the linker all about
> debug/unwind formats. It's a too "clever" solution for my liking.
> I much prefer simple, robust solutions. What happens when the
> eh_frame format changes (again)?
Well, all I can do is refer you back to the original thread (which you
commented in):
http://sources.redhat.com/ml/binutils/2001-11/msg00069.html
It sounds as if there are other features it would be useful to have at
link time that require editing .eh_frame; and really, this does not
seem to be a terribly complicated edit. It requires understanding the
size of entries and where the internal offset is; nothing else should
need adjusting.
> > A comment was made about the
> > problems with section proliferation when I suggested using separate
> > .stabs sections, IIRC.
>
> ELF gives us 64k sections per object file. If that's not enough, it
> would be almost trivial to modify the linker to handle more, using
> 0xffff for shnum in the external program header to mean "lots", and
> poke the real count somewhere.
Hmm. Despite what I said above, that does sound plausible, and perhaps
more straightforward.
Note that we will probably need the linker to understand DWARF-2
anyway. Separating the dwarf information would be a little more
complicated than separating stabs, as I see it; and I'll need to
discard DWARF-2 for discarded functions at some point soon anyway.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer