PATCH: Add gold support for -t and -y options
Cary Coutant
ccoutant@google.com
Thu Apr 17 21:52:00 GMT 2008
> This is going to insert a std::string constructor and destructor to
> every symbol seen in every object file whether or not -y is used.
> That is too expensive for such an uncommon feature. You need to guard
> the call to is_trace_symbol with a call to an (inlined) function like
> any_trace_symbols. Compare to any_wrap_symbols.
>
> Ok with that change.
I've generalized it a bit more and added a DEFINE_set macro to
generalize the --wrap and --trace_symbol options as a set of strings.
Now the test for not empty is folded into the is_wrap and
is_trace_symbol functions. Is that OK, or would you prefer to have
add_from_object make the any_trace_symbol test explicitly? (In the
--wrap case the way I've written it, add_from_object still does the
explicit check for any_wrap, and wrap_symbol will do the same test
redundantly as part of its is_wrap test.)
* errors.cc (Errors::info): New function.
(gold_info): New function.
* errors.h (Errors::info): New function.
* gold.h (gold_info): New function.
* object.cc (Input_objects::add_object): Print trace output.
* options.cc (options::parse_set): New function.
(General_options::parse_wrap): Deleted.
(General_options::General_options): Deleted initializer.
* options.h (options::String_set): New typedef.
(options::parse_set): New function.
(DEFINE_set): New macro.
(General_options::wrap): Changed to use DEFINE_set. Changed
callers of any_wrap_symbols and is_wrap_symbol.
(General_options::trace, General_options::trace_symbol):
New options.
(General_options::any_wrap_symbols, General_options::is_wrap_symbol)
(General_options::wrap_symbols_): Deleted.
* symtab.cc (Symbol_table::add_from_object): Print trace output.
-cary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: trace-patch-2.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20080417/637975dc/attachment.txt>
More information about the Binutils
mailing list