This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Patch: Support .loc STABS directive on ELF based toolchains.
- To: nickc at cygnus dot co dot uk
- Subject: Re: Patch: Support .loc STABS directive on ELF based toolchains.
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 29 Sep 1999 11:00:32 -0400
- CC: binutils at sourceware dot cygnus dot com
- References: <199909291437.PAA30604@pathia.cygnus.co.uk>
Date: Wed, 29 Sep 1999 15:37:42 +0100
From: Nick Clifton <nickc@cygnus.com>
Here is a small patch to allow the .loc STABS directive to be used
on ELF toolchains which use .gnu.linkonce.t sections as special
cases of the .text section.
1999-09-29 Nick Clifton <nickc@cygnus.com>
* ecoff.c (ecoff_directive_loc): Allow the .loc directive to
appear inside .gnu.linkoce.t. sections for ELF based
toolchains.
We don't reject .loc outside of a .text section because we are
mean-hearted. We reject it because it won't work. ECOFF debugging
information builds a single table of line numbers for an object file.
That table is implicitly assumed to be attached to the .text section.
I don't see how to avoid that, given the weird construction of the
ECOFF symbol table.
If you want to use ECOFF debugging information, I think you need to
avoid using linkonce sections. Or vice-versa. I recommend using
straight stabs debugging information instead.
If the debugging information really does work correctly, particularly
after processing through ld -r, let me know (by work correctly, I mean
that objdump -dl and gdb can correctly report line numbers for the
linkonce functions in question).
! const char name[] = ".gnu.linkonce.t.";
I don't think K&R C compilers support automatic array initialization.
Make it static.
Ian