aboutsummaryrefslogtreecommitdiff
path: root/gold/stringpool.h
AgeCommit message (Collapse)AuthorFilesLines
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-03-05Update copyright yearsAlan Modra1-1/+1
2013-04-292013-04-29 Alexander Ivchenko <alexander.ivchenko@intel.com>Cary Coutant1-1/+3
gold/ * output.cc (Output_section::add_merge_input_section): Allow to merge sections if the alignment is more than character size. * merge.h (Output_merge_string::Output_merge_string): Remove assert. * merge.cc (Output_merge_string<Char_type>::do_add_input_section): Count only not-null strings. Check the alignment of strings. * stringpool.h (Stringpool_template<Stringpool_char>::Stringpool_template): Add alignment as the argument. (Stringpool_template<Stringpool_char>::addralign_): New class member. * stringpool.cc (Stringpool_template<Stringpool_char>::new_key_offset): Align non-zero length strings according to the addralign_. (Stringpool_template<Stringpool_char>::set_string_offsets): Updating offsets according to the given alignment. * testsuite/Makefile.am (text_section_grouping): Test if string literals are getting merged. * testsuite/Makefile.in: Regenerate. * testsuite/merge_string_literals_1.c: New file. * testsuite/merge_string_literals_2.c: Ditto. * testsuite/merge_string_literals.sh: Ditto.
2011-06-28 * symtab.cc (Symbol::versioned_name): New function.Ian Lance Taylor1-1/+6
(Symbol_table::add_to_final_symtab): Use versioned_name when appropriate. (Symbol_table::sized_write_symbol): Likewise. * symtab.h (class Symbol): Declare versioned_name. * stringpool.h (class Stringpool_template): Add variant of add which takes a std::basic_string. * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_12. (ver_test_12_SOURCES, ver_test_12_DEPENDENCIES): New variables. (ver_test_12_LDFLAGS, ver_test_12_LDADD): New variables. (ver_test_12.o): New target. * testsuite/Makefile.in: Rebuild.
2010-08-03 * merge.cc (Output_merge_string::do_add_input_section): Count stringsCary Coutant1-4/+22
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-03-192010-03-19 Doug Kwan <dougkwan@google.com>Doug Kwan1-1/+3
* arm.cc (Stub_table::Stub_table): Initialize new data members Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_. (Stub_table::add_reloc_stub): Assign stub offset and update Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_. (Stub_table::reloc_stubs_size_, Stub_table::reloc_stubs_addralign_): New data members. (Stub_table::update_data_size_and_addralign): Use Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_ instead of going over all reloc stubs. (Stub_table::finalize_stubs): Do not assign reloc stub offsets. * stringpool.cc (Stringpool_template::Stringpool_template): Initialize Stringpool_template::offset_ to size of Stringpool_char. (Stringpool_template::new_key_offset): Remove code to initialize Stringpool_template::offset_. * stringpool.h (Stringpool_template::set_no_zero_null): Set Stringpool_template::offset_ to zero.
2010-03-162010-03-15 Doug Kwan <dougkwan@google.com>Doug Kwan1-17/+29
* stringpool.cc (Stringpool_template::Stringpool_template): Initialize offset_. (Stringpool_template::new_key_offset): New method. (Stringpool_template::add_string): Assign offsets when adding new strings. (Stringpool_template::set_string_offsets): Do not set string offsets when not optimizing. * stringpool.h (Chunked_vector::Chunked_vector): Initialize data member size_. (Chunked_vector::clear): Clear size_. (Chunked_vector::reserve): Call reserve method of all Element_vectors. (Chunked_vector::size): Return size_. (Chunked_vector::push_back): Use size_ to find insert position. (Chunked_vector::size_): New data member. (Stringpool_template::set_no_zero_null): Assert string set is empty. (Stringpool_template::new_key_offset): New method declaration. (Stringpool_template::offset_): New data member.
2009-06-23 PR 10133Ian Lance Taylor1-0/+8
* stringpool.h (class Stringpool_template): Add optimize_ field. (Stringpool_template::set_optimize): New function. * stringpool.cc (Stringpool_template::Stringpool_template): Initialize optimize_ field. (Stringpool_template::set_string_offsets): Test local optimize fild rather than parameter. * layout.cc (Layout::Layout): Call set_optimize on the section name stringpool.
2008-07-24 * stringpool.cc (Stringpool_template::add_with_length): Set key toIan Lance Taylor1-2/+2
array size plus one. (Stringpool_template::set_string_offsets): Subtract one from key before using it as an array index. (Stringpool_template::get_offset_with_length): Likewise. (Stringpool_template::write_to_buffer): Likewise. * stringpool.h (Stringpool_template::get_offset_from_key): Likewise.
2008-03-13Update copyright years. Update language files.Ian Lance Taylor1-1/+1
2007-12-19Move Stringpool offsets into a chunked_vector indexed by keys.Ian Lance Taylor1-13/+94
2007-12-19Use string length when available when calling Stringpool. CompareIan Lance Taylor1-4/+10
pointers first when looking up Stringpool entries.
2007-12-18Add section_size_type and section_offset_type, use them to replace aIan Lance Taylor1-6/+6
lot of instances of off_t.
2007-12-14From Craig Silverstein: size hash tables to avoid resizing.Ian Lance Taylor1-0/+6
2007-12-05Rework Stringpool to not compute the hash code twice when adding a newIan Lance Taylor1-33/+57
string.
2007-12-05Stringpool stats. Also make Symbol_table support functions inline.Ian Lance Taylor1-0/+4
2007-12-01Compress all debug sections.Ian Lance Taylor1-1/+1
2007-11-30From Craig Silverstein: Add support for compressing .debug_str section.Ian Lance Taylor1-0/+10
2007-10-12Add an option for Stringpools to not copy strings.Ian Lance Taylor1-11/+10
2007-09-22Add licensing text to every source file.Ian Lance Taylor1-0/+20
2007-09-21Set Stringpool zero_null option via a call, not a default constructorIan Lance Taylor1-5/+9
argument.
2007-09-19Note that a Stringpool keeps a copy of a string.Ian Lance Taylor1-0/+3
2007-09-19Better comments for Stringpool.Ian Lance Taylor1-31/+71
2007-09-18Compute string lengths before sorting. From Craig Silverstein.Ian Lance Taylor1-4/+14
2007-05-16Add support for SHF_MERGE sections.Ian Lance Taylor1-28/+43
2006-11-29Hash tables, dynamic section, i386 PLT, gold_assert.Ian Lance Taylor1-1/+4
2006-11-07Rework stringpool and hash tables so that we always generate the sameIan Lance Taylor1-15/+36
output regardless of randomize_va_space.
2006-09-29Snapshot. Now able to produce a minimal executable which actuallyIan Lance Taylor1-10/+62
runs.
2006-09-26g++ 3.2.2 portability fixes.Ian Lance Taylor1-0/+6
2006-08-18Another snapshot of the current state of the sources. Gets to theIan Lance Taylor1-0/+70
point of symbol resolution and can now issue a multiple definition error. Also added target selection infrastructure.