* layout.cc (Layout::attach_allocated_section_to_segment): Don't
[deliverable/binutils-gdb.git] / gold / ChangeLog
index ce2a4e316c8ef7b2192ffd839577d292aa882c11..aec50a59f01fbc758ec4684ae2ccd00b572a4b1e 100644 (file)
@@ -1,5 +1,259 @@
+2008-08-13  Ian Lance Taylor  <iant@google.com>
+
+       * 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 <ccoutant@google.com>
+
+       * 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  <iant@google.com>
+
+       * 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  <amodra@bigpond.net.au>
+
+       * Makefile.am (POTFILES.in): Set LC_ALL=C.
+       * Makefile.in: Regenerate.
+       * po/POTFILES.in: Regenerate.
+
+2008-07-29  Ian Lance Taylor  <iant@google.com>
+
+       * 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  <iant@google.com>
+
+       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 <clocale>.  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  <iant@google.com>
+
+       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.
+       (Version_script_info::get_symbol_version_helper): Change return
+       type to bool.  Add pversion parameter.  Change all callers.
+       (script_register_vers_node): Don't require a non-NULL tag.
+       * script.h (class Version_script_info): Update declarations.
+       (Version_script_info::get_symbol_version): Change return type to
+       bool.  Add version parameter.  Change all callers.
+       * symtab.cc (Sized_symbol::add_from_relobj): Rework version
+       handling.  Handle an empty version from a version script.
+       (Symbol_table::define_special_symbol): Likewise.
+       * testsuite/ver_test_10.script: New file.
+       * testsuite/ver_test_10.sh: New file.
+       * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_10.sh.
+       (check_DATA): Add ver_test_10.syms.
+       (ver_test_10.syms, ver_test_10.so): New target.
+       * testsuite/Makefile.in: Rebuild.
+
+2008-07-23  Simon Baldwin  <simonb@google.com>
+
+       * symtab.cc (Symbol_table::sized_write_symbol): Only set st_size
+       to zero for undefined symbols from dynamic libraries.
+
+2008-07-23  Ian Lance Taylor  <iant@google.com>
+
+       * symtab.cc (Symbol_table::resolve): Remove version parameter.
+       Change all callers.
+       * symtab.h (class Symbol_table): Update declaration.
+       * testsuite/ver_test_9.cc: New file.
+       * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_9.
+       (ver_test_9_SOURCES, ver_test_9_DEPENDENCIES): Define.
+       (ver_test_9_LDFLAGS, ver_test_9_LDADD): Define.
+       (ver_test_9.so, ver_test_9.o): New targets.
+       * testsuite/Makefile.in: Rebuild.
+
 2008-07-22  Ian Lance Taylor  <iant@google.com>
 
+       * options.h (class General_options): Define --check-sections.
+       * layout.cc (Layout::set_segment_offsets): Handle
+       --check-sections.
+
+       * options.h (class General_options): Define -n/--nmagic and
+       -N/--omagic.
+       * options.cc (General_options::finalize): For -n/--nmagic or
+       -N/--omagic, set -static.
+       * layout.cc (Layout::attach_allocated_section_to_segment): If
+       -N/--omagic, don't put read-only and read-write sections in
+       different segments.
+       (Layout::find_first_load_seg): If -N/--omagic, don't insist on
+       finding a read-only segment.
+       (Layout::set_segment_offsets): If -N/--omagic or -n/--nmagic,
+       don't set the minimum segment alignment to the common page size,
+       and don't set the file offset to the address modulo the page size.
+       * script-sections.cc (Script_sections::create_segments): If
+       -n/--omagic, don't put read-only and read-write sections in
+       different segments.
+
        * cref.cc: New file.
        * cref.h: New file.
        * options.h (class General_options): Add --print-symbol-counts.
This page took 0.025857 seconds and 4 git commands to generate.