This is the mail archive of the
mailing list for the GDB project.
Re: PATCH: Warning relocs against discarded functions
On Thu, Nov 01, 2001 at 03:54:11PM -0800, Geoff Keating wrote:
> Well, I see these choices:
> - Declare that the user is in error, and should not have discarded
> .text.exit without discarding .stabs (or should have put the stabs
> for .text.exit in their own .stabs.exit section, and discarded that
> too); or
Won't this require assembler support? Or is it already somehow there?
> - Make the linker smart enough to do what the user really wants, which
> is to delete the debugging information for .text.exit at the time it
> discards the section.
I think that the only feasible way to do this would be to put the stabs
in their own section. It looks like section groups should suffice for
this, once we have a way to put stabs into the right sections.
> Of course, this raises an interesting question: why not just use the
> c preprocessor to prevent the functions for this section being
> compiled in the first place?
I've no idea. I imagine that would work.
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer