Commit Graph

35 Commits

Author SHA1 Message Date
Ian Lance Taylor 12c0daef5f * copy-relocs.cc: New file.
* copy-relocs.h: New file.
	* reloc.cc: Remove Copy_relocs code.
	* reloc.h: Likewise.
	* reloc-types.h (struct Reloc_types) [both versions]: Add
	get_reloc_addend_noerror.
	* output.h (class Output_data_reloc<elfcpp::SHT_REL>): Add
	variants of add_global which take an addend which must be zero.
	* i386.cc: Include "copy-relocs.h".
	(class Target_i386): Change type of copy_relocs_ to variable,
	update initializer.
	(Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class.
	Change all callers.
	(Target_i386::do_finalize_sections): Change handling of
	copy_relocs_.
	* sparc.cc: Include "copy-relocs.h".
	(class Target_sparc): Change type of copy_relocs_ to variable,
	update initializer.
	(Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class.
	Change all callers.
	(Target_sparc::do_finalize_sections): Change handling of
	copy_relocs_.
	* x86_64.cc: Include "copy-relocs.h".
	(class Target_x86_64): Change type of copy_relocs_ to variable,
	update initializer.
	(Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs
	class.  Change all callers.
	(Target_x86_64::do_finalize_sections): Change handling of
	copy_relocs_.
	* Makefile.am (CCFILES): Add copy-relocs.cc.
	(HFILES): Add copy-relocs.h.
2008-04-16 22:54:29 +00:00
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 da769d5629 Read input scripts which look like input objects with proper
serialization.
2008-02-28 19:46:06 +00:00
Ian Lance Taylor 8851eccaec From Craig Silverstein: Have Parameters point to General_options. 2008-02-28 00:18:24 +00:00
Ian Lance Taylor 7019cd2565 Implement -q/--emit-relocs. 2008-02-27 22:38:18 +00:00
Ian Lance Taylor 6a74a71947 Initial -r support. 2008-02-06 08:13:50 +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 8d32f93595 Correct handling of non-section symbol in merged section. Avoid some
64-bit signed/unsigned warnings.
2007-12-21 23:08:25 +00:00
Ian Lance Taylor a9a60db689 Speed up relocations against local symbols in merged sections. 2007-12-21 21:19:45 +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 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 7bf1f8020f From Cary Coutant: More support for generating shared libraries. 2007-12-06 05:55:50 +00:00
Ian Lance Taylor 96803768f1 Compress all debug sections. 2007-12-01 06:34:12 +00:00
Ian Lance Taylor c79126688f Add threading support. 2007-11-22 00:05:51 +00:00
Ian Lance Taylor 4f4c5f80c7 From Cary Coutant: Count textrel with output sections rather than
setting a flag as we add each reloc in the target code.
2007-11-15 23:46:46 +00:00
Ian Lance Taylor b696e6d46c From Craig Silverstein: Track_relocs doesn't need to hold onto the
object.
2007-11-12 20:35:21 +00:00
Ian Lance Taylor 730cdc88f7 Generate a complete exception frame header. Discard duplicate
exception frame information.
2007-11-09 07:00:15 +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 f5c3f2256f From Craig Silverstein: avoid some signed/unsigned warnings from gcc 4.2. 2007-10-02 20:52:18 +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 6cb15b7f89 Add licensing text to every source file. 2007-09-22 21:02:10 +00:00
Ian Lance Taylor 193a53d920 Add support for --enable-target to control which template
specializations we generate.
2007-09-04 20:00:53 +00:00
Ian Lance Taylor b8e6aad960 Add support for SHF_MERGE sections. 2007-05-16 17:42:48 +00:00
Ian Lance Taylor 14b3174058 Generate version information. 2006-12-06 00:02:36 +00:00
Ian Lance Taylor 16649710df Can now dynamically link hello, world. 2006-12-01 16:51:25 +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 a3ad94edd4 Hash tables, dynamic section, i386 PLT, gold_assert. 2006-11-29 17:56:40 +00:00
Ian Lance Taylor c06b7b0ba3 Snapshot. Includes first cut at output relocation sections. 2006-11-16 00:38:25 +00:00
Ian Lance Taylor dbe717effb More dynamic object support, initial scripting support. 2006-11-14 19:21:05 +00:00
Ian Lance Taylor 645f81233b Add Elf_file interface which can be used by both Sized_relobj and
Sized_dynobj.
2006-11-07 18:51:39 +00:00
Ian Lance Taylor f6ce93d6e9 Split Object into Dynobj and Relobj, incorporate elfcpp swapping changes. 2006-11-06 22:46:08 +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 92e059d8dc Framework for relocation scanning. Implement simple static TLS
relocations.
2006-10-20 20:40:49 +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