X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gold%2FChangeLog;h=f344f502cd8b003fe002cdac4da3820496b6cd0d;hb=abc8dcbad2b489919dfb608e82d75f204b14b594;hp=dca8a51e3d03b3d39cc2d7a9aaa5203086d3efaf;hpb=057ead223193b365a6fcd11939a89a63eb4b94e0;p=binutils-gdb.git diff --git a/gold/ChangeLog b/gold/ChangeLog index dca8a51e3d0..f344f502cd8 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,530 @@ +2008-12-16 Cary Coutant + + * plugin.cc (Plugin::load): Move LDPT_MESSAGE to front of transfer + vector. + (Plugin_manager::claim_file): Create plugin object even if + plugin did not call the add_symbols callback. + (Plugin_obj::get_symbol_resolution_info): Guard against plugin + asking for more symbols than were added. + * testsuite/Makefile.am (plugin_test_1): Add test case with + no global symbols. + (empty.syms): New target. + * testsuite/Makefile.in: Regenerate. + * testsuite/plugin_test.c (claim_file_hook): Add new debug + message. Don't call add_symbols if no globals. + (all_symbols_read_hook): Don't provide replacement for empty + claimed file. + +2008-12-12 Ian Lance Taylor + + * target-reloc.h (Default_scan_relocatable_relocs): Only discard + r_type == 0 for a local symbol with r_sym == 0. + (scan_relocatable_relocs): Pass r_sym to + local_non_section_strategy. + * reloc.cc (Emit_relocs_strategy::local_non_section_strategy): Add + r_sym parameter. + + * configure.ac: Update test for TLS descriptors: they are + supported as of glibc 2.9. + * configure: Rebuild. + +2008-12-11 Ian Lance Taylor + + PR 7091 + * target-reloc.h (Default_scan_relocatable_relocs): For each + function, map r_type == 0 to RELOC_DISCARD. + +2008-12-10 Cary Coutant + + * layout.cc (Layout::add_comdat): Allow COMDAT group from a replacement + object to override a kept COMDAT group from a plugin object. + +2008-12-09 Ian Lance Taylor + + PR 7088 + * yyscript.y (file_cmd): Handle INPUT. + + * testsuite/initpri1.c: Change all declarations to be full + prototypes by adding void, to avoid compiler warnings. + +2008-12-05 Rafael Avila de Espindola + + * options.cc (General_options::parse_plugin_opt): New. + (General_options::add_plugin): The argument now is just the filename. + (General_options::add_plugin_option): New. + * options.h (plugin_opt): New. + (add_plugin): Change argument name. + (add_plugin_option): New. + * plugin.cc (Plugin::load): Don't parse the plugin option. + * plugin.h (Plugin::Plugin): Rename argument. Init filename_. + (Plugin::add_option): New. + (Plugin::args_): Change type. + (Plugin::filename_): New. + (Plugin_manager::add_plugin_option): New. + * testsuite/Makefile.am (plugin_test_1): Use new syntax. + * testsuite/Makefile.in: Regenerate. + +2008-12-05 Cary Coutant + + * layout.cc (Layout::include_section): Check for SHF_EXCLUDE. + Handle --strip-lto-sections option. + * options.h (strip_lto_sections): New option. + +2008-12-01 Cary Coutant + + * plugin.cc (ld_plugin_message): Change format parameter to const. + Fix mismatch between new[] and delete. + +2008-11-14 Cary Coutant + + * reloc.cc (Sized_relobj::do_read_relocs): Use constant invalid_address + instead of -1U. + +2008-11-05 Craig Silverstein + + * options.cc (General_options::parse_dynamic_list): New function. + * options.h (General_options): New flags dynamic_list, + dynamic_list_data, dynamic_list_cpp_new, and + dynamic_list_cpp_typeinfo. New variable dynamic_list_. + (General_options::in_dynamic_list): New function. + * script.cc (Lex::Mode): New enum DYNAMIC_LIST. + (Lex::can_start_name): Add support for DYNAMIC_LIST mode. + (Lex::can_continue_name): Likewise. + (yylex): Likewise. + (read_script_file): New parameter script_options. + (read_dynamic_list): New function. + (Script_options::define_dynamic_list): New function. + (dynamic_list_keyword_parsecodes): New variable. + (dynamic_list_keywords): New variable. + * script.h (Script_options::define_dynamic_list): New function + prototype. + (read_dynamic_list): New function prototype. + * symtab.cc (strprefix): New macro. + (Symbol::should_add_dynsym_entry): Support dynamic_list, + dynamic_list_data, dynamic_list_cpp_new, and + dynamic_list_cpp_typeinfo. + * yyscript.y (PARSING_DYNAMIC_LIST): New token. + (dynamic_list_expr): New rule. + (dynamic_list_nodes): Likewise. + (dynamic_list_node): Likewise. + * testsuite/Makefile.am (dynamic_list): New test. + * testsuite/Makefile.in: Regenerated. + * testsuite/dynamic_list.t: New file. + * testsuite/dynamic_list.sh: New file. + +2008-11-05 Craig Silverstein + + * testsuite/tls_test_c.c: Add prototype for t11 and t11_last. + * testsuite/tls_test_c.c (t11): Add explicit "void" to prototype. + (t11_last): Likewise. + * testsuite/ver_test_6.c (main): Likewise. + +2008-10-07 Cary Coutant + + * options.c (General_options::finalize): Add check for -static and + -shared. + * gold.cc (queue_middle_tasks): Assert that list of dynamic objects + is not empty. + +2008-10-02 Cary Coutant + + * plugin.cc (make_sized_plugin_object): Fix conditional + compilation to work when not all targets are enabled. + +2008-09-29 Cary Coutant + + * archive.cc (Archive::get_file_and_offset): Use filename instead + of name to get library path. + (Archive::include_member): Unlock external member of a thin archive. + + * testsuite/Makefile.am (TEST_AR): New variable. + (thin_archive_test_1): New test. + (thin_archive_test_2): New test. + * testsuite/Makefile.in: Regenerate. + * testsuite/thin_archive_main.cc: New file. + * testsuite/thin_archive_test_1.cc: New file. + * testsuite/thin_archive_test_2.cc: New file. + * testsuite/thin_archive_test_3.cc: New file. + * testsuite/thin_archive_test_4.cc: New file. + +2008-09-29 Cary Coutant + + * mapfile.cc (Mapfile::print_input_section): Change -1U to -1ULL. + * object.cc (Sized_relobj::do_layout): Use constant invalid_address + instead of -1U. + (Sized_relobj::do_finalize_local_symbols): Likewise. + (Sized_relobj::map_to_kept_section): Likewise. + * object.h (Sized_relobj::invalid_address): New constant. + (Sized_relobj::do_output_section_offset): Check for invalid_address + and return -1ULL. + * output.cc (Output_reloc::local_section_offset): Use constant + invalid_address instead of -1U. + (Output_reloc::get_address): Likewise. + (Output_section::output_address): Change -1U to -1ULL. + * output.h (Output_reloc::invalid_address): New constant. + * reloc.cc (Sized_relobj::write_sections): Use constant + invalid_address instead of -1U. + (Sized_relobj::relocate_sections): Likewise. + * symtab.cc (Symbol_table::sized_finalize_symbol): Handle symbol + values for merge sections. + * target-reloc.h (relocate_for_relocatable): Use constant + invalid_address instead of -1U. + +2008-09-19 Cary Coutant + + Add plugin functionality for link-time optimization (LTO). + * configure.ac (plugins): Add --enable-plugins option. + * configure: Regenerate. + * config.in: Regenerate. + * Makefile.am (LIBDL): New variable. + (CCFILES): Add plugin.cc. + (HFILES): Add plugin.h. + (ldadd_var): Add LIBDL. + * Makefile.in: Regenerate. + + * archive.cc: Include "plugin.h". + (Archive::setup): Don't preread archive symbols when using a plugin. + (Archive::get_file_and_offset): Add memsize parameter. Change callers. + (Archive::get_elf_object_for_member): Call plugin hooks for claiming + files. + (Archive::include_member): Add symbols from plugin objects. + * archive.h (Archive::get_file_and_offset): Add memsize parameter. + * descriptors.cc (Descriptors::open): Check for file descriptors + abandoned by plugins. + (Descriptors::claim_for_plugin): New function. + * descriptors.h (Descriptors::claim_for_plugin): New function. + (Open_descriptor::is_claimed): New field. + (claim_descriptor_for_plugin): New function. + * fileread.cc (File_read::claim_for_plugin): New function. + * fileread.h (File_read::claim_for_plugin): New function. + (File_read::descriptor): New function. + * gold.cc: Include "plugin.h". + (queue_initial_tasks): Add task to call plugin hooks for generating + new object files. + * main.cc: Include "plugin.h". + (main): Load plugin libraries. + * object.h (Pluginobj): Declare. + (Object::pluginobj): New function. + (Object::do_pluginobj): New function. + (Object::set_target): New function. + * options.cc: Include "plugin.h". + (General_options::parse_plugin): New function. + (General_options::General_options): Initialize plugins_ field. + (General_options::add_plugin): New function. + * options.h (Plugin_manager): Declare. + (General_options): Add --plugin option. + (General_options::has_plugins): New function. + (General_options::plugins): New function. + (General_options::add_plugin): New function. + (General_options::plugins_): New field. + * plugin.cc: New file. + * plugin.h: New file. + * readsyms.cc: Include "plugin.h". + (Read_symbols::do_read_symbols): Check for archive before checking + for ELF file. Call plugin hooks to claim files. + * resolve.cc (Symbol_table::resolve): Record when symbol is referenced + from a real object file; force override when processing replacement + files. + * symtab.cc (Symbol::init_fields): Initialize in_real_elf_ field. + (Symbol::init_base_object): Likewise. + (Symbol::init_base_output_data): Likewise. + (Symbol::init_base_output_segment): Likewise. + (Symbol::init_base_constant): Likewise. + (Symbol::init_base_undefined): Likewise. + (Symbol::output_section): Assert that object is not a plugin. + (Symbol_table::add_from_pluginobj): New function. + (Symbol_table::sized_finalize_symbol): Treat symbols from plugins as + undefined. + (Symbol_table::sized_write_globals): Likewise. + (Symbol_table::add_from_pluginobj): Instantiate template. + * symtab.h (Sized_pluginobj): Declare. + (Symbol::in_real_elf): New function. + (Symbol::set_in_real_elf): New function. + (Symbol::in_real_elf_): New field. + (Symbol_table::add_from_pluginobj): New function. + + * testsuite/Makefile.am (AM_CFLAGS): New variable. + (LIBDL): New variable. + (LDADD): Add LIBDL. + (check_PROGRAMS): Add plugin_test_1 and plugin_test_2. + (check_SCRIPTS): Add plugin_test_1.sh and plugin_test_2.sh. + (check_DATA): Add plugin_test_1.err and plugin_test_2.err. + (MOSTLYCLEANFILES): Likewise. + * testsuite/Makefile.in: Regenerate. + * testsuite/plugin_test.c: New file. + * testsuite/plugin_test_1.sh: New file. + * testsuite/plugin_test_2.sh: New file. + +2008-09-16 Ian Lance Taylor + + * target-reloc.h (relocate_section): Check whether a symbol is + 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. + + * fileread.cc (make_view): Add casts to avoid warning. + +2008-09-16 Alexandre Oliva + + * i386.cc (Target_i386::define_tls_base_symbol): Update comments. + * x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise. + +2008-09-16 Alexandre Oliva + + * options.h (General_options::output_is_executable): New. + (General_options::output_is_pie): New. + * i386.cc (Target_i386::define_tls_base_symbol): Use SEGMENT_START + for shared libraries. + * x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise. + +2008-09-11 Chris Demetriou + + * options.h (origin): New -z option. + * layout.cc (Layout:finish_dynamic_section): If "-z origin" + is specified, set DF_ORIGIN in DT_FLAGS and set DF_1_ORIGIN + in DT_FLAGS_1. + +2008-09-05 Cary Coutant + + * fileread.cc (File_read::make_view): Add check for attempt to map + beyond end of file. + +2008-09-05 Cary Coutant + + * symtab.cc (Symbol_table::add_from_dynobj): Fix typos in + explicit instantiations. + +2008-08-28 Kris Van Hees + + PR gold/6858 + * options.cc (General_options::finalize): Allow undefined symbols + in shlibs if linking -shared. + + PR gold/6859 + * symtab.cc (Symbol::init_base_undefined): Mark explicitly undefined + symbols as not needing a dynsym entry. + +2008-08-20 Craig Silverstein + + * fileread.cc (File_read::open): Do not lock the file unless it + was successfully opened. + +2008-08-14 Cary Coutant + + * x86_64.cc (Target_x86_64::Relocate::relocat_tls): + Use addend for DTPOFF32, DTPOFF64, and TPOFF32 relocs. + * testsuite/tls_test.cc (struct int128): 128-bit struct + for testing TLS relocs with non-zero addend. + (v12): New TLS variable. + (t12): New test. + (t_last): Add check for v12. + * testsuite/tls_test.h (t12): New function. + * testsuite/tls_test_main.cc (thread_routine): Call new test. + +2008-08-13 Ian Lance Taylor + + * layout.cc (Layout::attach_allocated_section_to_segment): Don't + set tls_segment_ or relro_segment_. + (Layout::make_output_segment): Set tls_segment_ and relro_segment_ + when appropriate. + * output.h (Output_section::clear_is_relro): New function. + * output.cc (Output_segment::add_output_section): Handle SHF_TLS + sections specially even when output_data_ is empty. + (Output_segment::maximum_alignment): When first section is relro, + only force alignment for PT_LOAD segments. + * script.cc (script_data_segment_align): New function. + (script_data_segment_relro_end): New function. + * script-c.h (script_data_segment_align): Declare. + (script_data_segment_relro_end): Declare. + * script-sections.h (class Script_sections): Declare + data_segment_align and data_segment_relro_end. Add fields + segment_align_index_ and saw_relro_end_. + * script-sections.cc (class Sections_element): Add set_is_relro + virtual function. Add new bool* parameter to place_orphan_here. + Add get_output_section virtual function. + (class Output_section_definition): Add set_is_relro. Add new + bool* parameter to place_orphan_here. Add get_output_section. + Add is_relro_ field. + (Output_section_definition::Output_section_definition): Initialize + evaluated_address_, evaluated_load_address, evaluated_addralign_, + and is_relro_ fields. + (Output_section_definition::place_orphan_here): Add is_relro + parameter. + (Output_section_definition::set_section_addresses): Set relro for + output section. + (Output_section_definition::alternate_constraint): Likewise. + (class Orphan_output_section): Add new bool* parameter to + place_orphan_here. Add get_output_section. + (Orphan_output_section::place_orphan_here): Add is_relro + parameter. + (Script_sections::Script_sections): Initialize + data_segment_align_index_ and saw_relro_end_. + (Script_sections::data_segment_align): New function. + (Script_sections::data_segment_relro_end): New function. + (Script_sections::place_orphan): Set or clear is_relro. + (Script_sections::set_section_addresses): Force alignment of first + TLS section. + * yyscript.y (exp): Call script_data_segment_align and + script_data_segment_relro_end. + * testsuite/relro_script_test.t: New file. + * testsuite/relro_test.cc (using_script): Declare. + (t1, t2): Test using_script. + * testsuite/Makefile.am (check_PROGRAMS): Add relro_script_test. + (relro_script_test_SOURCES): Define. + (relro_script_test_DEPENDENCIES): Define. + (relro_script_test_LDFLAGS): Define. + (relro_script_test_LDADD): Define. + (relro_script_test.so): New target. + * testsuite/Makefile.in: Rebuild. + +2008-08-06 Cary Coutant + + * archive.cc (Archive::total_archives, Archive::total_members) + (Archive::total_members_loaded): New variables. + (Archive::setup): Add parameter. Add option to preread + archive symbols. + (Archive::read_armap): Add counter. + (Archive::get_file_and_offset): New function. + (Archive::get_elf_object_for_member): New function. + (Archive::read_all_symbols): New function. + (Archive::read_symbols): New function. + (Archive::add_symbols): Add counters. + (Archive::include_all_members): Use armap to find members if it's + already built. + (Archive::include_member): Skip reading symbols if already read. + Factored code into Archive::get_file_and_offset and + Archive::get_elf_object_for_member. Changed call to + Mapfile::report_include_archive_member. + (Archive::print_stats): New function. + * archive.h: Declare Object and Read_symbols_data classes. + (Archive::Archive): Add initializers for new members. + (Archive::setup): Add parameter. + (Archive::print_stats): New function. + (Archive::total_archives, Archive::total_members) + (Archive::total_members_loaded): New variables. + (Archive::get_file_and_offset): New function. + (Archive::get_elf_object_for_member): New function. + (Archive::read_all_symbols): New function. + (Archive::read_symbols): New function. + (Archive::Archive_member): New class. + (Archive::members_): New member. + (Archive::num_members_): New member. + * main.cc: Include archive.h. + (main): Call Archive::print_stats. + * mapfile.cc (Mapfile::report_include_archive_member): Delete + archive parameter; member_name is now the fully-decorated name. + * mapfile.h (Mapfile::report_include_archive_member): Likewise. + * options.h: (General_options): Add --preread-archive-symbols option. + * readsyms.cc (Read_symbols::do_read_symbols): Change call to + Archive::setup. + +2008-08-04 Ian Lance Taylor + + * symtab.h (Symbol::use_plt_offset): New function. + * i386.cc (Relocate::relocate): Call Symbol::use_plt_offset. + * powerpc.cc (Relocate::relocate): Likewise. + * sparc.cc (Relocate::relocate): Likewise. + * x86_64.cc (Relocate::relocate): Likewise. + * testsuite/weak_plt.sh: New test. + * testsuite/weak_plt_main.cc: New test. + * testsuite/weak_plt_shared.cc: New test. + * testsuite/Makefile.am (check_SCRIPTS): Add weak_plt.sh. + (check_PROGRAMS): Add weak_plt. + (check_DATA): Add weak_plt_shared.so. + (weak_plt_main_pic.o, weak_plt): New targets. + (weak_plt_shared_pic.o, weak_plt_shared.so): New targets. + * testsuite/Makefile.in: Rebuild. + + * testsuite/Makefile.am (weak_alias_test_1.so): Depend upon + gcctestdir/ld. + (weak_alias_test_2.so, weak_alias_test_4.so): Likewise. + * testsuite/Makefile.in: Rebuild. + +2008-08-04 Alan Modra + + * Makefile.am (POTFILES.in): Set LC_ALL=C. + * Makefile.in: Regenerate. + * po/POTFILES.in: Regenerate. + +2008-07-29 Ian Lance Taylor + + * script.cc (Script_options::finalize_symbols): Finalize SECTIONS + symbols before other symbols. + * testsuite/script_test_2.cc (test_addr): Declare. + (test_addr_alias): Declare. + (main): Check that test_addr and test_addr_alias have the right + values. + * testsuite/script_test_2.t: Define test_addr_alias and + test_addr. + +2008-07-24 Ian Lance Taylor + + PR 5990 + * descriptors.cc: New file. + * descriptors.h: New file. + * gold-threads.h (class Hold_optional_lock): New class. + * fileread.cc: Include "descriptors.h". + (File_read::~File_read): Release descriptor rather than closing + it. + (File_read::open) [file]: Call open_descriptor rather than open. + Set is_descriptor_opened_. + (File_read::open) [memory]: Assert that descriptor is not open. + (File_read::reopen_descriptor): New function. + (File_read::release): Release descriptor. + (File_read::do_read): Make non-const. Reopen descriptor. + (File_read::read): Make non-const. + (File_read::make_view): Reopen descriptor. + (File_read::do_readv): Likewise. + * fileread.h (class File_read): Add is_descriptor_opened_ field. + Update declarations. + * layout.cc: Include "descriptors.h". + (Layout::create_build_id): Use open_descriptor rather than open. + * output.cc: Include "descriptors.h". + (Output_file::open): Use open_descriptor rather than open. + * archive.cc (Archive::const_iterator): Change Archive to be + non-const. + (Archive::begin, Archive::end): Make non-const. + (Archive::count_members): Likewise. + * archive.h (class Archive): Update declarations. + * object.h (Object::read): Make non-const. + * Makefile.am (CCFILES): Add descriptors.cc. + (HFILES): Add descriptors.h. + * Makefile.in: Rebuild. + + PR 6716 + * gold.h: Always include . Add Solaris workarounds + following code in binutils/sysdep.h. + + PR 6048 + * ehframe.cc (Eh_frame::add_ehframe_input_section): Check whether + this->eh_frame_hdr_ is NULL before using it. + + * dynobj.cc (Versions::Versions): Update comment. + + * dynobj.cc (Versions::Versions): If there is an soname, use it as + the base version name. + + * 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-23 Ian Lance Taylor + PR 6658 + * object.h (Merged_symbol_value::value): Do our best to handle a + negative addend. + PR 6647 * script.cc (Version_script_info::get_versions): Don't add empty version tag to return value.