aboutsummaryrefslogtreecommitdiff
path: root/gold/merge.cc
AgeCommit message (Collapse)AuthorFilesLines
2010-08-25 * archive.cc: Formatting fixes: Remove whitespace betweenNick Clifton1-1/+1
typename and following asterisk. Remove whitespace between function name and opening parenthesis. * archive.h: Likewise. * arm.cc: Likewise. * attributes.cc: Likewise. * attributes.h: Likewise. * common.cc: Likewise. * copy-relocs.cc: Likewise. * dirsearch.h: Likewise. * dynobj.cc: Likewise. * ehframe.cc: Likewise. * ehframe.h: Likewise. * expression.cc: Likewise. * fileread.cc: Likewise. * fileread.h: Likewise. * gc.h: Likewise. * gold-threads.cc: Likewise. * gold.cc: Likewise. * i386.cc: Likewise. * icf.h: Likewise. * incremental-dump.cc: Likewise. * incremental.cc: Likewise. * layout.cc: Likewise. * layout.h: Likewise. * main.cc: Likewise. * merge.cc: Likewise. * merge.h: Likewise. * object.cc: Likewise. * object.h: Likewise. * options.cc: Likewise. * options.h: Likewise. * output.cc: Likewise. * output.h: Likewise. * plugin.cc: Likewise. * plugin.h: Likewise. * powerpc.cc: Likewise. * reloc.cc: Likewise. * script-c.h: Likewise. * script-sections.cc: Likewise. * script.cc: Likewise. * stringpool.cc: Likewise. * symtab.cc: Likewise. * symtab.h: Likewise. * target.cc: Likewise. * timer.cc: Likewise. * timer.h: Likewise. * version.cc: Likewise. * x86_64.cc: Likewise.
2010-08-03 * merge.cc (Output_merge_string::do_add_input_section): Count stringsCary Coutant1-20/+39
to reserve space in merged_strings vector. Keep total input size for stats. (Output_merge_string::do_print_merge_stats): Print total input size. * merge.h (Output_merge_string): Add input_size_ field. * stringpool.cc (Stringpool_template::string_length): Move implementations out of Stringpool_template class and place in stringpool.h. * stringpool.h (string_length): Move out of Stringpool_template.
2010-07-21 * merge.h (Output_merge_string::Merged_string): Remove object, shndx,Cary Coutant1-12/+33
string, and length fields. (Output_merge_string::Merged_strings_list): New type. (Output_merge_string::Merged_strings_lists): New typedef. (Output_merge_string): Replace merged_strings_ with merged_strings_lists_. * merge.cc (Output_merge_string::do_add_input_section): Allocate new Merged_strings_list per input object and section. Don't store pointer to the string. Don't store length with each merged string entry. (Output_merge_string::finalize_merged_data): Loop over list of merged strings lists. Recompute length of each merged string.
2010-07-12 * compressed_output.cc (zlib_decompress): New function.Cary Coutant1-2/+41
(get_uncompressed_size): New function. (decompress_input_section): New function. * compressed_output.h (get_uncompressed_size): New function. (decompress_input_section): New function. * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info) Handle compressed debug sections. * layout.cc (is_compressed_debug_section): New function. (Layout::output_section_name): Map compressed section names to canonical names. * layout.h (is_compressed_debug_section): New function. (is_debug_info_section): Recognize compressed debug sections. * merge.cc: Include compressed_output.h. (Output_merge_data::do_add_input_section): Handle compressed debug sections. (Output_merge_string::do_add_input_section): Handle compressed debug sections. * object.cc: Include compressed_output.h. (Sized_relobj::Sized_relobj): Initialize new data members. (build_compressed_section_map): New function. (Sized_relobj::do_read_symbols): Handle compressed debug sections. * object.h (Object::section_is_compressed): New method. (Object::do_section_is_compressed): New method. (Sized_relobj::Compressed_section_map): New type. (Sized_relobj::do_section_is_compressed): New method. (Sized_relobj::compressed_sections_): New data member. * output.cc (Output_section::add_input_section): Handle compressed debug sections. * reloc.cc: Include compressed_output.h. (Sized_relobj::write_sections): Handle compressed debug sections.
2010-05-232010-05-23 Doug Kwan <dougkwan@google.com>Doug Kwan1-0/+28
* arm.cc (Arm_input_section::do_output_offset): Use convert_types instead of a cast. (Target_arm::apply_cortex_a8_workaround): Rewrite a conditional branch with a direct branch, not a conditional branch, to a stub. * merge.cc (Output_merge_base::record_input_section): New method defintion. (Output_merge_data::do_add_input_section): Record input section if keeps-input-sections flag is set. (Output_merge_string::do_add_input_section): Ditto. * merge.h (Output_merge_base::Output_merge_base): Initialize new data members KEEPS_INPUT_SECTIONS_, FIRST_RELOBJ_, FIRST_SHNDX_ and INPUT_SECTIONS_. (Output_merge_base::keeps_input_sections, Output_merge_base::set_keeps_input_sections, Output_merge_base::first_relobj, Output_merge_base::first_shndx): New method definitions. (Output_merge_base::Input_sections): New type declaration. (Output_merge_base::input_sections_begin, Output_merge_base::input_sections_end, Output_merge_base::do_set_keeps_input_sections): New method definitions. (Output_merge_base::bool keeps_input_sections_, Output_merge_base::first_relobj_, Output_merge_base::first_shndx_, Output_merge_base::input_sections_): New data members. (Output_merge_data::do_set_keeps_input_sections): New method defintion. (Output_merge_string::do_set_keeps_input_sections): Ditto. * output.cc (Output_section::Input_section::relobj): Move method defintion from class declaration to here and handle merge sections. (Output_section::Input_section::shndx): Ditto. (Output_section::Output_section): Remove initializations of removed data members and initialize new data member LOOKUP_MAPS_. (Output_section::add_input_section): Set keeps-input-sections flag for a newly created merge output section as appropriate. Adjust code to use Output_section_lookup_maps class. (Output_section::add_relaxed_input_section): Adjst code for lookup maps code refactoring. (Output_section::add_merge_input_section): Add a new parameter KEEPS_INPUT_SECTION. Adjust code to use Output_section_lookup_maps class. If adding input section to a newly created merge output section fails, remove the new merge section. (Output_section::convert_input_sections_in_list_to_relaxed_input_sections): Adjust code for use of the Output_section_lookup_maps class. (Output_section::find_merge_section): Ditto. (Output_section::build_lookup_maps): New method defintion. (Output_section::find_relaxed_input_section): Adjust code to use Output_section_lookup_maps class. (Output_section::get_input_sections): Export merge sections. Adjust code to use Output_section_lookup_maps class. (Output_section:::add_script_input_section): Adjust code to use Output_section_lookup_maps class. Update lookup maps for merge sections also. (Output_section::discard_states): Use Output_section_lookup_maps. (Output_section::restore_states): Same. * output.h (Merge_section_properties): Move class defintion out of Output_section. (Output_section_lookup_maps): New class. (Output_section::Input_section::is_merge_section): New method defintion. (Output_section::Input_section::relobj): Move defintion out of class defintion. Declare method only. (Output_section::Input_section::shndx): Ditto. (Output_section::Input_section::output_merge_base): New method defintion. (Output_section::Input_section::u2_.pomb): New union field. (Output_section::Merge_section_by_properties_map, Output_section::Output_section_data_by_input_section_map, Output_section::Ouptut_relaxed_input_section_by_input_section_map): Remove types. (Output_section::add_merge_input_section): Add new parameter KEEPS_INPUT_SECTIONS. (Output_section::build_lookup_maps): New method declaration. (Output_section::merge_section_map_, Output_section::merge_section_by_properties_map_, Output_section::relaxed_input_section_map_, Output_section::is_relaxed_input_section_map_valid_): Remove data members. (Output_section::lookup_maps_): New data member.
2010-04-092010-04-08 Doug Kwan <dougkwan@google.com>Doug Kwan1-1/+4
* merge.cc (Output_merge_data::set_final_data_size): Handle empty Output_merge_data. * output.cc (Output_section::add_merge_input_section): Simplify code and return status of Output_merge_base::add_input_section. Update merge section map only if Output_merge_base::add_input_section returns true.
2009-12-14 Revert -Wshadow changes, all changes from:Ian Lance Taylor1-16/+16
2009-12-11 Doug Kwan <dougkwan@google.com> 2009-12-11 Nick Clifton <nickc@redhat.com> * configure.ac: Remove -Wshadow when setting WARN_CXXFLAGS.
2009-12-11Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton1-16/+16
Fix up all warnings generated by the addition of this switch.
2009-07-09 * merge.cc (Object_merge_map::initialize_input_to_output_map):Ian Lance Taylor1-0/+6
Reserve space in the hash table.
2009-03-23 * merge.cc (do_add_input_section): Correct pend value. ChangeIan Lance Taylor1-3/+5
message about last entry not being null terminated from error to warning.
2008-04-08 * merge.cc (Object_merge_map::get_output_offset): Remove inlineIan Lance Taylor1-1/+1
qualifier.
2008-03-13Update copyright years. Update language files.Ian Lance Taylor1-1/+1
2008-03-13Don't crash if we change the address of the .eh_frame section after weIan Lance Taylor1-1/+3
find its size.
2007-12-21Speed up relocations against local symbols in merged sections.Ian Lance Taylor1-116/+84
2007-12-20Update comments about output offsets and merged input sections.Ian Lance Taylor1-9/+30
2007-12-20Remove one inline.Ian Lance Taylor1-1/+1
2007-12-20Make functions on hot path inline. Remove a mistaken virtualIan Lance Taylor1-2/+2
declaration.
2007-12-19Move Stringpool offsets into a chunked_vector indexed by keys.Ian Lance Taylor1-5/+4
2007-12-19Use string length when available when calling Stringpool. CompareIan Lance Taylor1-3/+9
pointers first when looking up Stringpool entries.
2007-12-18Print statistics about merge sections with --stats.Ian Lance Taylor1-0/+64
2007-12-18Add section_size_type and section_offset_type, use them to replace aIan Lance Taylor1-33/+47
lot of instances of off_t.
2007-12-15Minor speedup to Output_merge_string::do_add_input_section.Ian Lance Taylor1-8/+7
2007-12-01Compress all debug sections.Ian Lance Taylor1-0/+17
2007-11-30From Craig Silverstein: Add support for compressing .debug_str section.Ian Lance Taylor1-7/+14
2007-11-29Clean up setting address and section offset.Ian Lance Taylor1-2/+2
2007-11-27Rework merge_map for speed.Ian Lance Taylor1-59/+240
2007-11-22Make Merge_key_less operator() inline.Ian Lance Taylor1-1/+1
2007-11-09Generate a complete exception frame header. Discard duplicateIan Lance Taylor1-29/+56
exception frame information.
2007-10-20From Craig Silverstein: add cast to avoid warning.Ian Lance Taylor1-1/+1
2007-10-19Fix handling of wide string merge sections.Ian Lance Taylor1-3/+4
2007-10-18Correctly handle alignment in merge sections.Ian Lance Taylor1-3/+7
2007-10-14Run all error handling through an Errors object. Delete output fileIan Lance Taylor1-11/+7
on error.
2007-10-12Add an option for Stringpools to not copy strings.Ian Lance Taylor1-1/+1
2007-10-10From Craig Silverstein: don't get confused if the same file nameIan Lance Taylor1-1/+9
occurs in an archive.
2007-09-25Add cache parameter to get_view. Discard uncached views on unlock.Ian Lance Taylor1-2/+2
Fix bug this exposed in archive armap symbol name handling.
2007-09-23Avoid dereferencing map->end().Ian Lance Taylor1-1/+2
2007-09-22Add licensing text to every source file.Ian Lance Taylor1-0/+20
2007-09-22We don't need a hash table mapping input locations to strings.Ian Lance Taylor1-36/+7
2007-05-16Add support for SHF_MERGE sections.Ian Lance Taylor1-0/+333