summaryrefslogtreecommitdiff
path: root/gold/stringpool.cc
Commit message (Collapse)AuthorAgeFilesLines
* ChangeLog rotatation and copyright year updateAlan Modra2015-01-021-1/+1
|
* Update copyright yearsAlan Modra2014-03-051-1/+1
|
* * stringpool.cc (Stringpool_template::reserve): AddIan Lance Taylor2013-12-191-2/+5
| | | | | HAVE_UNORDERED_MAP case. * stringpool.cc (Stringpool_template::print_stats): Likewise.
* gold/Cary Coutant2013-05-011-1/+2
| | | | | * stringpool.cc (Stringpool_template::new_key_offset): Fix uninitialized warning.
* 2013-04-29 Alexander Ivchenko <alexander.ivchenko@intel.com>Cary Coutant2013-04-291-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* * archive.cc: Formatting fixes: Remove whitespace betweenNick Clifton2010-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * merge.cc (Output_merge_string::do_add_input_section): Count stringsCary Coutant2010-08-031-22/+0
| | | | | | | | | | | 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-19 Doug Kwan <dougkwan@google.com>Doug Kwan2010-03-191-4/+1
| | | | | | | | | | | | | | | | | | | * 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-15 Doug Kwan <dougkwan@google.com>Doug Kwan2010-03-161-16/+25
| | | | | | | | | | | | | | | | | | | | * 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-10-21 Doug Kwan <dougkwan@google.com>Doug Kwan2009-10-211-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arm.cc: Update copyright comments. (Target_arm): New forward class template declaration. (Arm_address): New type. (ARM_MAX_FWD_BRANCH_OFFSET, ARM_MAX_BWD_BRANCH_OFFSET, THM_MAX_FWD_BRANCH_OFFSET, THM_MAX_BWD_BRANCH_OFFSET, THM2_MAX_FWD_BRANCH_OFFSET, THM2_MAX_BWD_BRANCH_OFFSET): New constants. (Insn_template): Same. (DEF_STUBS): New macro. (Stub_type): New enum type. (Stub_template): New class definition. (Stub): Same. (Reloc_stub): Same. (Stub_factory): Same. (Target_arm::Target_arm): Initialize may_use_blx_ and should_force_pic_veneer_. (Target_arm::may_use_blx, Target_arm::set_may_use_blx, Target_arm::should_force_pic_veneer, Target_arm::set_should_force_pic_veneer, Target_arm::using_thumb2, Target_arm::using_thumb_only, Target_arm:;default_target): New method defintions. (Target_arm::may_use_blx_, Target_arm::should_force_pic_veneer_): New data member declarations. (Insn_template::size, Insn_template::alignment): New method defintions. (Stub_template::Stub_template): New method definition. (Reloc_stub::Key::name, Reloc_stub::stub_type_for_reloc, Reloc_stub::do_fixed_endian_write, Reloc_stub::do_write): Same. (Stub_factory::Stub_factory): New method definition. * gold.h (string_hash): New template. * output.h (Input_section_specifier::hash_value): Use gold::string_hash. (Input_section_specifier::string_hash): Remove. * stringpool.cc (Stringpool_template::string_hash): Use gold::string_hash.
* PR 10133Ian Lance Taylor2009-06-231-2/+4
| | | | | | | | | | | * 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.
* * stringpool.cc (Stringpool_template::add_with_length): Set key toIan Lance Taylor2008-07-241-5/+6
| | | | | | | | | | 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.
* Update copyright years. Update language files.Ian Lance Taylor2008-03-131-1/+1
|
* From Craig Silverstein: Have Parameters point to General_options.Ian Lance Taylor2008-02-281-1/+1
|
* From Craig Silverstein: rename option functions for future optionIan Lance Taylor2008-02-261-1/+1
| | | | handling rewrite.
* Use a simpler hash function.Ian Lance Taylor2007-12-221-21/+9
|
* Move Stringpool offsets into a chunked_vector indexed by keys.Ian Lance Taylor2007-12-191-40/+34
|
* Use string length when available when calling Stringpool. CompareIan Lance Taylor2007-12-191-21/+29
| | | | pointers first when looking up Stringpool entries.
* Add section_size_type and section_offset_type, use them to replace aIan Lance Taylor2007-12-181-10/+10
| | | | lot of instances of off_t.
* From Craig Silverstein: size hash tables to avoid resizing.Ian Lance Taylor2007-12-141-1/+29
|
* Rework Stringpool to not compute the hash code twice when adding a newIan Lance Taylor2007-12-051-87/+127
| | | | string.
* Stringpool stats. Also make Symbol_table support functions inline.Ian Lance Taylor2007-12-051-0/+18
|
* Add casts to avoid warnings.Ian Lance Taylor2007-12-011-2/+3
|
* Compress all debug sections.Ian Lance Taylor2007-12-011-2/+2
|
* From Craig Silverstein: Add support for compressing .debug_str section.Ian Lance Taylor2007-11-301-9/+33
|
* Generate a complete exception frame header. Discard duplicateIan Lance Taylor2007-11-091-1/+1
| | | | exception frame information.
* Add an option for Stringpools to not copy strings.Ian Lance Taylor2007-10-121-6/+16
|
* From Andrew Chatham: fix bug in 64-bit hash.Ian Lance Taylor2007-10-051-1/+1
|
* Add licensing text to every source file.Ian Lance Taylor2007-09-221-0/+20
|
* From Craig Silverstein: Only sort for suffixes with -O2.Ian Lance Taylor2007-09-211-30/+54
|
* Set Stringpool zero_null option via a call, not a default constructorIan Lance Taylor2007-09-211-2/+2
| | | | argument.
* Compute string lengths before sorting. From Craig Silverstein.Ian Lance Taylor2007-09-181-22/+28
|
* Add support for SHF_MERGE sections.Ian Lance Taylor2007-05-161-65/+157
|
* Hash tables, dynamic section, i386 PLT, gold_assert.Ian Lance Taylor2006-11-291-4/+14
|
* Rework stringpool and hash tables so that we always generate the sameIan Lance Taylor2006-11-071-18/+51
| | | | output regardless of randomize_va_space.
* Snapshot. Now able to produce a minimal executable which actuallyIan Lance Taylor2006-09-291-11/+132
| | | | runs.
* gcc 4.1.0 portability fixes.Ian Lance Taylor2006-09-261-1/+1
|
* New drop, with first cut of section layout code.Ian Lance Taylor2006-09-211-1/+1
|
* Another snapshot of the current state of the sources. Gets to theIan Lance Taylor2006-08-181-0/+130
point of symbol resolution and can now issue a multiple definition error. Also added target selection infrastructure.