This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

stabs editing/R_*_NONE question

[Get raw message]
I've been trying to remove stabs for discarded functions, in much the same
way that relocations against discarded functions are dealt with.  I've run
in to a similar problem - there's no N_NONE stab, and we've already set the
size of the output section at this point.  I'm not sure what to do; there's
no stabs I can see which both GDB and Solaris dbx will safely ignore.

Then I tried doing it earlier, before elf_bfd_final_link.  It seems to me
that after lang_add_sections () all the information I need ought to be
available, but it's not easily accessible - figuring out where the
relocations for this particular .stab section are, for instance, and how
many there are.  That drags in SHF_MERGE-related code.

But if I'm not concerned about the space savings then I could work around
this, it seems to me.  I could change the size of the output stab section
and leave the extra dead in the file.  Would that work?

It wastes no more space than would be wasted by emitting them, as we used
to.  It also could be compacted by a trivial tool that read in the file and
wrote it out again, changing only the file offsets.  The same thing could
kill *_NONE relocations entirely.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]