Commit Graph

29 Commits

Author SHA1 Message Date
Ian Lance Taylor 39d0cb0e83 * fileread.cc (File_read::find_view): Add byteshift and vshifted
parameters.  Update for new key type to views_.  Change all
	callers.
	(File_read::read): Adjust for byteshift in returned view.
	(File_read::add_view): New function, broken out of
	find_and_make_view.
	(File_read::make_view): New function, broken out of
	find_and_make_view.
	(File_read::find_or_make_view): Add offset and aligned
	parameters.  Rewrite accordingly.  Change all callers.
	(File_read::get_view): Add offset and aligned parameters.  Adjust
	for byteshift in return value.
	(File_read::get_lasting_view): Likewise.
	* fileread.h (class File_read): Update declarations.
	(class File_read::View): Add byteshift_ field.  Add byteshift to
	constructor.  Add byteshift method.
	* archive.h (Archive::clear_uncached_views): New function.
	(Archive::get_view): Add aligned parameter.  Change all callers.
	* object.h (Object::get_view): Add aligned parameter.  Change all
	callers.
	(Object::get_lasting_view): Likewise.

	* fileread.cc (File_read::release): Don't call clear_views if
	there are multiple objects.
	* fileread.h (File_read::clear_uncached_views): New function.
	* archive.cc (Add_archive_symbols::run): Call clear_uncached_views
	on the archive.
2008-04-02 20:58:21 +00:00
Ian Lance Taylor ebdbb4583d Update copyright years. Update language files. 2008-03-13 21:04:21 +00:00
Ian Lance Taylor 0daa6f62c8 Support selecting target by name. 2008-02-13 02:44:50 +00:00
Ian Lance Taylor bc644c6cfc Add support for --format binary for input files. 2008-02-08 07:06:58 +00:00
Ian Lance Taylor 88dd47ac00 Implement --just-symbols, including -R FILE. Fix symbol values when
doing a relocatable link.
2008-02-07 01:51:25 +00:00
Ian Lance Taylor 0c0a741125 Include <vector>. 2008-01-22 22:50:31 +00:00
Ian Lance Taylor 14144f39e4 Don't include options.h in fileread.h. Remove General_options
reference from Output_file class.
2008-01-18 23:26:48 +00:00
Ian Lance Taylor cb29561284 Reduce the number of system calls. Use readv instead of pread. Do
better handling of cached views.
2008-01-02 23:48:49 +00:00
Ian Lance Taylor fe8718a463 Convert more instances of off_t to be 32-bit types. 2007-12-20 21:21:24 +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 17a1d0a9b2 Rewrite workqueue. This version eliminates the master thread, and
reduces the amount of locking required to find a new thread to run.
2007-12-14 19:00:21 +00:00
Ian Lance Taylor 7004837e8d Add const to Object::read and Object::sized_target. 2007-12-14 18:50:01 +00:00
Ian Lance Taylor c71c6f566c Make some File_read methods const. 2007-12-14 18:22:06 +00:00
Ian Lance Taylor 75f2446ec3 Run all error handling through an Errors object. Delete output file
on error.
2007-10-14 06:49:14 +00:00
Ian Lance Taylor e44fcf3bcf Add --stats option to print runtime and memory usage statistics. 2007-10-12 05:51:25 +00:00
Ian Lance Taylor e2aacd2c75 Fix soname for library found in search path. 2007-10-09 17:46:15 +00:00
Ian Lance Taylor ad2d6943a4 Full support for --sysroot. 2007-10-04 05:49:04 +00:00
Ian Lance Taylor d1038c216f Use mmap to read from input files. 2007-09-25 23:08:30 +00:00
Ian Lance Taylor 9eb9fa57c2 Add cache parameter to get_view. Discard uncached views on unlock.
Fix bug this exposed in archive armap symbol name handling.
2007-09-25 17:50:26 +00:00
Ian Lance Taylor 82dcae9de0 Rework File_read interface. Get file size. Use pread when
available.
2007-09-25 06:43:17 +00:00
Ian Lance Taylor bae3688d8f Remove get_view_and_size. 2007-09-25 05:16:35 +00:00
Ian Lance Taylor ba45d2478b Break out default pbytes argument to read and get_view routines,
adding new routines.
2007-09-25 00:27:29 +00:00
Ian Lance Taylor 6cb15b7f89 Add licensing text to every source file. 2007-09-22 21:02:10 +00:00
Ian Lance Taylor e214a02b9b From Andrew Chatham: Make File_read::View::data_ a const pointer. 2007-09-22 05:03:56 +00:00
Ian Lance Taylor 4973341a7d Implement --whole-archive. 2007-08-21 23:37:56 +00:00
Ian Lance Taylor 5a6f7e2db5 Added a testsuite. More support for COPY relocations. 2006-11-30 23:52:50 +00:00
Ian Lance Taylor ead1e4244a Can now do a full static link of hello, world in C or C++ 2006-11-03 18:26:11 +00:00
Ian Lance Taylor a2fb1b05e4 New drop, with first cut of section layout code. 2006-09-21 22:13:18 +00:00
Ian Lance Taylor bae7f79e03 Initial CVS checkin of gold 2006-08-04 23:10:59 +00:00