Commit Graph

25 Commits

Author SHA1 Message Date
Doug Kwan
d099120c64 2010-03-19 Doug Kwan <dougkwan@google.com>
* 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-19 19:11:21 +00:00
Doug Kwan
1aa3738469 2010-03-15 Doug Kwan <dougkwan@google.com>
* 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.
2010-03-16 01:26:15 +00:00
Ian Lance Taylor
f7c8a183e8 PR 10133
* 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.
2009-06-23 07:04:10 +00:00
Ian Lance Taylor
5778530ea7 * stringpool.cc (Stringpool_template::add_with_length): Set key to
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-07-24 07:23:20 +00:00
Ian Lance Taylor
ebdbb4583d Update copyright years. Update language files. 2008-03-13 21:04:21 +00:00
Ian Lance Taylor
2030fba084 Move Stringpool offsets into a chunked_vector indexed by keys. 2007-12-19 01:23:46 +00:00
Ian Lance Taylor
c0873094f5 Use string length when available when calling Stringpool. Compare
pointers first when looking up Stringpool entries.
2007-12-19 00:29:28 +00:00
Ian Lance Taylor
8383303e0a Add section_size_type and section_offset_type, use them to replace a
lot of instances of off_t.
2007-12-18 00:48:04 +00:00
Ian Lance Taylor
6d01333390 From Craig Silverstein: size hash tables to avoid resizing. 2007-12-14 05:24:17 +00:00
Ian Lance Taylor
987cc25110 Rework Stringpool to not compute the hash code twice when adding a new
string.
2007-12-05 22:56:51 +00:00
Ian Lance Taylor
ad8f37d1ba Stringpool stats. Also make Symbol_table support functions inline. 2007-12-05 00:48:49 +00:00
Ian Lance Taylor
96803768f1 Compress all debug sections. 2007-12-01 06:34:12 +00:00
Ian Lance Taylor
9a0910c33e From Craig Silverstein: Add support for compressing .debug_str section. 2007-11-30 00:35:27 +00:00
Ian Lance Taylor
cfd73a4e26 Add an option for Stringpools to not copy strings. 2007-10-12 06:06:34 +00:00
Ian Lance Taylor
6cb15b7f89 Add licensing text to every source file. 2007-09-22 21:02:10 +00:00
Ian Lance Taylor
a8b2552e07 Set Stringpool zero_null option via a call, not a default constructor
argument.
2007-09-21 06:12:32 +00:00
Ian Lance Taylor
bc56b3fb3a Note that a Stringpool keeps a copy of a string. 2007-09-19 20:44:15 +00:00
Ian Lance Taylor
835965e646 Better comments for Stringpool. 2007-09-19 17:38:00 +00:00
Ian Lance Taylor
614f30a283 Compute string lengths before sorting. From Craig Silverstein. 2007-09-18 05:16:39 +00:00
Ian Lance Taylor
b8e6aad960 Add support for SHF_MERGE sections. 2007-05-16 17:42:48 +00:00
Ian Lance Taylor
a3ad94edd4 Hash tables, dynamic section, i386 PLT, gold_assert. 2006-11-29 17:56:40 +00:00
Ian Lance Taylor
f0641a0b38 Rework stringpool and hash tables so that we always generate the same
output regardless of randomize_va_space.
2006-11-07 04:40:46 +00:00
Ian Lance Taylor
61ba1cf936 Snapshot. Now able to produce a minimal executable which actually
runs.
2006-09-29 19:58:17 +00:00
Ian Lance Taylor
274e99f9ae g++ 3.2.2 portability fixes. 2006-09-26 21:50:25 +00:00
Ian Lance Taylor
14bfc3f555 Another snapshot of the current state of the sources. Gets to the
point of symbol resolution and can now issue a multiple definition
error.  Also added target selection infrastructure.
2006-08-18 22:29:20 +00:00