aboutsummaryrefslogtreecommitdiff
path: root/gold/target.h
AgeCommit message (Collapse)AuthorFilesLines
2009-03-242009-03-23 Ian Lance Taylor <iant@google.com>Ian Lance Taylor1-0/+14
* freebsd.h: New file. * i386.cc: Include "freebsd.h". (Target_i386): Derive from Target_freebsd rather than Sized_target. (Target_selector_i386): Derive from Target_selector_freebsd rather than Target_selector. * x86_64.cc: Include "freebsd.h". (Target_x86_64): Derive from Target_freebsd rather than Sized_target. (Target_selector_x86_64): Derive from Target_selector_freebsd rather than Target_selector. * target.h (class Target): Add adjust_elf_header and do_adjust_elf_header. * output.cc (Output_file_header:: do_sized_write): Call target adjust_elf_header routine. * configure.tgt: Set targ_osabi. * configure.ac: Define GOLD_DEFAULT_OSABI. * parameters.cc (Parameters::default_target): Pass GOLD_DEFAULT_OSABI to select_target. * target-select.h (class Target_selector): Make instantiate_target protected rather than private. * Makefile.am (HFILES): Add freebsd.h. * configure, Makefile.in, config.in: Rebuild.
2009-01-282009-01-20 Sriraman Tallam <tmsriram@google.com>Sriraman Tallam1-1/+19
* Makefile.am (CCFILES): Add gc.cc. (HFILES): Add gc.h. * Makefile.in: Regenerate. * gold.cc (Gc_runner): New class. (queue_initial_tasks): Call garbage collection related tasks when corresponding options are invoked. (queue_middle_gc_tasks): New function. (queue_middle_tasks): Reorder tasks to allow relocs to be read and processed early before laying out sections during garbage collection. * gold.h (queue_middle_gc_tasks): New function. (is_prefix_of): Move from "layout.cc". * i386.cc (Target_i386::gc_process_relocs): New function. * layout.cc (is_prefix_of): Remove. Move to "gold.h" * main.cc (main): Create object of class "Garbage_collection". * object.cc (Relobj::copy_symbols_data): New function. (Relobj::is_section_name_included): New function. (Sized_relobj::do_layout): Allow this function to be called twice during garbage collection and defer layout of section during the first call. * object.h (Relobj::get_symbols_data): New function. (Relobj::is_section_name_included): New function. (Relobj::copy_symbols_data): New function. (Relobj::set_symbols_data): New function. (Relobj::get_relocs_data): New function. (Relobj::set_relocs_data): New function. (Relobj::is_output_section_offset_invalid): New pure virtual function. (Relobj::gc_process_relocs): New function. (Relobj::do_gc_process_relocs): New pure virtual function. (Relobj::sd_): New data member. (Sized_relobj::is_output_section_offset_invalid): New function. (Sized_relobj::do_gc_process_relocs): New function. * options.h (General_options::gc_sections): Modify to not be a no-op. (General_options::print_gc_sections): New option. * plugin.cc (Plugin_finish::run): Remove function call to Plugin_manager::layout_deferred_objects. Move it to "gold.cc". * powerpc.cc (Target_powerpc::gc_process_relocs): New function. * reloc.cc (Read_relocs::run): Add task to process relocs and determine unreferenced sections when doing garbage collection. (Gc_process_relocs): New class. (Sized_relobj::do_gc_process_relocs): New function. (Sized_relobj::do_scan_relocs): Don't try to scan the relocs for sections that are garbage collected. * reloc.h (Gc_process_relocs): New class. * sparc.cc (Target_sparc::gc_process_relocs): New function. * symtab.cc (Symbol::should_add_dynsym_entry): Do not add entries for symbols whose corresponding sections are garbage collected. (Symbol_table::Symbol_table): Add new parameter for the garbage collection object. (Symbol_table::gc_mark_undef_symbols): New function. (Symbol_table::gc_mark_symbol_for_shlib): New function. (Symbol_table::gc_mark_dyn_syms): New function. (Symbol_table::resolve): Do not treat symbols seen in dynamic objects as garbage. (Symbol_table::add_from_object): Likewise. (Symbol_table::add_from_relobj): When building shared objects, do not treat externally visible symbols as garbage. (Symbol_table::sized_finalize_symbol): Do not check dynamic symbol table information for static and relocatable links. * symtab.h (Symbol_table::set_gc): New function. (Symbol_table::gc): New function. (Symbol_table::gc_mark_undef_symbols): New function. (Symbol_table::gc_mark_symbol_for_shlib): New function. (Symbol_table::gc_mark_dyn_syms): New function. (Symbol_table::gc_): New data member. * target.h (Sized_target::gc_process_relocs): New pure virtual function. * x86_64.cc (Target_x86_64::gc_process_relocs): New function. * testsuite/testfile.cc (Target_test::gc_process_relocs): New function.
2008-09-16 * target-reloc.h (relocate_section): Check whether a symbol isIan Lance Taylor1-2/+2
defined by the ABI before reporting an undefined symbol error. * target.h (Target::is_defined_by_abi): Make parameter const. (Target::do_is_defined_by_abi): Likewise. * i386.cc (Target_i386::do_is_defined_by_abi): Likewise. * powerpc.cc (Target_powerpc::do_is_defined_by_abi): Likewise. * sparc.cc (Target_sparc::do_is_defined_by_abi): Likewise. * x86_64.cc (Target_x86_64::do_is_defined_by_abi): Likewise. * testsuite/Makefile.am (tls_test_shared.so): Add -Wl,-z,defs. * testsuite/Makefile.in: Rebuild.
2008-04-09 * options.h (class General_options): Define --wrap as a specialIan Lance Taylor1-0/+11
option. Add wrap_symbols_ field. (General_options::any_wrap_symbols): New function. (General_options::is_wrap_symbol): New function. * options.cc (General_options::parse_wrap): New function. (General_options::General_options): Initialize wrap_symbols_. * symtab.cc (Symbol_table::wrap_symbol): New function. (Symbol_table::add_from_object): Handle --wrap. * symtab.h (class Symbol_table): Declare wrap_symbol. * target.h (Target::wrap_char): New function. (Target::Target_info): Add wrap_char field. * i386.cc (Target_i386::i386_info): Initialize wrap_char. * x86_64.cc (Target_x86_64::x86_64_info): Likewise. * testsuite/testfile.cc (Target_test::test_target_info): Likewise.
2008-03-13Update copyright years. Update language files.Ian Lance Taylor1-1/+1
2008-02-28From Craig Silverstein: Have Parameters point to General_options.Ian Lance Taylor1-6/+7
2008-02-26From Craig Silverstein: implement -z max-page-size and -zIan Lance Taylor1-2/+15
common-page-size.
2008-02-06Initial -r support.Ian Lance Taylor1-0/+37
2007-12-20Convert more instances of off_t to be 32-bit types.Ian Lance Taylor1-3/+3
2007-11-14Add heuristics for undefined symbol warnings.Ian Lance Taylor1-0/+11
2007-11-14Revert last patch.Ian Lance Taylor1-13/+0
2007-11-14Support special always-defined symbols for targets.Ian Lance Taylor1-0/+13
2007-11-09Generate a complete exception frame header. Discard duplicateIan Lance Taylor1-10/+21
exception frame information.
2007-10-23Add support for PT_GNU_STACK.Ian Lance Taylor1-0/+11
2007-10-16From Craig Silverstein: implement -Ttext.Ian Lance Taylor1-3/+3
2007-09-23Use special value when we refer a function symbol in some way otherIan Lance Taylor1-0/+12
than calling it.
2007-09-22Add licensing text to every source file.Ian Lance Taylor1-0/+20
2007-09-21Add global parameters.Ian Lance Taylor1-3/+3
2007-09-21Use nops when doing alignment padding between code sections.Ian Lance Taylor1-0/+20
2006-12-06Generate version information.Ian Lance Taylor1-3/+5
2006-12-01Can now dynamically link hello, world.Ian Lance Taylor1-3/+3
2006-11-30Added a testsuite. More support for COPY relocations.Ian Lance Taylor1-0/+11
2006-11-29Hash tables, dynamic section, i386 PLT, gold_assert.Ian Lance Taylor1-7/+7
2006-11-14More dynamic object support, initial scripting support.Ian Lance Taylor1-0/+7
2006-11-06Split Object into Dynobj and Relobj, incorporate elfcpp swapping changes.Ian Lance Taylor1-3/+6
2006-11-03Can now do a full static link of hello, world in C or C++Ian Lance Taylor1-0/+1
2006-10-20Framework for relocation scanning. Implement simple static TLSIan Lance Taylor1-21/+37
relocations.
2006-09-29Snapshot. Now able to produce a minimal executable which actuallyIan Lance Taylor1-1/+33
runs.
2006-09-27Finished layout code.Ian Lance Taylor1-20/+52
2006-09-26g++ 3.2.2 portability fixes.Ian Lance Taylor1-10/+0
2006-08-18Another snapshot of the current state of the sources. Gets to theIan Lance Taylor1-3/+90
point of symbol resolution and can now issue a multiple definition error. Also added target selection infrastructure.
2006-08-04Initial CVS checkin of goldIan Lance Taylor1-0/+29