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]
Other format: [Raw text]

Re: Slow _bfd_strip_section_from_output


On Mon, May 02, 2005 at 05:44:47PM -0700, H. J. Lu wrote:
> 	* bfdlink.h (bfd_link_order_type): Add bfd_input_link_order.
> 	(bfd_new_input_link_order): New.

Why ever did you need this?  bfd_indirect_link_order is the one that's
used for input sections.  Oh, I see.  You're effectively making an
entirely new list which wastes memory using bfd_link_order structs.  No,
I don't like it.  Too quick and dirty.  How about striving for some
elegance?

Hmm, I might take a look at this one myself.  Here's the idea:  Change
the type of link_order_head and link_order_tail to be a union, either a
struct bfd_link_order *, or asection *.  Use these pointers to build
lists of input sections attached to an output section.  Change
_bfd_strip_section_from_output to only set SEC_EXCLUDE on the input
section (or better, remove the function entirely).  In
strip_excluded_output_sections, traverse the lists and strip any output
section that has all its input sections marked SEC_EXCLUDE.  Also reset
the output section link_order pointers to NULL.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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